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 A2F0A42ECF for ; Thu, 20 Jul 2023 17:33:22 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9F82440685; Thu, 20 Jul 2023 17:33:22 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 003A9400D6 for ; Thu, 20 Jul 2023 17:33:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689867201; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=De3Mi6apzYvDfb8lPWhbCQVhtCumvCblUf1vYGlQuRA=; b=OYY5Plh5vusE4Dz/NbFYXwPmSGhdnS8jtZG9xZM5NcDKNCNHg6O296XD0oWbldEp9XoNQs UomwztoxbQgSDWyASPPIO/3lgMPAhnierMB4jz4+FhR88Y3lve1JP8rrzUyMD+E8vYPDYL JnyHh7ZuPn4iarWXLbhzPwgBM/9EbaA= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-304-CC65WyQyOHqBo07NvYD6kw-1; Thu, 20 Jul 2023 11:20:29 -0400 X-MC-Unique: CC65WyQyOHqBo07NvYD6kw-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DB18588D2B3; Thu, 20 Jul 2023 15:19:58 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.192.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id 86745492C13; Thu, 20 Jul 2023 15:19:57 +0000 (UTC) From: Kevin Traynor 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 21.11.5 Date: Thu, 20 Jul 2023 16:17:14 +0100 Message-ID: <20230720151942.262154-3-ktraynor@redhat.com> In-Reply-To: <20230720151942.262154-1-ktraynor@redhat.com> References: <20230720151942.262154-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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 21.11.5 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/25/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/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/27f385ccbd148a353d230e180762d96000e93a3c Thanks. Kevin --- >From 27f385ccbd148a353d230e180762d96000e93a3c 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 81964d0308..41bb536141 100644 --- a/examples/ntb/ntb_fwd.c +++ b/examples/ntb/ntb_fwd.c @@ -866,5 +866,5 @@ 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; @@ -924,5 +924,5 @@ 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.41.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-07-20 16:17:55.526292559 +0100 +++ 0003-examples-ntb-fix-build-with-GCC-13.patch 2023-07-20 16:17:54.414749499 +0100 @@ -1 +1 @@ -From dbff181d62c997f128b75db2bbac9f42e8dd0f8f Mon Sep 17 00:00:00 2001 +From 27f385ccbd148a353d230e180762d96000e93a3c 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 81964d0308..41bb536141 100644