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 74B60A0C43; Tue, 19 Oct 2021 14:11:46 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 59E11410FA; Tue, 19 Oct 2021 14:11:46 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 438ED410F4; Tue, 19 Oct 2021 14:11:44 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10141"; a="215415620" X-IronPort-AV: E=Sophos;i="5.85,384,1624345200"; d="scan'208";a="215415620" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Oct 2021 05:11:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,384,1624345200"; d="scan'208";a="720030359" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmsmga005.fm.intel.com with ESMTP; 19 Oct 2021 05:11:42 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Tue, 19 Oct 2021 05:11:42 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Tue, 19 Oct 2021 05:11:42 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.173) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Tue, 19 Oct 2021 05:11:41 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ICrWr7FqW06mIxcQxeuDmE/LsxxMjZtrWIH3BZTBsEZagEq5Hr/YeX9ThQQQg5Rchhj6tbeuGO/9BULtLNrSFBtpfVp2lloCaFMFoec0+gce9rg5OALOn/8YVD8SodxR++rGwYg3tgDQ9CtkDhIQR7UBYjcuz2QFD3O2I88OTvctxdkStfPG0qwBO8nxsVbZ0hvp+YpibsrHusOszH/breBLnFEs64YMyNE9jF6wjyoS05NSSmkbyzfTI1wjKwvsW9KtBw+5RbDi86itruwsFXaadeor0fVCcoYT1wQtrsuU3zBmMSA7qAMOaQRdSiEzAi+UprgD5FtqJacgzejOwg== 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=4hhF2hWF+wZ+8f+QGZimilLksqnKL4aWGfeAjwWoack=; b=ObLEYzXfX4cT9JSR7nsRYaAax3PoobknfA/xHjjgTWWcGzkoxI4d1H9PS16u6K1fDGPND9NTaRGymW0AF+V8MXMmr0XWg3ltFbXAxkmerG8L7ixyQdrwjFE2f9m1tpoFf7qPElReBr3IJY1hy1cjJZuw8JBYt1fXWesTQ9w30XVkMdmRddwY5zafaTbL18V+FoNM+nmgfAQnpYKnT9RQlAUGQDXfHHVG/B87kmucXU61yA41QzDTlbBaJjWwraJGVIC+QIjmNjuk8JXyC28hg0xYIvYC3zRnsZU1ewla+b5TwH0ZJudlxL7k6UhqNuVzXlEJnl+nSimV2jvN8moVaQ== 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=4hhF2hWF+wZ+8f+QGZimilLksqnKL4aWGfeAjwWoack=; b=SoCOH7E04sNWJKYbjtxsIfvaEA95f8IfLCu6n3TlS/g38930iQTINRjmMcQN9/vaMJp5sTBHoBs0zysQegkCRrdY05yQpkQFNPPdbjIZbeOpcR+7/EvNxv+yzTXhYaHsp4aBFVlRcnFX5jtuDjcVZF1wuUlzDsLjcsWZTpscKmk= Received: from DM8PR11MB5591.namprd11.prod.outlook.com (2603:10b6:8:38::23) by DM8PR11MB5589.namprd11.prod.outlook.com (2603:10b6:8:26::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.15; Tue, 19 Oct 2021 12:11:41 +0000 Received: from DM8PR11MB5591.namprd11.prod.outlook.com ([fe80::3d47:b590:aa2a:d5cc]) by DM8PR11MB5591.namprd11.prod.outlook.com ([fe80::3d47:b590:aa2a:d5cc%9]) with mapi id 15.20.4608.018; Tue, 19 Oct 2021 12:11:41 +0000 From: "Peng, ZhihongX" To: "Dumitrescu, Cristian" , "david.marchand@redhat.com" , "Burakov, Anatoly" , "Ananyev, Konstantin" , "stephen@networkplumber.org" , "Mcnamara, John" CC: "dev@dpdk.org" , "Lin, Xueqin" , "stable@dpdk.org" Thread-Topic: [PATCH v10 3/4] pipeline: Fix compilation error with gcc ASan Thread-Index: AQHXwdb4MCLzvrSLWE2rXVTEXkKXIqvYscmAgAAE9PCAAX3ZAIAADF6A Date: Tue, 19 Oct 2021 12:11:41 +0000 Message-ID: References: <20211012094318.1154727-3-zhihongx.peng@intel.com> <20211015151110.1876850-1-zhihongx.peng@intel.com> <20211015151110.1876850-3-zhihongx.peng@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.6.200.16 dlp-product: dlpe-windows authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 2942f0f0-d047-4790-1458-08d992f99c17 x-ms-traffictypediagnostic: DM8PR11MB5589: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: vuW5KH7lnJd5ATFirklb4IsR2eJjnSd6Xk1KHVIT2nLz3W0tbumySvIqfK/HVKL/QWqFKJU5vNWBN2LBH2vEezzinir8JteAxSwhIVy3TbR2Bj24tN9d2ffHOzRFj7qMD/DnOhH0u0LMM/0EzZzp8ggbLQJ+71lD4k1rOsryXPxjeSRlYAtdVG6T88RTJVi9XSO1GWE+sMhkvzGaIpXI+qL3dhe13AAx7d0sJEHdX2OQZha1bgqWdhvJpylBn7wEbWgQ+9NSYZrMD+o4AKdfDVSwjeVvEn7hou34WcWK048IpZe3i3whvUn1K+cVqMw1goVdOhWL+qdO94SzBU3Q8e/WktJtXqzoJNacETvAL8e/I9DqcfMKAwufgOU6KbDe8WwYgebIubMAJcTb1eH6sVvKnxM8RozIOw1oJ2hDFc5bAemiHp1wW8cDE/r0x2vKEOCawi3CbPG+53pdtd75qSbEysp+rbX1vW9acEtdZfMsJoUDh88Pg8fQnnnnZvO+AXvXnT64zN+y2wQPaSThQTuScfErNO39qOErr7ZXtOz+OmA/uTqNTNe0+aJjdDnI9usCx5xTIRLQNc/m9iN7Ry0YzW2Wx7xWMy0p4GJNrZHXcCT2fHqMgvRmYzpYegQ1ENihHkcXCGW5ctttWdhSrYLNDB2t8gr80BrKePY10UJkp2iSqyRFbGIz+SL9tQksJg4nn+f+QzcTHlJGI3j7aq9FfBj2ZjFbvGo1dkbH270= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM8PR11MB5591.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(8676002)(6506007)(508600001)(110136005)(8936002)(54906003)(7696005)(9686003)(921005)(122000001)(86362001)(316002)(6636002)(71200400001)(5660300002)(2906002)(38070700005)(55016002)(82960400001)(64756008)(66446008)(38100700002)(4326008)(66556008)(76116006)(66946007)(66476007)(53546011)(186003)(33656002)(52536014)(83380400001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?6jpKiu8ZpdMB1hc5mt9V8PcJPmEonu37Eimb/04nvTsMtTiI6evbovbuC0f/?= =?us-ascii?Q?YdWkNUfxAWGaglF4PAHHkAb46qq+J+85QYdwR1lO2xK5tJsHzV8EBcGyqAa8?= =?us-ascii?Q?ov7x5i0kmPlA5gQ9PrCmXBScSaQFQYKkJ8XQj1lHUvNpQ5gMTGWOdQRDeGpz?= =?us-ascii?Q?pGJn4TQRFQ3b77FR8HlknPFg/xqR9Nr6lJrZE6QB9gl4uiJ5TzeAS8YlcZbA?= =?us-ascii?Q?LZwtu8WN8qyTQ2J2kN2pPhLMtQ/J5UWe3ea8mDDj7tklnF444zO+yzHyUT8r?= =?us-ascii?Q?ToPN9MDTnvaDfbRtEYDRF4s2IjzyrEXDUQ1yl64fjmEcXW/R/nV+FlRBmkk0?= =?us-ascii?Q?OlRBhwbjz5LGn+S7n/CoxvjSZ+/gbApUu+e+fQBSuU2HgjzscGBbgUO9MWWJ?= =?us-ascii?Q?htbfRJXS673yuK5wkQWzdG8W83xa4Ldar1/28HP5+uyECFH9IJyqidypVHlp?= =?us-ascii?Q?QGj4XHKfVF0DTLaiNrrK3oo/5K85rsZ+pKHQPMFrXfwd/Rx8+jVhIs8XVSz1?= =?us-ascii?Q?azzyggpCfVnywbLD8FgkAeLdsBEuGxqHVG1LbPYFR/k6rAVZs8v7UmRH9pKB?= =?us-ascii?Q?I258LwI1a7lmliQ9M0V+MIMtunk24M7tMNtD89PJwSBuKn9fnE/eZRSKZvqZ?= =?us-ascii?Q?sEcyM3ugqmxAdKiA6TfLIOSnTsm0hX3Zri0KRWHlXhWpaOiaVcKGeFchh2OA?= =?us-ascii?Q?jXnsRQG7F3BIfSqF4xdQhFFbgKX26S7g1GOqicwBEYTYPtLvdE762PJQHdnx?= =?us-ascii?Q?lugp7pssj+Mh24znKJRW3a1/SPPuZdLt4WCk+SPbnkWCJK8hnyrb48PtIHny?= =?us-ascii?Q?J72vze6y7uc9deQnPYp8nEMH6pxpFsDKajZy1/c+2m6bI3RPWIuAu0rekr9+?= =?us-ascii?Q?szge5F0mig9If74v3X/Srr7/f1xaWCsiUOTyIfFdCCmMQDPVUtqUuks1XJLB?= =?us-ascii?Q?l2r9DJAe/5k/UZ3iK+XWdLoPhNYliT0LBhfALV/P3sAjmaNBmv8OKtyZZsbg?= =?us-ascii?Q?eq3/Ja+5VYWi979sjlGUgaoTBvwBriU3SE22vFaFs8Vywqj4pR7cq5iY8dhZ?= =?us-ascii?Q?aPeOGCB61EYlaNPq1jNrn9XWcdrzkW34DK/X623Pq5UI3D31/GKPPN3WZNlf?= =?us-ascii?Q?VxuUjt6utMMsV+UOGTsZAhwJbAeSZSnxshmp8ajfpFCubIXvgRa8t001jKpI?= =?us-ascii?Q?7oUqcZ6l2zmL+fyuxJw9fpuyVEslUdW0MbaUVAk6PxX9ZcxWE804QP9CtPzK?= =?us-ascii?Q?1DY8h2oYA2+yK601V5hH88zWUCC8GH+FIiCIVsq3q53pgbU4cCDLcOLEh/eY?= =?us-ascii?Q?iZZC+R/XGGRhAt7vTTdScdGD2vyEs+QyM/7mYVkB/OrSb5zWL1WOw3s/3v45?= =?us-ascii?Q?UoLYj5Eemcu7y2un450W0Ffdb93v?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM8PR11MB5591.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2942f0f0-d047-4790-1458-08d992f99c17 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Oct 2021 12:11:41.1641 (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: xMzCPaL3k8c/WnvWZObslYN6bv9Tm0uXkgJwx3eEK0r7e8fZoxfKNTKXlaJrIWKhtnFomWt6z5a8QSAVL2+QHw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM8PR11MB5589 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v10 3/4] pipeline: Fix compilation error with gcc ASan 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" > -----Original Message----- > From: Dumitrescu, Cristian > Sent: Tuesday, October 19, 2021 7:26 PM > To: Peng, ZhihongX ; > david.marchand@redhat.com; Burakov, Anatoly > ; Ananyev, Konstantin > ; stephen@networkplumber.org; > Mcnamara, John > Cc: dev@dpdk.org; Lin, Xueqin ; stable@dpdk.org > Subject: RE: [PATCH v10 3/4] pipeline: Fix compilation error with gcc ASa= n >=20 >=20 >=20 > > -----Original Message----- > > From: Peng, ZhihongX > > Sent: Monday, October 18, 2021 1:55 PM > > To: Dumitrescu, Cristian ; > > david.marchand@redhat.com; Burakov, Anatoly > > ; Ananyev, Konstantin > > ; stephen@networkplumber.org; > Mcnamara, > > John > > Cc: dev@dpdk.org; Lin, Xueqin ; stable@dpdk.org > > Subject: RE: [PATCH v10 3/4] pipeline: Fix compilation error with gcc > > ASan > > > > > -----Original Message----- > > > From: Dumitrescu, Cristian > > > Sent: Monday, October 18, 2021 8:22 PM > > > To: Peng, ZhihongX ; > > > david.marchand@redhat.com; Burakov, Anatoly > > > ; Ananyev, Konstantin > > > ; stephen@networkplumber.org; > > > Mcnamara, John > > > Cc: dev@dpdk.org; Lin, Xueqin ; > > > stable@dpdk.org > > > Subject: RE: [PATCH v10 3/4] pipeline: Fix compilation error with > > > gcc ASan > > > > > > > > > > > > > -----Original Message----- > > > > From: Peng, ZhihongX > > > > Sent: Friday, October 15, 2021 4:11 PM > > > > To: david.marchand@redhat.com; Burakov, Anatoly > > > > ; Ananyev, Konstantin > > > > ; stephen@networkplumber.org; > > > > Dumitrescu, Cristian ; Mcnamara, > > > > John > > > > Cc: dev@dpdk.org; Lin, Xueqin ; Peng, > > > > ZhihongX ; stable@dpdk.org > > > > Subject: [PATCH v10 3/4] pipeline: Fix compilation error with gcc > > > > ASan > > > > > > > > From: Zhihong Peng > > > > > > > > The gcc will check code more stricter when ASan enabled. > > > > "Control reaches end of non-void function" error occurs here. > > > > > > > > Fixes: f38913b7fb8e ("pipeline: add meter array to SWX") > > > > Cc: stable@dpdk.org > > > > > > > > Signed-off-by: Xueqin Lin > > > > Signed-off-by: Zhihong Peng > > > > --- > > > > v7: no change > > > > v8: no change > > > > v9: Modify the submit log > > > > v10:no change > > > > --- > > > > lib/pipeline/rte_swx_pipeline.c | 4 ++-- > > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > > > diff --git a/lib/pipeline/rte_swx_pipeline.c > > > > b/lib/pipeline/rte_swx_pipeline.c index 1cd09a4b44..0acd6c6752 > > > > 100644 > > > > --- a/lib/pipeline/rte_swx_pipeline.c > > > > +++ b/lib/pipeline/rte_swx_pipeline.c > > > > @@ -4642,7 +4642,7 @@ instr_meter_translate(struct > > > > rte_swx_pipeline > > *p, > > > > return 0; > > > > } > > > > > > > > - CHECK(0, EINVAL); > > > > + return -EINVAL; > > > > } > > > > > > > > static inline void > > > > @@ -5937,7 +5937,7 @@ instr_translate(struct rte_swx_pipeline *p, > > > > instr, > > > > data); > > > > > > > > - CHECK(0, EINVAL); > > > > + return -EINVAL; > > > > } > > > > > > > > static struct instruction_data * > > > > -- > > > > 2.25.1 > > > > > > NACK. > > > > > > This is a false issue, no bug is here. CHECK(0, EINVAL) translates > > > to an unconditional return -EINVAL. > > > Does this tool work correctly when macros are present? Maybe the > > > tool should parse the preprocessed C code as opposed to initial C cod= e? > > > > Yes, this is not a bug, it just solves the problem that cannot be > > passed after adding the asan compiler option. > > Only part of the macro reports errors, which may be caused by the tool > > itself, but this tool is part of gcc and clang, so we still have to > > make the code not report errors. > > > Regards, > > > Cristian >=20 > Hi Zhihong, >=20 > If this is not a bug in the pipeline library, why then does your patch ha= s fix in > the tile, has the Fixes label and CC-es stable@dpdk.org? Please remove an= d > rephrase accordingly. >=20 > I agree this is not a bug, and based on your statements I understand this= is a > sort of issue or limitation with the tool . I would prefer we fix the too= l rather > than fixing correct code in order to please the tool. This is likely not = going to > be an isolated case, but a recurring issue. >=20 > Hence, I am reluctantly OK to ack this patch in order to allow the tool i= n (after > the "fix" claim is removed), hopefully the tool will prove its benefit to= DPDK. ok, I will delete it. > Regards, > Cristian