doc: gro API changes notice
PATCH 1/3 doc: gro API changes notice
when using --no-numa option,
gro should be initiated with SOCKET_ID_ANY
to allow using cross NUMA.
API changes notice:
Changed socket_id field in struct rte_gro_param from uint16 to int32 to support negative value -1 (== SOCKET_ID_ANY). Changed gro_tbl_create typedef to receive negative socket input.
--- doc/guides/rel_notes/deprecation.rst | 8 ++++++++ 1 file changed, 8 insertions(+)
doc/guides/rel_notes/deprecation.rst +8 -0
@@ -142,3 +142,11 @@ Deprecation Notices * bus/vmbus: Starting DPDK 25.11, all the vmbus API defined in ``drivers/bus/vmbus/rte_bus_vmbus.h`` will become internal to DPDK. Those API functions are used internally by DPDK core and netvsc PMD. + +* lib/gro: Starting DPDK 25.11, to enable using negative socket value + (``SOCKET_ID_ANY`` = -1) for gro init for cross NUMA initialization support, + perform the next changes in API: + + - In ``struct rte_gro_param``: ``socket_id`` type changed from ``uint16_t`` to ``int32_t``. + - Update all ``gro_xxx_create`` functions to use updated socket_id type. +
Signature · 1 line
2.21.0
PATCH 2/3 gro: cross NUMA support
when using --no-numa option,
gro should be initiated with SOCKET_ID_ANY
to allow using cross NUMA.
Changed socket_id field in struct rte_gro_param from uint16 to int32 to support negative value -1 (== SOCKET_ID_ANY).
--- lib/gro/gro_tcp4.c | 2 +- lib/gro/gro_tcp4.h | 2 +- lib/gro/gro_tcp6.c | 2 +- lib/gro/gro_tcp6.h | 2 +- lib/gro/gro_udp4.c | 2 +- lib/gro/gro_udp4.h | 2 +- lib/gro/gro_vxlan_tcp4.c | 2 +- lib/gro/gro_vxlan_tcp4.h | 2 +- lib/gro/gro_vxlan_udp4.c | 2 +- lib/gro/gro_vxlan_udp4.h | 2 +- lib/gro/rte_gro.c | 2 +- lib/gro/rte_gro.h | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-)
lib/gro/gro_tcp4.c +1 -1
@@ -10,7 +10,7 @@#include "gro_tcp_internal.h" void * -gro_tcp4_tbl_create (uint16_t socket_id, +gro_tcp4_tbl_create (int32_t socket_id,uint16_t max_flow_num,uint16_t max_item_per_flow) {
lib/gro/gro_tcp4.h +1 -1
@@ -57,7 +57,7 @@ struct gro_tcp4_tbl {* - Return the table pointer on success. * - Return NULL on failure. */ -void *gro_tcp4_tbl_create (uint16_t socket_id, +void *gro_tcp4_tbl_create (int32_t socket_id,uint16_t max_flow_num,uint16_t max_item_per_flow);
lib/gro/gro_tcp6.c +1 -1
@@ -10,7 +10,7 @@#include "gro_tcp_internal.h" void * -gro_tcp6_tbl_create (uint16_t socket_id, +gro_tcp6_tbl_create (int32_t socket_id,uint16_t max_flow_num,uint16_t max_item_per_flow) {
lib/gro/gro_tcp6.h +1 -1
@@ -60,7 +60,7 @@ struct gro_tcp6_tbl {* - Return the table pointer on success. * - Return NULL on failure. */ -void *gro_tcp6_tbl_create (uint16_t socket_id, +void *gro_tcp6_tbl_create (int32_t socket_id,uint16_t max_flow_num,uint16_t max_item_per_flow);
lib/gro/gro_udp4.c +1 -1
@@ -9,7 +9,7 @@#include "gro_udp4.h" void * -gro_udp4_tbl_create (uint16_t socket_id, +gro_udp4_tbl_create (int32_t socket_id,uint16_t max_flow_num,uint16_t max_item_per_flow) {
lib/gro/gro_udp4.h +1 -1
@@ -98,7 +98,7 @@ struct gro_udp4_tbl {* - Return the table pointer on success. * - Return NULL on failure. */ -void *gro_udp4_tbl_create (uint16_t socket_id, +void *gro_udp4_tbl_create (int32_t socket_id,uint16_t max_flow_num,uint16_t max_item_per_flow);
lib/gro/gro_vxlan_tcp4.c +1 -1
@@ -10,7 +10,7 @@#include "gro_vxlan_tcp4.h" void * -gro_vxlan_tcp4_tbl_create (uint16_t socket_id, +gro_vxlan_tcp4_tbl_create (int32_t socket_id,uint16_t max_flow_num,uint16_t max_item_per_flow) {
lib/gro/gro_vxlan_tcp4.h +1 -1
@@ -77,7 +77,7 @@ struct gro_vxlan_tcp4_tbl {* - Return the table pointer on success. * - Return NULL on failure. */ -void *gro_vxlan_tcp4_tbl_create (uint16_t socket_id, +void *gro_vxlan_tcp4_tbl_create (int32_t socket_id,uint16_t max_flow_num,uint16_t max_item_per_flow);
lib/gro/gro_vxlan_udp4.c +1 -1
@@ -10,7 +10,7 @@#include "gro_vxlan_udp4.h" void * -gro_vxlan_udp4_tbl_create (uint16_t socket_id, +gro_vxlan_udp4_tbl_create (int32_t socket_id,uint16_t max_flow_num,uint16_t max_item_per_flow) {
lib/gro/gro_vxlan_udp4.h +1 -1
@@ -78,7 +78,7 @@ struct gro_vxlan_udp4_tbl {* - Return the table pointer on success. * - Return NULL on failure. */ -void *gro_vxlan_udp4_tbl_create (uint16_t socket_id, +void *gro_vxlan_udp4_tbl_create (int32_t socket_id,uint16_t max_flow_num,uint16_t max_item_per_flow);
lib/gro/rte_gro.c +1 -1
@@ -14,7 +14,7 @@#include "gro_vxlan_tcp4.h" #include "gro_vxlan_udp4.h" -typedef void *(*gro_tbl_create_fn )(uint16_t socket_id, +typedef void *(*gro_tbl_create_fn )(int32_t socket_id,uint16_t max_flow_num,uint16_t max_item_per_flow);typedef void (*gro_tbl_destroy_fn )(void *tbl);
lib/gro/rte_gro.h +1 -1
@@ -53,7 +53,7 @@ struct rte_gro_param {/**< max flow number */ uint16_t max_item_per_flow;/**< max packet number per flow */ -uint16_t socket_id; +int32_t socket_id;/**< socket index for allocating GRO related data structures, * like reassembly tables. When use rte_gro_reassemble_burst(), * applications don't need to set this value.
Signature · 1 line
2.21.0
PATCH 3/3 app/testpmd: cross NUMA support for gro init
In reply to Maayan KashaniIf 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.
--- app/test-pmd/testpmd.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
app/test-pmd/testpmd.c +6 -5
@@ -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 }
Signature · 1 line
2.21.0
Quoted 10 lines · On Tue, 17 Jun 2025 18:42:52 +0300 Maayan Kashani <[email protected]> wrote:
when using --no-numa option,
gro should be initiated withSOCKET_ID_ANY
to allow using cross NUMA.API changes notice:
Changedsocket_idfield in structrte_gro_paramfrom uint16 to int32 to support negative value -1 (==SOCKET_ID_ANY). Changedgro_tbl_createtypedef to receive negative socket input.Signed-off-by Maayan Kashani <[email protected]>
GRO has experimental in the comments, but not the exported symbol that was a mistake. It either is experimental or not. Given that the tools check the exported symbol table, I would argue it is not experimental now.
Most of the API's in ethdev use "unsigned int socket_id", I see no reason for GRO to be different.
Why not use function versioning to do it now?