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 ACCAF42A5B; Thu, 4 May 2023 10:36:32 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 493EC41144; Thu, 4 May 2023 10:36:32 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id B2463410DC; Thu, 4 May 2023 10:36:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1683189391; x=1714725391; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=sAkJIZU8zyCYQuTgxR6URfs2gIWBhh/ObQA+Y1gNIEc=; b=knfjCeBQ06GvEAB5qz82xoy7+X2ifo6C70EgmqckjCODzqU9r61zEd37 4M6dM6cMfaoaeiuOp3eGsP2FQekkGHkzwwkAQfdNMPAeO7PseEJ8V8CtD +2PErsru/icAGOygFGkFapt90E/cs5o9NOcKZ4cdtC7AO/2AwQnkMg7xw hdWXO/I6RkiZCsGZC/YIFqvlfZU/hbWvBnIY8YsskvR72gLYcAwd1Crc5 omSgE++88GgHWw3vGYdLqzofEGx3tD0KWQGMqLrcnty8gCpLVpnC9eLwh DQekoO0JlzNrWvAlBIU6VnvIpN+5YQZBRJV9vkFsuA8uOyldjLmglN6cz A==; X-IronPort-AV: E=McAfee;i="6600,9927,10699"; a="351861909" X-IronPort-AV: E=Sophos;i="5.99,249,1677571200"; d="scan'208";a="351861909" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 May 2023 01:36:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10699"; a="727489112" X-IronPort-AV: E=Sophos;i="5.99,249,1677571200"; d="scan'208";a="727489112" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orsmga008.jf.intel.com with ESMTP; 04 May 2023 01:36:11 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) 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.2507.23; Thu, 4 May 2023 01:36:11 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Thu, 4 May 2023 01:36:10 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) 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.2507.23 via Frontend Transport; Thu, 4 May 2023 01:36:10 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.176) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.23; Thu, 4 May 2023 01:36:10 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q29rsX6HT95dnT9kzdxqV4+djvXMx1AwVUmQFuQXqK8idaEH9sEDHEgwWDet5wNT3moGBPdgobmq0v1iOXBSBDA2FTutUjuX5QL5uLew9nLfmv83Nxqq1FCyMs7dEAj2gNJWW+C2oU658dkNPxdVDBJmshNg65A9hshu2h2mKV22PWnRmTwfuAwdD/4DtE1ebWYH7fd3IfowvvhTnUmPMlW55dTRohXrMsBH7ngacjN2H7VzlR8LiWZGemI8dw9zwaIFWQ0mxTc8Sk6gnC+YuGmA4b7EW6to/+O5BMEALZuyzkypTIyQ54BWpVPfpDnOK8VCBDE0d/feQuTdCEqGSw== 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=qbaaS0aY516pZRO/K7AVyKzcFd/Zl7U8U2yIFfMopaw=; b=EMKm1vColVEfLQMpCCVzYOK/16pl+5jxovJpMiq05XMjopFt23pSs0p3MaUXbYtFmWiEN0veOSYMLGAvJWUXmnV4LT3BGytfU/0nru3jZE5UcaPmGOLUEOpzBA1DbruDvHXU7Jr6my1U/5FX2/+gnVLeJWyq0wG0UgBXJvLOwSeW8tQRbm/qBgoLPvPpVZ15f+stZkOBw6mjvtYZTpCacve41Eber8eFuBk7pdS/Jsns4wPLflfHuGJqUPK8hXxUyIw/IyPSNO4pe9Z/PVoBqn4PWSzOAav1ir1ouSOq7ZTjlmPqfEbmjWRBiOwjVVxTXakRNUKW8VeYT/bTJQRBgg== 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 Received: from DM6PR11MB3723.namprd11.prod.outlook.com (2603:10b6:5:13f::25) by SA3PR11MB7464.namprd11.prod.outlook.com (2603:10b6:806:31b::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.22; Thu, 4 May 2023 08:36:08 +0000 Received: from DM6PR11MB3723.namprd11.prod.outlook.com ([fe80::9ab5:d9eb:bfeb:6d28]) by DM6PR11MB3723.namprd11.prod.outlook.com ([fe80::9ab5:d9eb:bfeb:6d28%6]) with mapi id 15.20.6363.026; Thu, 4 May 2023 08:36:08 +0000 From: "Guo, Junfeng" To: "jerinj@marvell.com" , "dev@dpdk.org" , "Wu, Jingjing" , "Li, Xiaoyun" CC: "thomas@monjalon.net" , "david.marchand@redhat.com" , "ferruh.yigit@xilinx.com" , "stephen@networkplumber.org" , "stable@dpdk.org" Subject: RE: [dpdk-dev] [PATCH v1] examples/ntb: fix build issue with GCC 13 Thread-Topic: [dpdk-dev] [PATCH v1] examples/ntb: fix build issue with GCC 13 Thread-Index: AQHZfP0rX2F8kNUMuk2YJDLyB7sg7K9JygPw Date: Thu, 4 May 2023 08:36:08 +0000 Message-ID: References: <20230502135045.3541570-1-jerinj@marvell.com> <20230502135045.3541570-2-jerinj@marvell.com> In-Reply-To: <20230502135045.3541570-2-jerinj@marvell.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM6PR11MB3723:EE_|SA3PR11MB7464:EE_ x-ms-office365-filtering-correlation-id: bd1ebe09-ac88-4c24-f9a9-08db4c7a9b8e x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: z+J/Cq15tY+fMQBnydGxBaQhsw7XNvFvOsuDNJMLAecsq4ib3APjlpzKz04vEWAXlDKuj4p27BjsL3iRcG1fB6kxl7BZJTnElyChxX+zluOggKKvaaK4ZDNHPMcDEwTC6SeIyEfxFpB2GHSPewZJksQ/odjDleUWoq7vVQg+NhbS9sNboTFc8654MTJLVXXyPIO4ULCoquJwlJX4sSHNZQhBmxC2N9L/E2d38EAIkAX3JBJfLFdk39K1noUczVu3BDv41kbpyqLY2avETV893OtPFrkOlueWMEeXYJWlkZQJX2BD9fbdaIJBa6+35AoPhIYYZc64sKS8l6OfPAFxi3yh3+OAgqRFLsjFHvQdGr+4HYR+5qLaZAeUw5dU4apcIATugYAmztW41b4NpEbNVHM+Mep1M6032//I5SS70JkgiSAc0xTHVXVOeIgTsWz9CzuSDw1OG3TlHktDa5V9qn2XcL2iL/FXJr9xsqIlwX2T3MJKM7jxu9EoNykDqDjCRzWQsvjH84n5GxxF/7BjJOBF2OHZx1AZ7wAwrQMV5QI6tXumtpV3EK9cAPSE2UNJatu3EoTIf2sgfosLk9dLUIKXeGBlSyQdBqk5a0MhTiKlc2e7AcsUQlhtb40EfBYy x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB3723.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(346002)(366004)(376002)(136003)(396003)(39860400002)(451199021)(2906002)(5660300002)(52536014)(33656002)(8676002)(8936002)(76116006)(64756008)(66476007)(66946007)(110136005)(66556008)(66446008)(316002)(478600001)(55016003)(54906003)(86362001)(6636002)(4326008)(41300700001)(71200400001)(82960400001)(122000001)(38070700005)(38100700002)(53546011)(186003)(6506007)(7696005)(83380400001)(9686003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?fkWjlu6ajZ+qNE83VXFZOvX8MzWMMFkKxm5mk/8uwVvwbud/GY/mKWwb+Ml/?= =?us-ascii?Q?YL3pNagRK//94oMC4FT8mrRlEBBwq490x0CfuFL5FyYOAgliFaWyENy8vLTO?= =?us-ascii?Q?rD9mi/Z/I/LEtWNP2gHevJOqDCHx9gQxpR5EwVBXvpj4LvZGqawHLhNS4DqU?= =?us-ascii?Q?EG+oBqS0QQfXPrwMw6rVtjZazOJ2PYl9EQ1ZCrToiZcmJ2Fx3DHVccxCLELn?= =?us-ascii?Q?z1ZJijfQjKr5PfCy/mX60q5aDQYrrVN2F05385V/H3z+Pr2ASqyOpmxuLWqD?= =?us-ascii?Q?6jTuhY2m+Mb9B/KzlEFJJ4etyF98OWYWLSJ820fi7owEVT9agLAhCr5HnEwM?= =?us-ascii?Q?Gf3Yn0iUfIWEoCxK0NT0d1fGf1zJLLY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yfBUQfhQ+fmMdIS5QeKHJjx8QgO97FM1/pzQqSxw1f3Wm5aYbJMC12?= =?us-ascii?Q?xW0UjlYGgtWr+xyJiqe8DGJbiUQbk4GfrqPQpwtjcXSromcCuOGTNTZhtTV0?= =?us-ascii?Q?q1FAXpi0ugMzIf33Okv5orVfXV0WLFWSkKe92licrQomeFWGQBUBWZWEDZYn?= =?us-ascii?Q?7Tc5TCSyI+XtM6eDmnPn1Zp3+y4qj10yb1zP5HP4uRVtDX4SEkWZLrDrx74t?= =?us-ascii?Q?BbjYz7uracHaavecMl+REJicu0iqrSq3+faRcJFsKb2DZOgtSHnkkvRDQQ?= =?us-ascii?Q?=3D=3D?= 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: DM6PR11MB3723.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: bd1ebe09-ac88-4c24-f9a9-08db4c7a9b8e X-MS-Exchange-CrossTenant-originalarrivaltime: 04 May 2023 08:36:08.2281 (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: Gp31j1Ortq5KZ2XdjKDUezy4RYCqL2HHqi9WcVQrNiplbzgl8vTFymKQLRts2n4IlxjCf1FD+ATgDDqtxnk6IA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR11MB7464 X-OriginatorOrg: intel.com 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 > -----Original Message----- > From: jerinj@marvell.com > Sent: Tuesday, May 2, 2023 21:51 > To: dev@dpdk.org; Wu, Jingjing ; Guo, Junfeng > ; Li, Xiaoyun > Cc: thomas@monjalon.net; david.marchand@redhat.com; > ferruh.yigit@xilinx.com; stephen@networkplumber.org; Jerin Jacob > ; stable@dpdk.org > Subject: [dpdk-dev] [PATCH v1] examples/ntb: fix build issue with GCC 13 >=20 > From: Jerin Jacob >=20 > Fix the following build issue by not allowing nb_ids to be zero. > nb_ids can be zero based on rte_rawdev_xstats_get() API > documentation but it is not valid for the case when second > argument is NULL. Is this the new standard for GCC 13? >=20 > examples/ntb/ntb_fwd.c: In function 'ntb_stats_display': > examples/ntb/ntb_fwd.c:945:23: error: 'rte_rawdev_xstats_get' > accessing 8 bytes in a region of size 0 [-Werror=3Dstringop-overflow=3D] > 945 | if (nb_ids !=3D rte_rawdev_xstats_get(dev_id, ids, values, nb_ids= )) { > | > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >=20 > examples/ntb/ntb_fwd.c:945:23: note: referencing argument 3 > of type 'uint64_t[0]' {aka 'long unsigned int[]'} > In file included from ../examples/ntb/ntb_fwd.c:17: > lib/rawdev/rte_rawdev.h:504:1: note: in a call to function > 'rte_rawdev_xstats_get' > 504 | rte_rawdev_xstats_get(uint16_t dev_id, >=20 > Fixes: 5194299d6ef5 ("examples/ntb: support more functions") > Cc: stable@dpdk.org > Signed-off-by: Jerin Jacob > --- > examples/ntb/ntb_fwd.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/examples/ntb/ntb_fwd.c b/examples/ntb/ntb_fwd.c > index f9abed28e4..5489c3b3cd 100644 > --- a/examples/ntb/ntb_fwd.c > +++ b/examples/ntb/ntb_fwd.c > @@ -923,7 +923,7 @@ ntb_stats_display(void) >=20 > /* Get NTB dev stats and stats names */ > nb_ids =3D rte_rawdev_xstats_names_get(dev_id, NULL, 0); > - if (nb_ids < 0) { > + if (nb_ids <=3D 0) { Should the one in func ntb_stats_clear also be updated non-zero? > printf("Error: Cannot get count of xstats\n"); > return; > } > -- > 2.40.1