Message ID | 20230606230120.407292-6-witu@nvidia.com |
---|---|
State | New |
Headers | show
Return-Path: <kernel-team-bounces@lists.ubuntu.com> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=<UNKNOWN>) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=Nvidia.com header.i=@Nvidia.com header.a=rsa-sha256 header.s=selector2 header.b=gVDXIEWP; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QbQwD33gXz20WR for <incoming@patchwork.ozlabs.org>; Wed, 7 Jun 2023 09:02:04 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from <kernel-team-bounces@lists.ubuntu.com>) id 1q6fga-0001vP-8N; Tue, 06 Jun 2023 23:01:56 +0000 Received: from mail-dm6nam12on2066.outbound.protection.outlook.com ([40.107.243.66] helo=NAM12-DM6-obe.outbound.protection.outlook.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from <witu@nvidia.com>) id 1q6fgX-0001q5-5A for kernel-team@lists.ubuntu.com; Tue, 06 Jun 2023 23:01:53 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OJuj1zyBRLJeY8zMCoqAPIv0RL8VpnflUkzQYjBKgGU7+4yqVKQLl16dIIWwbn9WyE9jimBY5mf3NFzLelBvUoxF/KILC764WfALbkbf88IR71tbPlv4H03L8voy0fRmP+Cg8GhdyjycXNULiEpG1YgA6RtgghuU6HEsm87TmA80jNhHNv7WH6wMyXr4BLJjij/4fDkjjoZjRBNTKkNkLnOQoadWq/MtP/5uEXwBx3dyOBTPm+llLMaXIJC3MoPwnRdoqgdXKDbBx/52vjXwfPFjIbXOF1O4vQTkaOShx6CAdqKbC+IYVqDLukApf2Ss/2aTDNR5Cw25xvx8iWuozA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=J3u4TtVYHmKtL9NkCPYEMPusy4p1SnZZcy9j6YfhA98=; b=ig5/hNvUWHTwoH7jxBbj/ADEtVzu+HmCiVlTugJxiJdt291UDw4QDdwtOK2Ej7u49X+u3AuO+kbt68+AyAwaIUBGtDNH1jTZRQgd1vitjIIIcZtUdrHG3L2HoJ7bGXZ+CLwNgpLb8NFU72T6noW2S8YX8CcB6/0zTISDZJyTaFHJM35faqp6gqRGD6/Na4UFd11ZQHg9tOkcp2IjuZb17sb2LWcJnEeaZHbdGPgsPHxRdG+ry+wHEugqbVEk5LVJi1GjB2w0LoGuF9ljPGoWaDa/OJZpSWPOGEX0PVwmPlHiFWq2cgkn54sFQPL1u0s5orS2B2F+mzGReZ98Ic1AxA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=canonical.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=J3u4TtVYHmKtL9NkCPYEMPusy4p1SnZZcy9j6YfhA98=; b=gVDXIEWPXydOCvXgJVRRY2aeOU+XHB5IgsqjBUQvGVcAtpahOopaE3I8sZ2GgzmVuOTQPl5osz1a+DgX34UZUnKPQ71MQVOk6rdMLqRtmmWuwaUkNdv7y1/7rG+k8Bjz/+mr8syo7voEo/9du354eUucnPU5KVEzBUuCEKaJVplKIwCd3opuyujRTXLH/Q7IOTrgpb+Tx82NWtoTeYUETCM4rDTiPdTikhVNYoCEo/+DDCY19tYwiK809Kqb05FrSRFBdTXHnc1ls+hJbn9P7o4hr5+YxoyLpnZReHcSOgF3X/4Mfb4Cdsloz2xNkyzpTO7s8IVd6EI/joIrwEdJVw== Received: from MW3PR05CA0022.namprd05.prod.outlook.com (2603:10b6:303:2b::27) by PH7PR12MB7938.namprd12.prod.outlook.com (2603:10b6:510:276::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.32; Tue, 6 Jun 2023 23:01:49 +0000 Received: from MWH0EPF000971E5.namprd02.prod.outlook.com (2603:10b6:303:2b:cafe::4) by MW3PR05CA0022.outlook.office365.com (2603:10b6:303:2b::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6477.19 via Frontend Transport; Tue, 6 Jun 2023 23:01:49 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by MWH0EPF000971E5.mail.protection.outlook.com (10.167.243.73) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6477.13 via Frontend Transport; Tue, 6 Jun 2023 23:01:49 +0000 Received: from rnnvmail204.nvidia.com (10.129.68.6) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Tue, 6 Jun 2023 16:01:34 -0700 Received: from rnnvmail201.nvidia.com (10.129.68.8) by rnnvmail204.nvidia.com (10.129.68.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Tue, 6 Jun 2023 16:01:34 -0700 Received: from mtl123.mtl.labs.mlnx (10.127.8.10) by mail.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37 via Frontend Transport; Tue, 6 Jun 2023 16:01:34 -0700 Received: from sw-mtx-002.mtx.labs.mlnx (sw-mtx-002.mtx.labs.mlnx [10.9.151.106]) by mtl123.mtl.labs.mlnx (8.14.4/8.14.4) with ESMTP id 356N1LCS011133; Wed, 7 Jun 2023 02:01:31 +0300 From: William Tu <witu@nvidia.com> To: <kernel-team@lists.ubuntu.com> Subject: [SRU][J:linux-bluefield][PATCH v3 05/11] net/sched: flower: Support hardware miss to tc action Date: Wed, 7 Jun 2023 02:01:14 +0300 Message-ID: <20230606230120.407292-6-witu@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230606230120.407292-1-witu@nvidia.com> References: <20230606230120.407292-1-witu@nvidia.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000971E5:EE_|PH7PR12MB7938:EE_ X-MS-Office365-Filtering-Correlation-Id: f4a01f29-a600-4912-80af-08db66e2026c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Nq0YIp9TYr8XwUvV1HXPNrZk++9tEnkkIVkLDx+d3cc/AThf05FGcbESWeSCy3SUp8EuTBiUPlcl/J01LNERZpHl3yo2zREf0pUw1JJMh7Dq8fKJ0b3en8cLWxrcvPjynOi8lum6cqct8DVpNR04d8aOYZ7kCQ45Xy7jvOFxZZSinTpJGOmsEq9TGahdLC8rMhCRQdx6zt+X+8e27h+dbKHYiW03MXKhKTwgzEQghJSzxtZm+K+IrPbaqJYma1nom9Gtw3T026SkEHEu4lbPxtjQ+AmM3+Dkn8X2ClrPW2fm1MxD5F63XunVett26ovBcGSzKcanzc8s2ef8wOJ+HGb08fe3gjkSun7kvqjg9HikAlYos+SMyXikZmusS2Om7Dnnzjmq3QS+D4U7+xreVUgrPA6KCN0C2Xj2TJFxnjucuz1a/XkVBfkGMOWX4tlUuYyVwl0JAlIxltABju3Gh3E4SPLR90r3Wp/4v1fzBComdPfCjKJJDVy2hIVPHmXmTc2JdfWgPPUgrBvvzM8BjEfJ0ty/jhSgGJrRLfPRu2zlIio+CIdarfUnaFhQskjB/zTEMzG3DCIVOcRsV4xTVrKzCvxE09K4MBDlN5B/sX4dVje/dZysiAjkslAv0Hn4fniAQyQcG0Mlhfu++nv80nZkiC7U71VNXgC1/bi6VN5/3qEkomhfRNBRQi/ziKbENMBnEwaZN0THHKNIj+M/PsGHVRlbNPz5ie1vsenGzbWvYEX2RHC5v7OjIJ5nojoJItA/WrQRwUyd73eQYOQQYDt228vPZLbAvQowimklyqw= X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230028)(4636009)(376002)(39860400002)(346002)(396003)(136003)(451199021)(36840700001)(40470700004)(46966006)(2906002)(40460700003)(478600001)(36756003)(966005)(26005)(107886003)(6666004)(36860700001)(83380400001)(82310400005)(47076005)(2616005)(336012)(86362001)(356005)(82740400003)(7636003)(186003)(1076003)(40480700001)(316002)(5660300002)(8676002)(70586007)(8936002)(4326008)(6916009)(70206006)(54906003)(41300700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jun 2023 23:01:49.1270 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f4a01f29-a600-4912-80af-08db66e2026c X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: MWH0EPF000971E5.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB7938 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions <kernel-team.lists.ubuntu.com> List-Unsubscribe: <https://lists.ubuntu.com/mailman/options/kernel-team>, <mailto:kernel-team-request@lists.ubuntu.com?subject=unsubscribe> List-Archive: <https://lists.ubuntu.com/archives/kernel-team> List-Post: <mailto:kernel-team@lists.ubuntu.com> List-Help: <mailto:kernel-team-request@lists.ubuntu.com?subject=help> List-Subscribe: <https://lists.ubuntu.com/mailman/listinfo/kernel-team>, <mailto:kernel-team-request@lists.ubuntu.com?subject=subscribe> Cc: dann.frazier@canonical.com, paulb@nvidia.com, vlad@nvidia.com, yifeid@nvidia.com, bodong@nvidia.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" <kernel-team-bounces@lists.ubuntu.com> |
Series |
Support hardware miss to tc action
|
expand
|
diff --git a/net/sched/cls_flower.c b/net/sched/cls_flower.c index 83a55b00e800..29628ef80aef 100644 --- a/net/sched/cls_flower.c +++ b/net/sched/cls_flower.c @@ -535,6 +535,15 @@ static struct cls_fl_filter *__fl_get(struct cls_fl_head *head, u32 handle) return f; } +static struct tcf_exts *fl_get_exts(const struct tcf_proto *tp, u32 handle) +{ + struct cls_fl_head *head = rcu_dereference_bh(tp->root); + struct cls_fl_filter *f; + + f = idr_find(&head->handle_idr, handle); + return f ? &f->exts : NULL; +} + static int __fl_delete(struct tcf_proto *tp, struct cls_fl_filter *f, bool *last, bool rtnl_held, struct netlink_ext_ack *extack) @@ -2070,7 +2079,8 @@ static int fl_change(struct net *net, struct sk_buff *in_skb, } fnew->handle = handle; - err = tcf_exts_init(&fnew->exts, net, TCA_FLOWER_ACT, 0); + err = tcf_exts_init_ex(&fnew->exts, net, TCA_FLOWER_ACT, 0, tp, handle, + !tc_skip_hw(fnew->flags)); if (err < 0) goto errout_idr; @@ -3239,6 +3249,7 @@ static struct tcf_proto_ops cls_fl_ops __read_mostly = { .tmplt_create = fl_tmplt_create, .tmplt_destroy = fl_tmplt_destroy, .tmplt_dump = fl_tmplt_dump, + .get_exts = fl_get_exts, .owner = THIS_MODULE, .flags = TCF_PROTO_OPS_DOIT_UNLOCKED, };