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 B7A1442A5B; Thu, 4 May 2023 11:07:30 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4C6A241144; Thu, 4 May 2023 11:07:30 +0200 (CEST) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id B2D76410DC; Thu, 4 May 2023 11:07:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1683191248; x=1714727248; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=fJub1lN7GPTn9QSS53RgwWv7GQVmyegQQ9h+weGhh28=; b=Lo33jFKUZfkTH8fXTGj2vSE90QNIjg6pxb32/OAD1zwU83563z2ycyjW wSHu88dv61wfphppRh8yM7EECycP16zsXxDQIdw+DHAiHtOl3WRGwW1vo VMI+Ff7h4nlwpwH3WvfJtHsMInFKB7IypCt6KAcuyv43Ch4NISniNfcwg Scb1w0Pdx3biTH29hMZnRiS5A9pJAqYKB/rxEVKfxSoABnm4rnMmMZnSV qLPi0VgieZ6u0WgjgWTiTjaFvQBfiolBp0I87fuXrja4rUWDJPtpOfa4A KMHw/W07/QYxJhnANXcevDmEizY39p0Iy3krIZISgMgREbuVoA+lk4TpV w==; X-IronPort-AV: E=McAfee;i="6600,9927,10699"; a="412054187" X-IronPort-AV: E=Sophos;i="5.99,249,1677571200"; d="scan'208";a="412054187" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 May 2023 02:07:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10699"; a="696941362" X-IronPort-AV: E=Sophos;i="5.99,249,1677571200"; d="scan'208";a="696941362" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orsmga002.jf.intel.com with ESMTP; 04 May 2023 02:07:25 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) 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.2507.23; Thu, 4 May 2023 02:07:25 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx612.amr.corp.intel.com (10.18.126.92) 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 02:07:25 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.176) by edgegateway.intel.com (192.55.55.70) 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 02:07:25 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=S3TXtXWm3eCRdfGquNCQGmUKZoNRcBTUAlI1IqD6bs21eFGdrbcghgarJCd6GxCsk11g4wf7AC+U6cf3ZFAI1aOg6qDs+gGZ9Lr4VUBhAt7/mKwUkIY374ai02y14b6Q7zb+qVPMT1RcX3tSTqe2kIY4jo7DP6GkAwCJRE3xoySntzXoG5Mj8dGLdBcSGFgFPWoQ6gUiRpjR9O1IGloAyHVIOPEq6fs4lh+AC3wAKL2mvta3ldN2ml9KkWkLXu+77gT3KycaAP3MAc/ruDVOlgrVoVO0tP+melRmbbAK0OXupdl5Mx97/9FFAd9GIeI+76U3iAR0r03muWSzcUa8bw== 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=xUT0TAyz0vLz/cmpm/YdG/vjzkeJ0zemTEb4dYW19NE=; b=Kr/DZly5sikcBYrpqLFotXTbSSrus2fGlzWxM8MBd2UtYMXTaKGpYRM2prAaIg4knhPSdnhvq8+bRKewNIWUb3IEgHG73TnpuBXsWSISnk3RPVKUV8CR5mvkCqJQWVcz5xqX3yD03X2zWScBiiz/2aM2LVGNOKnV6xAu3FLcAQXoB4Zop0KzUFhPOEnU4iyKPagwSmQ+tygaZXphsHlIjeiZdssD0SXWKNTih3PfjqqT4VoRE95qc8WmYXA3M5iaNrCHQd6y9nkZfxdHc+RYzgOZj9w4ONrkaj0jGIwf8rwo2txKOo1j67Pnb8mwib32zjSuaR7tHsuqyvC1XUqPtw== 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 CY8PR11MB6940.namprd11.prod.outlook.com (2603:10b6:930:58::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.26; Thu, 4 May 2023 09:07:22 +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 09:07:22 +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@amd.com" , "stable@dpdk.org" , Ali Alnubani Subject: RE: [dpdk-dev] [PATCH v2] examples/ntb: fix build issue with GCC 13 Thread-Topic: [dpdk-dev] [PATCH v2] examples/ntb: fix build issue with GCC 13 Thread-Index: AQHZfmYRNtBXJP7AEk6KM4BT8Chj369J0bYA Date: Thu, 4 May 2023 09:07:22 +0000 Message-ID: References: <20230502135045.3541570-2-jerinj@marvell.com> <20230504085337.3446264-1-jerinj@marvell.com> In-Reply-To: <20230504085337.3446264-1-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_|CY8PR11MB6940:EE_ x-ms-office365-filtering-correlation-id: 5359c7ea-24b1-453a-119a-08db4c7ef879 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: WzZ66i0paEzQ6Q7mZHInDlNpdG9dgzKiTeNg4iqCl+blaoObxkMnegccE9S0L7wiEZHj4EiRkSwPx6PzhgUrlPIgmGSB3warOkz4ZmB9bw+W5ZtgtUbe2K9OT3JlT8WXHxdeIW1XaQdYrRIOrmB1IqPMGuQfH+tYzoWv3b6kairhNu92ivF1oFAcH48w6IoeFPTZUGGEq6HBKhb49IiyA2CTSoYE1ald3ne/mNraG1asAY+YZBcdRaCGf9BAwP5e37LN26vyC+BO8Yr1vBpZvXbBV1bVZNmECGhL1PoSbtIK2khem5yOPd261fpdlsSqagc1hXeZsePUVAloxwfruVIuJFsuyirpacvcKYsFgWfii4aGzGuRnMrA/k7NR0+TmdATjtuJH/T33klUFYTAYnbvxzShWBfS7A2XqW7FuxAucQMlmtRd801AM0IWEnMhENJuxm3e1kcYNByVZxwl80H43qJEfDWJubKWpF70P7fb7PCR6MVIYUR+NEj9MZ29zofs/JgFWN5BSBC0BmvvZW7xHfiPNZnDyEZ3AQn3wwKXEA9Zb6LD4+K1CZZeqBs/HqtQLPSiiQJ18lNdU4t3qdMxbXB5MtM+Ac3EnK4C+Y9LIS5Vlvb9nfA7Nuf7a5dJ 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)(376002)(396003)(39860400002)(346002)(366004)(136003)(451199021)(52536014)(38100700002)(186003)(2906002)(122000001)(478600001)(54906003)(110136005)(82960400001)(9686003)(6506007)(53546011)(5660300002)(8936002)(8676002)(38070700005)(7696005)(71200400001)(76116006)(64756008)(66446008)(66476007)(66556008)(66946007)(55016003)(86362001)(41300700001)(83380400001)(6636002)(4326008)(33656002)(316002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?fa4RdDotK34F/7Y6st9q8Xo1nw5hsF4ZBPXqwaWtv9oOQZXZuW+tVPZCj82H?= =?us-ascii?Q?wuOmTdfyKU1/WiajyqlIMwSQweQLS4o6/ReBVMZ84DZWTet4RWlOH50Al0WC?= =?us-ascii?Q?Yk4iId+2166g/wc59o5j1FW8Lptmpgv6rEpU5l3Idz9P/go6zTMteCJhYlla?= =?us-ascii?Q?biziRvbED6Q6OSpvkQGTsDTjxJcIMyWCmQGC6cdDVeABpShxnovtrl13kpO7?= =?us-ascii?Q?Xj+WQznYGXGEBRU3NgdTUtBvhXBnp5PPAgEkkb39sfuzxrls4WnRzdnMHr73?= =?us-ascii?Q?sY7+6EiWvt6fillUqteX/hwddTRQ62/xcPI+ZgHwDVnetcSeZevxcVFCcchr?= =?us-ascii?Q?TljzotChL3N4Lk8cORfrEtg10/TYaSi7xne711imjEamneFCZOj2mSB69s3m?= =?us-ascii?Q?oVoAoScKJDcYrn4CS+hgcSznHpEyHZA+5fyr3mmWgzZg0w4AdJg9NUjscfKW?= =?us-ascii?Q?TMOqZmwZMzt8aVSASYTfpG3W0Y6UdFntlOZp44oW2/y3ljiigCJ1jVaOW47I?= =?us-ascii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CV6d60KRWl4vwpDWjthkZx9gAQgo/Ni?= =?us-ascii?Q?839bLUYc0FnkevJlPXjbURFsW8jkDJ/XTVNz7sLPSPfXO+oKPKdYDdlWL+BJ?= =?us-ascii?Q?WfxYivonNWEIPKErw+F27eOQu02PaM9KavSBZB5vntsJ04tbcVsYzVLAmsPL?= =?us-ascii?Q?vGuAVVb8vVjADsoKStE=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: 5359c7ea-24b1-453a-119a-08db4c7ef879 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 May 2023 09:07:22.0707 (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: XUiXJcqdAx92g20dl1ZxDOhtJIIGScCGHgiWOteyeQYr5tmHzS2W2zDRE21VQjOOAZAXb3ME5kM6CxP1H2wnjg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR11MB6940 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: Thursday, May 4, 2023 16:54 > To: dev@dpdk.org; Wu, Jingjing ; Guo, Junfeng > ; Li, Xiaoyun > Cc: thomas@monjalon.net; david.marchand@redhat.com; > ferruh.yigit@amd.com; Jerin Jacob ; > stable@dpdk.org; Ali Alnubani > Subject: [dpdk-dev] [PATCH v2] 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. >=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 > Tested-by: Ali Alnubani > --- > v2: > - Apply the same fix for ntb_stats_clear()(Junfeng) >=20 > examples/ntb/ntb_fwd.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/examples/ntb/ntb_fwd.c b/examples/ntb/ntb_fwd.c > index f9abed28e4..585aad9d70 100644 > --- a/examples/ntb/ntb_fwd.c > +++ b/examples/ntb/ntb_fwd.c > @@ -865,7 +865,7 @@ ntb_stats_clear(void) > -- > 2.40.1 LGTM, it makes sense to avoid zero memory allocation. Thanks! Acked-by: Junfeng Guo Regards, Junfeng Guo