From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 82DC2A0548; Thu, 4 Nov 2021 13:31:20 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 205F9411A4; Thu, 4 Nov 2021 13:31:19 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id A4E9241144 for ; Thu, 4 Nov 2021 13:31:16 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10157"; a="229152155" X-IronPort-AV: E=Sophos;i="5.87,208,1631602800"; d="scan'208";a="229152155" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Nov 2021 05:31:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,208,1631602800"; d="scan'208";a="450188020" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orsmga006.jf.intel.com with ESMTP; 04 Nov 2021 05:31:14 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Thu, 4 Nov 2021 05:31:14 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Thu, 4 Nov 2021 05:31:14 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.171) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Thu, 4 Nov 2021 05:31:12 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=A9B8oEs197FLzaLB8hsCMAKEWYBqR1S3e+oAlBuQf0u4+Ay+edg3/pAxYT2dPj2dPPBxRFtHYFLGHn6/X4H2MxDl823ultN14fLEtoMjueUGNJX3HAQgRnjfMpaWMte4y7gg4VZTBnM5Sb2iFOlTfLRDHSKUzUyBqK4qwOmJqV1e+10q9ehMj+VK4+lQjbPMcHhtMju6pDKZiDPfueq0LNwSI86/9TvsmcRp7O8fTkrlFgyRZdMBBippIZg558Al05hQ5i32cgvY3hjgYnrYU/lGr5DXa71BrxXJqTZg0gHos90sA7M0ww0PiVPDha+kJ6HPZKQzE4Dd1SmXrS2JxA== 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=GHi9DWvg6rSXXx3U+FYowl1awJjk8uCHngwx26ggc/o=; b=fOwO+sZY5EjnNQpKMPbaAolIlsLWmzjc4PMMom08zaAKS+XpFgUndDxc05vUQ15q5JFJYioof/bwjBfDjfEA2PAHaNcyyTjJTgVn/4pBmNU7TvriWQOPdrzd/0Uk9pqjrPr+Z7ukjoiYpOGXwuYkHkXPgsyGM6J08EzAWKjVlCmxOUSAeNemFqBqC0ThMQjC3+3V9cEHe/sIpBNQWVOg7VCvLd8K79HcGlVu2JWWaWTsGSrt8A02tF7K9TsntkqVnKTUzJZZZIwmhry7VGdvY4XssdLTGtrka/ndGpA9EBJI1XqfzeReFsSrDvgQrM4KBx0uRM3LTMb7ozeqdQmQHg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GHi9DWvg6rSXXx3U+FYowl1awJjk8uCHngwx26ggc/o=; b=keqfyJUivQFk/shgGuOYYNNFToCl5RImhW1jXU8ESe/hDiFNZokldAFgjrQi+2kJN+SOcxZ0Ovb8ZAYse2Lm9EWQvJhIIfN+uOhu5rsB4trFVdJ2L6QgMC11eUu3USGE3J4d1/e5x0hvbnST3Vel7K9bJ5WNmPkLBJX+kub1jng= Authentication-Results: nvidia.com; dkim=none (message not signed) header.d=none;nvidia.com; dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by PH0PR11MB5160.namprd11.prod.outlook.com (2603:10b6:510:3e::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.13; Thu, 4 Nov 2021 12:31:09 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bd7d:29be:3342:632c]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bd7d:29be:3342:632c%7]) with mapi id 15.20.4669.011; Thu, 4 Nov 2021 12:31:09 +0000 Message-ID: <7341638d-8682-8ebf-13b8-d57b7d938f4d@intel.com> Date: Thu, 4 Nov 2021 12:31:03 +0000 Content-Language: en-US To: Gregory Etelson , , CC: , Matan Azrad , Andrew Rybchenko References: <20211104122308.9327-1-getelson@nvidia.com> From: Ferruh Yigit X-User: ferruhy In-Reply-To: <20211104122308.9327-1-getelson@nvidia.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0351.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18d::14) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 Received: from [192.168.0.206] (37.228.236.146) by LO4P123CA0351.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18d::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.10 via Frontend Transport; Thu, 4 Nov 2021 12:31:08 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c53c4cfc-e876-42e3-68eb-08d99f8efb10 X-MS-TrafficTypeDiagnostic: PH0PR11MB5160: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6108; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: n0HjNAMo+Lk1M6YLk6HTWTUDJajnIep2z8p7Xt3rxt37ObVb6spGUuiCFgxpN1L9R1jGr9ONIUd0slFRmMqTH07oeeqJ1AFjvhyaZev4oIZVnm9BXl8cgJgZAoqP8WymuR82X4ZT4K/lNgDIbtzACgbMybQmeD/Qaz1lMO3fA/0H0bEEpauM6pbf/brjCPfyyJWJJO+LPVS3t25+iDRy9UM6tAjEQ6UiXIe+TLqULi5Q0qgtD/QGB4E0Mtb9Jv609Iv1RImbg04ob5qYRfRselxZPxLZeGJWbPd4tn7tcFZn94TzO3fNmV9Iw6twRQuIyqYE/GKH6aSW5Zw15qnj6S4lBWmlxM6OIkZNJfelJpzWYy43Ecr21nVthgF792FTE7P4wmT7kgCCl3gwIHAUrcmmH5UKZYHlz15SS5lToN1W9jxfSBpGtTVlz/e9WpU5H2QewjNjf9e7JBF2rc29vS0tPIfXrlDdUIcUBE4QbtGuExWQNDGVC9Mqm1MnRk0bN1m8Se4si36vpduNdc2A+ecx5Gxc4bgYKRa9V8R5jFVmhXQJpV9BR4gF17HVnR2hO8EnetI76JsBoPZGMTawkKQ9DOm1Wp3Whu6T2652YsNMFwspWHW2vKe+cweHyEGUV5/HvoOedgyDKz0LJDTsR1wlva2+jTuC2bJsSMLbTdNvnTwaa6EGIyeMa1JIAXpQQDWxTJLUWz++g5HPOpGvSw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5000.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(508600001)(44832011)(31696002)(53546011)(66476007)(2906002)(66556008)(956004)(8936002)(186003)(6486002)(26005)(8676002)(5660300002)(83380400001)(2616005)(36756003)(16576012)(38100700002)(82960400001)(6666004)(4326008)(31686004)(316002)(54906003)(86362001)(66946007)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?VlVFYW1GL3Bxc2lXR0NJa1hEZkR3ZlBzV3hGMjg3aFRFd3FRdndITEp5K0JX?= =?utf-8?B?Wit2N04zK0hlbGZ1WEhrcnlWdGVpWjhTUE9ZMXNLc0tBZ2ZXQ3hJVmNEM2VI?= =?utf-8?B?QkhPbW9weUEwMjlhVUp3bHN5THpBNE5BZytxVkp4RWxaWDNJQnBFQytFZWhr?= =?utf-8?B?MkpubG5SWnJ5OFB5R09yczNQYU80K3RBdURjMEY2cE8xNUxBWWF5bVArZlRZ?= =?utf-8?B?NEpPMHl4cUl0b0dRV0FvRDB4N3RGaVBObVJVdUVuVFoya2hMWndpbURJRndu?= =?utf-8?B?Uko4SHUyTFRDWStrZjJZQmFJTTB5TG8rVnFQcjFxUzgyaEg5WDB3OXRBQlFs?= =?utf-8?B?TFAzQ1ZtUmRKaW8wMVlVQVZQVENzd0ZHV3ZqKzVaMzdjcy9lUlI3N0ZsMlBZ?= =?utf-8?B?bklXeG9HbFV6T254ZE1sbUNJeGNLVXRiblA5V3o0WTl3cHcrVUZJRXVod25v?= =?utf-8?B?a0M0VW00M1hsQy8xaDRUZ005Qi9LeThJV2RMZTl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VE5oWlF5LzhmaVAwUkl0cU1NczJjM1F1UCtZUEtPMHYwMmpm?= =?utf-8?B?eFBJRldDZHE1WmtTeHVXTnJwQkcyalNwVGx0WTk1YXl6ZENZc3RHWG1HR3NM?= =?utf-8?B?eStBLzFza0p3M0dxN1VqUngxUi9sbC9NbzNFdUR3SFRhQ2VrcW95Sm95R0hi?= =?utf-8?B?eWtmRngzejU0N1BhamJZQUdmRG9Wb3lRMHJScXAvY0xqUlpCSjVVYmg2UURp?= =?utf-8?B?ZG5HbTNZbjhHcU5WZUNxLytYZmhobXVqdzZjOUNEMW5COCtDSzZOU2k5czZy?= =?utf-8?B?bnJ5R052dmV4anRkSXlFQU5PdCtSWmplc1FFdlBGOVVSU0dxVEcvckRJY2Vu?= =?utf-8?B?NXlnMXRmNzE1MXFIRVgvZURHRHE4ZnJzSGprUllHdG5GRVNqVWJnVE1OWWNt?= =?utf-8?B?cUFIdmFNNjlUU3NyUkMvNGVNYWh0WkFoMHZnSDFCSS9BRG40WEJCbU1qZHNW?= =?utf-8?B?SmkrMnpMOE02WVAwUVpZNFNBcUs2K3pYaTVmQzJZRVRLSksrUHpTb050c2Nx?= =?utf-8?B?OVlpOFQ3VnBKUWFGZS9JMEtDS0MyNFVRQ3pFZXY5U1J1RCtyOVVwVHBHdE80?= =?utf-8?B?czZnTU5oQlNLZEZDY3lMTkpzdWY1Ym1TWVVBRG8wMTNpQWg3ODNiRHlEQXRZ?= =?utf-8?B?aWczU3lKaTlZYThlMzhTVjB5TDBqdk9kdWJOcDlSQnRzQzRZUnJpcmRDU2JO?= =?utf-8?B?TkxQQ1hLSUVGOXVESWplS2VBcGk0Smc2NnN2NWs1eXJKdXgzSEpudWd5Z2FT?= =?utf-8?Q?Q642bKBF+jNMG0gDc5gSfiw=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: c53c4cfc-e876-42e3-68eb-08d99f8efb10 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Nov 2021 12:31:09.8095 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: arjmFEC8Mzpkjxn933KPqaJ0OyxeppJEmqEbWbwSJoQ20AwVLqtzHNc+QOfoiGvTKEC1MncoVN08cRbglAEjLQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5160 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix debug variable initialization X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 11/4/2021 12:23 PM, Gregory Etelson wrote: > Use `__rte_unused` macro to mask a debug variable instead of `#ifdef`. > This way, if the variable is used in a macro, it does not depend on > how the macro is expanded. > > Fixes: 91f0e029ce5f ("net/mlx5: translate flex item pattern into matcher") > Signed-off-by: Gregory Etelson > --- > drivers/net/mlx5/mlx5_flow_flex.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/net/mlx5/mlx5_flow_flex.c b/drivers/net/mlx5/mlx5_flow_flex.c > index bdfa383c45..be0f9821ce 100644 > --- a/drivers/net/mlx5/mlx5_flow_flex.c > +++ b/drivers/net/mlx5/mlx5_flow_flex.c > @@ -222,9 +222,7 @@ mlx5_flex_flow_translate_item(struct rte_eth_dev *dev, > const struct rte_flow_item *item, > bool is_inner) > { > -#ifdef RTE_LIBRTE_MLX5_DEBUG > - struct mlx5_priv *priv = dev->data->dev_private; > -#endif > + __rte_unused struct mlx5_priv *priv = dev->data->dev_private; Marking the variable as unused to silence compiler for some cases, but it is indeed used, what about something like this (inspired by sfc code): #if defined(RTE_LIBRTE_MLX5_DEBUG) || defined(RTE_ENABLE_ASSERT) struct mlx5_priv *priv = dev->data->dev_private; #endif > const struct rte_flow_item_flex *spec, *mask; > void *misc4_m = MLX5_ADDR_OF(fte_match_param, matcher, > misc_parameters_4); >