From: Declan Doherty Date: Mon, 24 Nov 2014 16:33:40 +0000 (+0000) Subject: app/testpmd: set socket id when adding new port X-Git-Tag: spdx-start~10093 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=a21d5a4be48939272e7bb204c08bcefc89d4cefa;p=dpdk.git app/testpmd: set socket id when adding new port Signed-off-by: Declan Doherty Acked-by: Pablo de Lara --- diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index e5c5016fbf..bb4e75c7c0 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -3759,7 +3759,7 @@ static void cmd_create_bonded_device_parsed(void *parsed_result, /* Update number of ports */ nb_ports = rte_eth_dev_count(); - reconfig(port_id); + reconfig(port_id, res->socket); rte_eth_promiscuous_enable(port_id); } diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 12adafab44..8a4190b73b 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -630,7 +630,7 @@ init_config(void) void -reconfig(portid_t new_port_id) +reconfig(portid_t new_port_id, unsigned socket_id) { struct rte_port *port; @@ -649,6 +649,7 @@ reconfig(portid_t new_port_id) /* set flag to initialize port/queue */ port->need_reconfig = 1; port->need_reconfig_queues = 1; + port->socket_id = socket_id; init_port_config(); } diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index fa736772d1..9371ba12fd 100644 --- a/app/test-pmd/testpmd.h +++ b/app/test-pmd/testpmd.h @@ -457,7 +457,7 @@ void fwd_config_display(void); void rxtx_config_display(void); void fwd_config_setup(void); void set_def_fwd_config(void); -void reconfig(portid_t new_port_id); +void reconfig(portid_t new_port_id, unsigned socket_id); int init_fwd_streams(void); void port_mtu_set(portid_t port_id, uint16_t mtu);