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 0A585A0032 for ; Fri, 18 Feb 2022 13:43:23 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 03D2E41140; Fri, 18 Feb 2022 13:43:23 +0100 (CET) Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) by mails.dpdk.org (Postfix) with ESMTP id 93FDF40141 for ; Fri, 18 Feb 2022 13:43:21 +0100 (CET) Received: by mail-wm1-f45.google.com with SMTP id n8so5144959wms.3 for ; Fri, 18 Feb 2022 04:43:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dZeDJYvGUZZCRTdoPHCvcBM7LACo9CFwajydiGa0Fio=; b=fQWkDQTbO8TIRAJFmLG2d1adjXBZoj9J6ipYr9PegL8sr2lcNo8e79VG+BEz5IKZfb uGwF2WFP+RWct4boYApmzcDIC5YOXrTYoK70dv2MxxoVd+SwRiQy2P+gic2MTAMvQFlC AA/bK/icpg4SU67QoRuk0T4IYK5z6oQY9WrFRNVvlSSoo0y69qxAGbrtaRUIB/lpZatZ 2OW/49reGfsn6XLU4Gp+4AldbPxL79icr1eSg6boWZs7rxqEBQNLwPry/UXWT7nWy/xy vFiZAPXmm8jcT6hakxHfYari8pnt1edEENsuzd1SCDgQePexWzcJBSr/rntzB5o4FA9S 4AwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dZeDJYvGUZZCRTdoPHCvcBM7LACo9CFwajydiGa0Fio=; b=jubeyU/dqoPCAaN7IWMbJf/vvN9clKYbD78DJd0C3D+SZf4q9Lvk7cSCExo3iRw8AP 7DSS2JRR2cW6jiwWkcNBLCFbZuSqkAJb0b+9+Nb2gpyJI0wmIMKJkvnmx7qYyEyzv5g4 T7RtAdhFUMosrBBzkeUKCqNFNG5RRP1AiZxEJnOhqUB9pPY6hSrf0xb9YZIqeREElI4w c5K5gShGZF7XAMqoPGm0PMZg+bkjgqE02LvV2PzvVdinF21+lu2RIFTA/xwyOf4atJuE LsBGXeMYT3InoXMU+qRmfQhQ1Bavu0OC9aK3bYu5FHscbTuL4y2PsM8NqwcmV1rkNBV3 4VNA== X-Gm-Message-State: AOAM530nNzTB6SHQ0PK2orIB1EQAbVVpo2RnJqBgNMrrJG+PX8rgppbn bz4/GP6gpY7iwRW8n/E9cdk= X-Google-Smtp-Source: ABdhPJx7RrFu3Jkuy0wmJpccVXRUxvKekOiO1ny9eMUE9FsfHBJt44MfUhpzaDOt6L7Wg8u9j1X3Uw== X-Received: by 2002:a05:600c:1c91:b0:37d:1e50:1b45 with SMTP id k17-20020a05600c1c9100b0037d1e501b45mr7049471wms.173.1645188201357; Fri, 18 Feb 2022 04:43:21 -0800 (PST) Received: from localhost ([2a01:4b00:f41a:3600:360b:9754:2e3a:c344]) by smtp.gmail.com with ESMTPSA id s7sm24506765wrw.71.2022.02.18.04.43.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Feb 2022 04:43:20 -0800 (PST) From: luca.boccassi@gmail.com To: Yunjian Wang Cc: Nan Zhou , Konstantin Ananyev , dpdk stable Subject: patch 'ring: fix error code when creating ring' has been queued to stable release 20.11.5 Date: Fri, 18 Feb 2022 12:38:43 +0000 Message-Id: <20220218123931.1749595-74-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220218123931.1749595-1-luca.boccassi@gmail.com> References: <20220218123931.1749595-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.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 02/20/22. 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/6e47aebf24d3bc6a8e69c8bc03250def488a5b6f Thanks. Luca Boccassi --- >From 6e47aebf24d3bc6a8e69c8bc03250def488a5b6f Mon Sep 17 00:00:00 2001 From: Yunjian Wang Date: Mon, 10 Jan 2022 17:23:03 +0800 Subject: [PATCH] ring: fix error code when creating ring [ upstream commit 074717be3ef9e7a8868b5af078b0ca7b61bcc44b ] The error value returned by rte_ring_create_elem() should be positive integers. However, if the rte_ring_get_memsize_elem() function fails, a negative number is returned and is directly used as the return value. As a result, this will cause the external call to check the return value to fail(like called by rte_mempool_create()). Fixes: a182620042aa ("ring: get size in memory") Reported-by: Nan Zhou Signed-off-by: Yunjian Wang Acked-by: Konstantin Ananyev --- lib/librte_ring/rte_ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_ring/rte_ring.c b/lib/librte_ring/rte_ring.c index f17bd966be..185f9be798 100644 --- a/lib/librte_ring/rte_ring.c +++ b/lib/librte_ring/rte_ring.c @@ -267,7 +267,7 @@ rte_ring_create_elem(const char *name, unsigned int esize, unsigned int count, ring_size = rte_ring_get_memsize_elem(esize, count); if (ring_size < 0) { - rte_errno = ring_size; + rte_errno = -ring_size; return NULL; } -- 2.30.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-02-18 12:37:40.797306321 +0000 +++ 0074-ring-fix-error-code-when-creating-ring.patch 2022-02-18 12:37:37.750793260 +0000 @@ -1 +1 @@ -From 074717be3ef9e7a8868b5af078b0ca7b61bcc44b Mon Sep 17 00:00:00 2001 +From 6e47aebf24d3bc6a8e69c8bc03250def488a5b6f Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 074717be3ef9e7a8868b5af078b0ca7b61bcc44b ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org @@ -19 +20 @@ - lib/ring/rte_ring.c | 2 +- + lib/librte_ring/rte_ring.c | 2 +- @@ -22 +23 @@ -diff --git a/lib/ring/rte_ring.c b/lib/ring/rte_ring.c +diff --git a/lib/librte_ring/rte_ring.c b/lib/librte_ring/rte_ring.c @@ -24,2 +25,2 @@ ---- a/lib/ring/rte_ring.c -+++ b/lib/ring/rte_ring.c +--- a/lib/librte_ring/rte_ring.c ++++ b/lib/librte_ring/rte_ring.c