Message ID | 20230511173856.706923-5-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=q9tTf4Pn; 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 4QHK0G2C2Tz214S for <incoming@patchwork.ozlabs.org>; Fri, 12 May 2023 03:39:42 +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 1pxAGN-0005OG-CC; Thu, 11 May 2023 17:39:35 +0000 Received: from mail-bn8nam12on2057.outbound.protection.outlook.com ([40.107.237.57] helo=NAM12-BN8-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 1pxAGI-0005J0-HM for kernel-team@lists.ubuntu.com; Thu, 11 May 2023 17:39:30 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=joIBR81diirqvKpr9VPgjxot/+P08U41nHauIsASVBfZvgxov8qXVB3Cn6ZxVASEffEypxWugwE7PwT7wSzzVSVcyUVsuP5P13ScRIXg+9yQLsdBOGJ50oTG5PYKSNIS0lALCAHXjR0UMrjid6fWHB0IDuRjPpsomSboFmxbe6krQU3HH8OW+Xyhy7g+4qpPfmajOWD7YmyBHLZ9Qin/7Mk6Cxonc9fJbr6ODt9SfHm4ni520qUkpjv+DFCN1sIjpJvKx0Z0FM/+3wrfdC4glRpEJuBKwVZBt56A/MfHb2zh7LJLlCW8bfeSpSbWU9Qvt9lm8OvB/3DP3kSm+Wqv9Q== 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=UH3cllK555q/7yh7Iu2quB0S8XxIkfZMSfYiTek3wkk=; b=Pq6b3g+XVjDWZW9qSbIwqaC3d1EkR0zQSdPRWvH9XnUoM7wkOzkqT2ZQx6oY5E2GoYB49lidqVq13y4eupUPem2cMd40FD+6oej3kI8oGBygKu+jRLTYnKPKV/TCs6qpxMJtB8pClPZ5rqKNsKH9aCUkRf6vjiy3Qi04brSROdN1BATtLNyMPmiLSxHUABM/OBLkSnTlAd2E8As1bFyv7FR/SkQeBJnXZE3vKV2lSFcMQ4pRMkund/7teyX0KD+CHc4nKiN/o/7gyaJnw1JWLS4G7JY71j0WB9VVUJsAJCplpWLBrNMbAGZp/yZiIjSNhq7sh8hyOFUmoXXWwG4+Qw== 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=UH3cllK555q/7yh7Iu2quB0S8XxIkfZMSfYiTek3wkk=; b=q9tTf4Pn1xcU93UsrtxEiKKGIQThFm41ClGmD4P75SXB+DDr/qbWiBFu7h0WYIS1AzgWemkapUnLZKLbtgwD/MmPBsy/8jYW5W84tlWjtAIx0NcBF7A8eZ2ZK27lORe3oO+O1/aOQ15RHrlBDzayXv0TnYuv1yTQbkNAoXbD9mEVFlH4+rbf/CzOVdZB6OgU+hR0UFYaUtab9wO2k1Wfs/lRe7gB+QDdArV66q12hfp+XBJ+QNx1me3gkff0APAbZV/V38Eeei6yqhdhrQv+KcrOm09bK7MxNcC9s9VfMv9anXYSZkID+ulL1BcQfu9x6DIoigC3LsPztx7mLLmRJg== Received: from MWH0EPF00056D10.namprd21.prod.outlook.com (2603:10b6:30f:fff2:0:1:0:13) by BL1PR12MB5352.namprd12.prod.outlook.com (2603:10b6:208:314::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.18; Thu, 11 May 2023 17:39:27 +0000 Received: from CO1NAM11FT110.eop-nam11.prod.protection.outlook.com (2a01:111:f400:7eab::201) by MWH0EPF00056D10.outlook.office365.com (2603:1036:d20::b) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.6 via Frontend Transport; Thu, 11 May 2023 17:39:27 +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 CO1NAM11FT110.mail.protection.outlook.com (10.13.175.125) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.23 via Frontend Transport; Thu, 11 May 2023 17:39:27 +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; Thu, 11 May 2023 10:39:09 -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; Thu, 11 May 2023 10:39:09 -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; Thu, 11 May 2023 10:39:08 -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 34BHcvs8018109; Thu, 11 May 2023 20:39:05 +0300 From: William Tu <witu@nvidia.com> To: <kernel-team@lists.ubuntu.com> Subject: [SRU][J:linux-bluefield][PATCH v1 4/5] net/sched: flower: Support hardware miss to tc action Date: Thu, 11 May 2023 20:38:55 +0300 Message-ID: <20230511173856.706923-5-witu@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230511173856.706923-1-witu@nvidia.com> References: <20230511173856.706923-1-witu@nvidia.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT110:EE_|BL1PR12MB5352:EE_ X-MS-Office365-Filtering-Correlation-Id: 1213a1cb-3741-49c4-a36b-08db5246aaea X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: F5ycDRXhwfldj6sYL3jvSeEWLUc902LfXkUs9ba7y8B6hdORlkIaiASi2BP/k8mEBZ+/uv+BeQhzDl2Z1UhJSYXaBvP4cVbRwB4wXNRF8WBDCkTQusHGaARqIwrX5hmBKedmWf6C1aXzB1dFL1I4YPKgaZxjGkqs7Tfsz5shr41lc+WjD9rB+7cjVwWPCaGvOjrgp7VT13X/6p58Wwh0EKjTYENFciH1WWS2ub3ZgLxk64Y8GthY2juX1Q22TbTp2tQEUWJ2YecJRGDZ4Og36fFLy/7MRQD5brd7FfgWWHzsqnoT/JWD6NzHfTd8uUFOo8EHmXb0ncKWocsmk2AJdDMcqxLS9JwngDdqKYBrq2858ZKXZ/BFCUKFIzL6CKDd4Ttpdk0YTTuB6kOcxQTwyjMPzEajbto3zrbT+JNJwcrE3cuKoGBYl5GmHlNzWWvkdUciix5dhe08Ln2R65MlAEqVJUkEAREuabRQPQ14mrUPvj7deFnPh5upDyBoG3nDe0URUUO2WQDz2fCwht9Q5PysYAy6u1dvIWI5T+k6yiGsb5QZ4+/jaj921VsgPATACm+ZKpRkvgA8b6kTqLK38JAi/CuvxVh27pKhn9mtZDsh89vYQGy+MGrCMteUKbKwlHWZqfAv92f4GrOqO5250nKv3fEhFy9oXPHELrfuj84fcr3V7NhCZAfED1oJGo8Nr5BEXfQttmGb2T7OGKR8c1kIUDsHcxR0YOB+KVXMn9A3xokFLT8sCdfVm3oNjfa4ragoYnEukRExjXQv2pzwndw86daZ4GKm5yXXcsZoW/g= 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)(136003)(346002)(376002)(39860400002)(396003)(451199021)(36840700001)(40470700004)(46966006)(356005)(1076003)(26005)(82740400003)(336012)(86362001)(40480700001)(41300700001)(7636003)(2616005)(6666004)(47076005)(36756003)(82310400005)(966005)(186003)(83380400001)(107886003)(36860700001)(70586007)(70206006)(54906003)(478600001)(40460700003)(4326008)(6916009)(8936002)(316002)(8676002)(5660300002)(2906002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2023 17:39:27.0812 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1213a1cb-3741-49c4-a36b-08db5246aaea 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: CO1NAM11FT110.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5352 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 54228e684f86..311637e9e875 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) @@ -2067,7 +2076,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; @@ -3237,6 +3247,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, };