DPDK patches and discussions
 help / color / mirror / Atom feed
From: Maayan Kashani <mkashani@nvidia.com>
To: <dev@dpdk.org>
Cc: <mkashani@nvidia.com>, <dsosnowski@nvidia.com>,
	<rasland@nvidia.com>, "Aman Singh" <aman.deep.singh@intel.com>
Subject: [PATCH 3/3] app/testpmd: cross NUMA support for gro init
Date: Tue, 17 Jun 2025 18:42:54 +0300	[thread overview]
Message-ID: <20250617154255.190093-3-mkashani@nvidia.com> (raw)
In-Reply-To: <20250617154255.190093-1-mkashani@nvidia.com>

If gro context allocation with specified socket failed,
Testpmd init function would return an error.

With current change,
if --no-numa option is used,
testpmd init will use SOCKET_ID_ANY for gro init.

Signed-off-by: Maayan Kashani <mkashani@nvidia.com>
---
 app/test-pmd/testpmd.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index b5f0c022612..b00c93c4536 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -1768,13 +1768,14 @@ init_config(void)
 	gro_param.max_flow_num = GRO_MAX_FLUSH_CYCLES;
 	gro_param.max_item_per_flow = MAX_PKT_BURST;
 	for (lc_id = 0; lc_id < nb_lcores; lc_id++) {
-		gro_param.socket_id = rte_lcore_to_socket_id(
+		if (!numa_support)
+			gro_param.socket_id = SOCKET_ID_ANY;
+		else
+			gro_param.socket_id = rte_lcore_to_socket_id(
 				fwd_lcores_cpuids[lc_id]);
 		fwd_lcores[lc_id]->gro_ctx = rte_gro_ctx_create(&gro_param);
-		if (fwd_lcores[lc_id]->gro_ctx == NULL) {
-			rte_exit(EXIT_FAILURE,
-					"rte_gro_ctx_create() failed\n");
-		}
+		if (fwd_lcores[lc_id]->gro_ctx == NULL)
+			rte_exit(EXIT_FAILURE, "rte_gro_ctx_create() failed\n");
 	}
 #endif
 }
-- 
2.21.0


      parent reply	other threads:[~2025-06-17 15:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-17 15:42 [PATCH 1/3] doc: gro API changes notice Maayan Kashani
2025-06-17 15:42 ` [PATCH 2/3] gro: cross NUMA support Maayan Kashani
2025-06-17 15:42 ` Maayan Kashani [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250617154255.190093-3-mkashani@nvidia.com \
    --to=mkashani@nvidia.com \
    --cc=aman.deep.singh@intel.com \
    --cc=dev@dpdk.org \
    --cc=dsosnowski@nvidia.com \
    --cc=rasland@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).