From patchwork Tue Jun 6 23:01:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Tu X-Patchwork-Id: 1791460 Return-Path: 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=) 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=HvZRHaPg; 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 4QbQwg2M61z20Q8 for ; Wed, 7 Jun 2023 09:02:27 +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 ) id 1q6fgy-0002aK-EU; Tue, 06 Jun 2023 23:02:20 +0000 Received: from mail-dm6nam12on2043.outbound.protection.outlook.com ([40.107.243.43] 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 ) id 1q6fgj-00026J-2I for kernel-team@lists.ubuntu.com; Tue, 06 Jun 2023 23:02:05 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L4OFNj5dMvajYDBQ2VW7NSTDATA5Oi0I2OSnoi0wn2GTT5SUClzqTNmOJRvP7t3CfwnmRN/HsbM+ZHPlmBQb0c38FPS7Yx6wCk6rEEdSbU1n0CVsDqdvzD4NJzNpmihbv3RfQtb+/LPihaG1GLXC4qorQzcHu4IJdEAro632iD7KhRpQaQhPzy+caTbArb5rz7Z7spMu5JUmTsjSD9D45jUj3WHQO/MslcaJBGB5o8msSfAe9YmoG0cQRVA+aNXzBvN1TBBLTqqzdIJTpjpIMa9Fr2YwRu2yd7EZD10lrpgGnCZkcOASVhEDEbPO42TF3hiM/vCdWwX9gRP7jkoDbg== 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=hgRnpDg/NtmlUtAr2WoS/vL2kGo4tsqnU3VW85TiLjQ=; b=kuuIoSfUrL49bL6NvCatoDhkRx2I7ofgYP7+/09wfoLUND8D5M9/HkwJqrESVyheTzTOYTC5AcoDzoZhGbXoeYLFhxrua2lkTGDGzWJqkbwrNMEUJEAJIee06sdoCa5NiS/7hLOiiHdV9vHBlWgUbXOAuvJip7uPQvRFvk0FLmjRxtPnbb909PMIcu8krvjOzUYs37r4Wn0GTrrPmeVFAIAzzSF5ElRW2+RZ/Xop4pAMaDgcGuoHVAhNB7r5OFCWHbfa+ZVl9+NDR6T9jhMu8fG1Ss85Lhhx20P8HgzcnWXKZGOtuiYwdSwLQwj/09EHFy2ho+byVibUWQok0obJYg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) 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=hgRnpDg/NtmlUtAr2WoS/vL2kGo4tsqnU3VW85TiLjQ=; b=HvZRHaPg/Xf025GGQmXH1ww6fg/vOOHP72qSNTM9L0Yg2Fw3NtI1izZIC2Gk2tFWaVQuLuoX0E5Aalkig2D8WxDL5+4o/Xqgfy2Fukz3HquiiJiqbK7aUT3VClcuBXCkxzbvvaS0/Im9C014FS2zX4JBZBHDScX9XSOr6+c/A/YLnuYryNhpU1dTifvxVc11bnDicR1IGOEro0YXtsYrpc8SNhjAbH+942sHhq/oA0MZ8rLPsux9YVltmQbCH6BdhNlRlx4Xq+nBUEwuYE73/BHiauH81a2mZ7eMiZj36J4N2tQc+rBJfoRoeDJRDkuDcATlgbj2ptPXi+udycBW4w== Received: from DM6PR12CA0034.namprd12.prod.outlook.com (2603:10b6:5:1c0::47) by DS7PR12MB5981.namprd12.prod.outlook.com (2603:10b6:8:7c::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6477.19; Tue, 6 Jun 2023 23:02:00 +0000 Received: from CY4PEPF0000EE37.namprd05.prod.outlook.com (2603:10b6:5:1c0:cafe::61) by DM6PR12CA0034.outlook.office365.com (2603:10b6:5:1c0::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.33 via Frontend Transport; Tue, 6 Jun 2023 23:02:00 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) 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.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CY4PEPF0000EE37.mail.protection.outlook.com (10.167.242.43) 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:02:00 +0000 Received: from rnnvmail204.nvidia.com (10.129.68.6) by mail.nvidia.com (10.129.200.67) 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:45 -0700 Received: from rnnvmail202.nvidia.com (10.129.68.7) 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:45 -0700 Received: from mtl123.mtl.labs.mlnx (10.127.8.10) by mail.nvidia.com (10.129.68.7) 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:44 -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 356N1LCY011133; Wed, 7 Jun 2023 02:01:41 +0300 From: William Tu To: Subject: [SRU][J:linux-bluefield][PATCH v3 11/11] net/sched: cls_api: Move call to tcf_exts_miss_cookie_base_destroy() Date: Wed, 7 Jun 2023 02:01:20 +0300 Message-ID: <20230606230120.407292-12-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: CY4PEPF0000EE37:EE_|DS7PR12MB5981:EE_ X-MS-Office365-Filtering-Correlation-Id: b40973e2-0358-4d45-ea85-08db66e20913 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2QgcPwD8diKE4ErZLCZ6NVYbVn0totv47IYjaoIpPVOgJKZyYicL+RtEWMAX/j6yMP+Edn3IWwPZqcM5CgOU7q62bAdrGMIC2gfG1+kaV+O6X8Bs6gFPtmgWvHro39SNQb6xGblG07/NHLZ9MBWCFueiqyeyjzScelj7dccZ4RoUXQbquhKVfcgiJtpqjOgz1v4LjBXGkKutjQ23A4FyRNgEqRND0Rotl7jyiaGMTEMzNbyUNuI1axpsocsCCGnvpQR5c7IgzBjygpBheWxeI1Mh21/xsvl3HCLCAEkoOaLXa7VyDKLhQgG//qna6HBMw/m8Uywvxz7ykZmKzieAlUrQKn4+E6R3cR1hEleem9tZUbral/wz1Q65tybxXVHGBZgLmiNWT+kM4cLYw6A45YScCKx0uyuGPL7ZapWbDeVjUGRrIIJTLPOaraMYNsF08Z44x63jB2r19sGAHtkDuJo5tJLUj5iWHe7QR00Y2vs1771h80L2stdayw8YaYUsxCwsU/7HIYn45qFrv0OZnlFdNbZsAjw2sKqMhW+KpSwJYP1TuKvFNUxsOKyaq527KPHQBNHcpusqKhmpH9ILFM6Ahn3Mept8I8bf0YiA+aIAUubeF1dWGpExwLqqibPmPnKw+OQXlJkX0hCjR5Rvpystt8UUmu+EjQscWUDsRicRxBJFZS8DQ0faLznDCJQfNwo5z3s98W4tJjl+tXz6xpISTN35qcPao8g3mpSp6KJTOCtnMFyASh+Si1ApHNTI/b+7zjfixFhckvwovDCtRpQ68Mf7FEKWjZs8ML7zdcg= X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230028)(4636009)(396003)(39860400002)(376002)(136003)(346002)(451199021)(36840700001)(40470700004)(46966006)(36860700001)(186003)(83380400001)(478600001)(6666004)(1076003)(26005)(47076005)(2616005)(336012)(40460700003)(107886003)(86362001)(316002)(4326008)(7636003)(70586007)(70206006)(6916009)(82740400003)(5660300002)(36756003)(356005)(40480700001)(2906002)(966005)(41300700001)(8676002)(8936002)(82310400005)(54906003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jun 2023 23:02:00.2593 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b40973e2-0358-4d45-ea85-08db66e20913 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.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000EE37.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB5981 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dann.frazier@canonical.com, paulb@nvidia.com, vlad@nvidia.com, yifeid@nvidia.com, bodong@nvidia.com Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Nathan Chancellor BugLink: https://bugs.launchpad.net/bugs/2012571 When CONFIG_NET_CLS_ACT is disabled: ../net/sched/cls_api.c:141:13: warning: 'tcf_exts_miss_cookie_base_destroy' defined but not used [-Wunused-function] 141 | static void tcf_exts_miss_cookie_base_destroy(struct tcf_exts *exts) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Due to the way the code is structured, it is possible for a definition of tcf_exts_miss_cookie_base_destroy() to be present without actually being used. Its single callsite is in an '#ifdef CONFIG_NET_CLS_ACT' block but a definition will always be present in the file. The version of tcf_exts_miss_cookie_base_destroy() that actually does something depends on CONFIG_NET_TC_SKB_EXT, so the stub function is used in both CONFIG_NET_CLS_ACT=n and CONFIG_NET_CLS_ACT=y + CONFIG_NET_TC_SKB_EXT=n configurations. Move the call to tcf_exts_miss_cookie_base_destroy() in tcf_exts_destroy() out of the '#ifdef CONFIG_NET_CLS_ACT', so that it always appears used to the compiler, while not changing any behavior with any of the various configuration combinations. Fixes: 80cd22c35c90 ("net/sched: cls_api: Support hardware miss to tc action") Signed-off-by: Nathan Chancellor Reviewed-by: Simon Horman Signed-off-by: David S. Miller (cherry picked from commit 37e1f3acc339b28493eb3dad571c3f01b6af86f6) Signed-off-by: William Tu --- net/sched/cls_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index c5b2a45abe18..1637529a6cbf 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c @@ -3211,9 +3211,9 @@ EXPORT_SYMBOL(tcf_exts_init_ex); void tcf_exts_destroy(struct tcf_exts *exts) { -#ifdef CONFIG_NET_CLS_ACT tcf_exts_miss_cookie_base_destroy(exts); +#ifdef CONFIG_NET_CLS_ACT if (exts->actions) { tcf_action_destroy(exts->actions, TCA_ACT_UNBIND); kfree(exts->actions);