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 B8CCF42CBC for ; Thu, 15 Jun 2023 03:33:05 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B2C2B41104; Thu, 15 Jun 2023 03:33:05 +0200 (CEST) Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) by mails.dpdk.org (Postfix) with ESMTP id 9E7DA41104 for ; Thu, 15 Jun 2023 03:33:04 +0200 (CEST) Received: by mail-wr1-f45.google.com with SMTP id ffacd0b85a97d-3090d3e9c92so7140692f8f.2 for ; Wed, 14 Jun 2023 18:33:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686792784; x=1689384784; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=cooBcELoBeikzu4owfRuaUy7A4wlQcLs1Gi7umSMCrM=; b=fmIzCJ2l9EWTJLKHefjOjePGC7Upn5Ho2w7+g3f+1VxSQx8a1yJyUEMoh7JHPRnngL aCdvrXs2pSJ/+1j8ZNJafjLCjdcWRG2Z0aGrKmWhZy3AcJJ/eM5ErwM9+nTgnRjJQWsV 2Nyilnvq4Rxu85yev/ixCkgtTi7b8x3GP2x8miaMzMQHJfdfVp2zQJcyx50CM8isC+H3 yzNia9iUNW9B39X5jsRPT62m3jJeHai6ue0ZBSaLy4PiVvfH3wBPki6mVY0Kodja0Flx 5y5AOTnno1YdltZhq+gkfyrAFXV5LajC+sQSyHOelJc/Vi81n+aOqJ+AccoimmcGyb38 JEGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686792784; x=1689384784; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cooBcELoBeikzu4owfRuaUy7A4wlQcLs1Gi7umSMCrM=; b=R6YRRCBWno+cewb/jlU9+qhK6SCG2mPnr9jSWTf5xUb+A590Dk4idF9q0DgiLWnkYM 1EuWNBPmR7FLuEfCOS7WuNxLzGDB2V5XO7wv1wNDOIhv0LA8FOpFKaRrAoJBOVcDFTIt yECQc5SYI9Vd5sA50qa9S24GdiCAcBmE9QDszZSZzNimkbczK/oSenlrNJmKmVjT/oLH Duq3Ob6b9HWsbyMTKtqVwrN/mhTQqgXGmt4103s1GrshwI1+zCAvBz0v+koi5KtNHf4v iymbH63aZzPf6vr4FBJ4gUYGdsbdyHodwb3vIlDAx71GqD073+HkAHxxZANFYg+l0int dDCw== X-Gm-Message-State: AC+VfDzohNGH3T48X85uFFwL6q8LuaAnBNhT9x2i7tX1pWCvAX1IUww0 XrBLVH9c0vZDFB55Fbvmpq06WVFJx2hj2w== X-Google-Smtp-Source: ACHHUZ5fkECppTtxG5EW9/XVEoIqXlnOjyDK6Mwh5Qzo52ypGcnwG99m46A5JliOXQCs114TKeBezw== X-Received: by 2002:a5d:5149:0:b0:30f:cc27:61c0 with SMTP id u9-20020a5d5149000000b0030fcc2761c0mr6314266wrt.66.1686792784168; Wed, 14 Jun 2023 18:33:04 -0700 (PDT) Received: from localhost ([137.220.119.58]) by smtp.gmail.com with ESMTPSA id m7-20020a7bca47000000b003f80b96097esm16268220wml.31.2023.06.14.18.33.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Jun 2023 18:33:03 -0700 (PDT) From: luca.boccassi@gmail.com To: Jerin Jacob Cc: Ali Alnubani , Junfeng Guo , Daxue Gao , dpdk stable Subject: patch 'examples/ntb: fix build with GCC 13' has been queued to stable release 20.11.9 Date: Thu, 15 Jun 2023 02:31:58 +0100 Message-Id: <20230615013258.1439718-3-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230615013258.1439718-1-luca.boccassi@gmail.com> References: <20230615013258.1439718-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 20.11.9 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/17/23. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/4a58ab873a5b754bc5f480bbd44798389d8ab319 Thanks. Luca Boccassi --- >From 4a58ab873a5b754bc5f480bbd44798389d8ab319 Mon Sep 17 00:00:00 2001 From: Jerin Jacob Date: Thu, 4 May 2023 14:23:37 +0530 Subject: [PATCH] examples/ntb: fix build with GCC 13 [ upstream commit dbff181d62c997f128b75db2bbac9f42e8dd0f8f ] 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. 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=stringop-overflow=] 945 | if (nb_ids != rte_rawdev_xstats_get(dev_id, ids, values, nb_ids)) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 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, Fixes: 5194299d6ef5 ("examples/ntb: support more functions") Signed-off-by: Jerin Jacob Tested-by: Ali Alnubani Acked-by: Junfeng Guo Tested-by: Daxue Gao --- examples/ntb/ntb_fwd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/ntb/ntb_fwd.c b/examples/ntb/ntb_fwd.c index 8f42831399..49b8795e2d 100644 --- a/examples/ntb/ntb_fwd.c +++ b/examples/ntb/ntb_fwd.c @@ -865,7 +865,7 @@ ntb_stats_clear(void) /* Clear NTB dev stats */ nb_ids = rte_rawdev_xstats_names_get(dev_id, NULL, 0); - if (nb_ids < 0) { + if (nb_ids <= 0) { printf("Error: Cannot get count of xstats\n"); return; } @@ -923,7 +923,7 @@ ntb_stats_display(void) /* Get NTB dev stats and stats names */ nb_ids = rte_rawdev_xstats_names_get(dev_id, NULL, 0); - if (nb_ids < 0) { + if (nb_ids <= 0) { printf("Error: Cannot get count of xstats\n"); return; } -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-06-15 01:56:34.900932610 +0100 +++ 0003-examples-ntb-fix-build-with-GCC-13.patch 2023-06-15 01:56:34.479539380 +0100 @@ -1 +1 @@ -From dbff181d62c997f128b75db2bbac9f42e8dd0f8f Mon Sep 17 00:00:00 2001 +From 4a58ab873a5b754bc5f480bbd44798389d8ab319 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit dbff181d62c997f128b75db2bbac9f42e8dd0f8f ] + @@ -25 +26,0 @@ -Cc: stable@dpdk.org @@ -36 +37 @@ -index f9abed28e4..585aad9d70 100644 +index 8f42831399..49b8795e2d 100644