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 860B3A0C41 for ; Tue, 30 Nov 2021 17:38:25 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 82204411EE; Tue, 30 Nov 2021 17:38:25 +0100 (CET) Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by mails.dpdk.org (Postfix) with ESMTP id 6363D411E6 for ; Tue, 30 Nov 2021 17:38:24 +0100 (CET) Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 388363FFF1 for ; Tue, 30 Nov 2021 16:38:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638290304; bh=j0hfkrfZukcIuslB7mtWgaVaT1mCtnh5qTvv1nW3Xdc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=uF2xUVGtqqweW4GdBc6IVdKdWSkHRhmi0Bstrri87sJhCovOwnZcQz9VabLyyZegS 7uDg2iU3QL7PcYIhwlH1U8xRSXr3yftULOtVAFl5F1kfocBAriOM08JP3RLCq3RdJQ 0xaBKP0f9i6xcX86nlCBAzIqmqhXxjPvKZaeIOtvoIpt5grdZtx8fCFkzFOFwIyQV6 cpdBdIQjJ/EHmvMzXBWnX6LKY/XFYU8oiDd+ynPiMxHmyJ2U0uB9LstdUrse+/kLGk 1k+KYeDxWL3eWqln5ft5Lmz49Jciijoiagrhm0V0uQiTzAt7uGhj78yEXcJpuEGR06 Uko7p9WB5IutQ== Received: by mail-ed1-f69.google.com with SMTP id c1-20020aa7c741000000b003e7bf1da4bcso17378158eds.21 for ; Tue, 30 Nov 2021 08:38:24 -0800 (PST) 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=j0hfkrfZukcIuslB7mtWgaVaT1mCtnh5qTvv1nW3Xdc=; b=qW1ATGNePS76nNUEWGUjK/spR9vbgX/WVPVFSZ6hE0gSl40USb312a1EpfGTob63Y6 ayjIknjc91WHpBrUHALrKzzNPezZ4BOn3Ix8ONOKVnQJ9lFoyU2Za9tpXQUIOZzVjAw0 DV0q4NMhyGmMy4s8hcRR8DNWlMilrtS+yfVFo0/iOS/KRPzsPO+qfdhX2wnGcmLEx/jT R75tdAuhgQR/lSVAvlvz5IdSfmO/v5P7dEIbZEmzjK1B3IOM4sqa3ircF2kJWnw0z4Pe gvh2T8+O8YrNPMd0XgUipuqPu6uyXlqFH4tEJpflP+OYA/Zr8cjJNBwiSYLenenyEyzO X9aA== X-Gm-Message-State: AOAM5324Q9j4bcD/2YM4vFxbEQpjmcceBSBSN8kB3TNE+JzdeAmk0HXW mRduSUAzFp3u9Zhj5gA9aFblwJQ6qIVL/PjcxV/KPnlOS1NangG/VodxWTd1EdIM4LGkfbLWFhe FM41VJBJG16AGaTyAEL+G3dBd X-Received: by 2002:a17:906:49d6:: with SMTP id w22mr241301ejv.222.1638290303329; Tue, 30 Nov 2021 08:38:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJxtztIYZCpMXATo8OSPahiZi+MH7ThsYZ4KywgofDFMrpvNFPTWoGoFoHSGjqsl/gxCh2cTQA== X-Received: by 2002:a17:906:49d6:: with SMTP id w22mr241279ejv.222.1638290303086; Tue, 30 Nov 2021 08:38:23 -0800 (PST) Received: from localhost.localdomain ([2001:67c:1560:8007::aac:c4ad]) by smtp.gmail.com with ESMTPSA id qb21sm9610928ejc.78.2021.11.30.08.38.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Nov 2021 08:38:22 -0800 (PST) From: christian.ehrhardt@canonical.com To: Pablo de Lara Cc: John McNamara , Yipeng Wang , David Christensen , dpdk stable Subject: patch 'efd: allow more CPU sockets in table creation' has been queued to stable release 19.11.11 Date: Tue, 30 Nov 2021 17:34:08 +0100 Message-Id: <20211130163605.2460997-44-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211130163605.2460997-1-christian.ehrhardt@canonical.com> References: <20211130163605.2460997-1-christian.ehrhardt@canonical.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 19.11.11 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before December 10th 2021. 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/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/6cf6872c059b56665f44563e30e43eed8f1031f0 Thanks. Christian Ehrhardt --- >From 6cf6872c059b56665f44563e30e43eed8f1031f0 Mon Sep 17 00:00:00 2001 From: Pablo de Lara Date: Tue, 28 Sep 2021 13:58:39 +0000 Subject: [PATCH] efd: allow more CPU sockets in table creation [ upstream commit 8751a7e9832b2908d28aae4f1bac9babe4f9ded1 ] rte_efd_create() function was using uint8_t for a socket bitmask, for one of its parameters. This limits the maximum of NUMA sockets to be 8. Changing to uint64_t increases it to 64, which should be more future-proof. Coverity issue: 366390 Fixes: 56b6ef874f8 ("efd: new Elastic Flow Distributor library") Signed-off-by: Pablo de Lara Acked-by: John McNamara Acked-by: Yipeng Wang Tested-by: David Christensen --- app/test/test_efd.c | 5 +++-- app/test/test_efd_perf.c | 4 ++-- lib/librte_efd/rte_efd.c | 2 +- lib/librte_efd/rte_efd.h | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/test/test_efd.c b/app/test/test_efd.c index a779a71f2d..1f443c7d92 100644 --- a/app/test/test_efd.c +++ b/app/test/test_efd.c @@ -96,9 +96,9 @@ static struct flow_key keys[5] = { /* Array to store the data */ static efd_value_t data[5]; -static inline uint8_t efd_get_all_sockets_bitmask(void) +static inline uint64_t efd_get_all_sockets_bitmask(void) { - uint8_t all_cpu_sockets_bitmask = 0; + uint64_t all_cpu_sockets_bitmask = 0; unsigned int i; unsigned int next_lcore = rte_get_master_lcore(); const int val_true = 1, val_false = 0; @@ -448,6 +448,7 @@ static int test_efd_creation_with_bad_parameters(void) static int test_efd(void) { + test_socket_id = rte_socket_id(); /* Unit tests */ if (test_add_delete() < 0) diff --git a/app/test/test_efd_perf.c b/app/test/test_efd_perf.c index d47622d5ca..c7d6e1e426 100644 --- a/app/test/test_efd_perf.c +++ b/app/test/test_efd_perf.c @@ -29,9 +29,9 @@ #endif static unsigned int test_socket_id; -static inline uint8_t efd_get_all_sockets_bitmask(void) +static inline uint64_t efd_get_all_sockets_bitmask(void) { - uint8_t all_cpu_sockets_bitmask = 0; + uint64_t all_cpu_sockets_bitmask = 0; unsigned int i; unsigned int next_lcore = rte_get_master_lcore(); const int val_true = 1, val_false = 0; diff --git a/lib/librte_efd/rte_efd.c b/lib/librte_efd/rte_efd.c index 3fd1f1c97b..7b72e8572f 100644 --- a/lib/librte_efd/rte_efd.c +++ b/lib/librte_efd/rte_efd.c @@ -494,7 +494,7 @@ efd_search_hash(struct rte_efd_table * const table, struct rte_efd_table * rte_efd_create(const char *name, uint32_t max_num_rules, uint32_t key_len, - uint8_t online_cpu_socket_bitmask, uint8_t offline_cpu_socket) + uint64_t online_cpu_socket_bitmask, uint8_t offline_cpu_socket) { struct rte_efd_table *table = NULL; uint8_t *key_array = NULL; diff --git a/lib/librte_efd/rte_efd.h b/lib/librte_efd/rte_efd.h index c2be4c09ae..d3d7befd0c 100644 --- a/lib/librte_efd/rte_efd.h +++ b/lib/librte_efd/rte_efd.h @@ -139,7 +139,7 @@ typedef uint16_t efd_hashfunc_t; */ struct rte_efd_table * rte_efd_create(const char *name, uint32_t max_num_rules, uint32_t key_len, - uint8_t online_cpu_socket_bitmask, uint8_t offline_cpu_socket); + uint64_t online_cpu_socket_bitmask, uint8_t offline_cpu_socket); /** * Releases the resources from an EFD table -- 2.34.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-30 16:50:08.628977870 +0100 +++ 0044-efd-allow-more-CPU-sockets-in-table-creation.patch 2021-11-30 16:50:05.658872561 +0100 @@ -1 +1 @@ -From 8751a7e9832b2908d28aae4f1bac9babe4f9ded1 Mon Sep 17 00:00:00 2001 +From 6cf6872c059b56665f44563e30e43eed8f1031f0 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 8751a7e9832b2908d28aae4f1bac9babe4f9ded1 ] + @@ -22,2 +24,2 @@ - lib/efd/rte_efd.c | 2 +- - lib/efd/rte_efd.h | 2 +- + lib/librte_efd/rte_efd.c | 2 +- + lib/librte_efd/rte_efd.h | 2 +- @@ -27 +29 @@ -index 180dc4748e..1b249e0447 100644 +index a779a71f2d..1f443c7d92 100644 @@ -30 +32 @@ -@@ -91,9 +91,9 @@ static struct flow_key keys[5] = { +@@ -96,9 +96,9 @@ static struct flow_key keys[5] = { @@ -40 +42 @@ - unsigned int next_lcore = rte_get_main_lcore(); + unsigned int next_lcore = rte_get_master_lcore(); @@ -42 +44 @@ -@@ -443,6 +443,7 @@ static int test_efd_creation_with_bad_parameters(void) +@@ -448,6 +448,7 @@ static int test_efd_creation_with_bad_parameters(void) @@ -51 +53 @@ -index 1c47704475..f3fe3b1736 100644 +index d47622d5ca..c7d6e1e426 100644 @@ -64 +66 @@ - unsigned int next_lcore = rte_get_main_lcore(); + unsigned int next_lcore = rte_get_master_lcore(); @@ -66,5 +68,5 @@ -diff --git a/lib/efd/rte_efd.c b/lib/efd/rte_efd.c -index 5bf517fee9..86ef46863c 100644 ---- a/lib/efd/rte_efd.c -+++ b/lib/efd/rte_efd.c -@@ -495,7 +495,7 @@ efd_search_hash(struct rte_efd_table * const table, +diff --git a/lib/librte_efd/rte_efd.c b/lib/librte_efd/rte_efd.c +index 3fd1f1c97b..7b72e8572f 100644 +--- a/lib/librte_efd/rte_efd.c ++++ b/lib/librte_efd/rte_efd.c +@@ -494,7 +494,7 @@ efd_search_hash(struct rte_efd_table * const table, @@ -79 +81 @@ -diff --git a/lib/efd/rte_efd.h b/lib/efd/rte_efd.h +diff --git a/lib/librte_efd/rte_efd.h b/lib/librte_efd/rte_efd.h @@ -81,2 +83,2 @@ ---- a/lib/efd/rte_efd.h -+++ b/lib/efd/rte_efd.h +--- a/lib/librte_efd/rte_efd.h ++++ b/lib/librte_efd/rte_efd.h