Add call to fwd_config_setup to init_config.
Add call to fwd_config_setup for corelist, coremask and nbcore setup.
Add call to fwd_config_setup for portlist, portmask and nbport setup.
Add call to fwd_config_setup for rxq, txq, rxd and txd setup.
Remove fwd_config_setup from fwd_config_display.
Call the pkt_fwd_config_display function directly,
and remove the fwd_config_display wrapper function.
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
init_port_config();
cmd_reconfig_device_queue(RTE_PORT_ALL, 1, 1);
init_port_config();
cmd_reconfig_device_queue(RTE_PORT_ALL, 1, 1);
nb_item = parse_item_list(res->list_of_items, "core",
RTE_MAX_LCORE,
parsed_items.lcorelist, 1);
nb_item = parse_item_list(res->list_of_items, "core",
RTE_MAX_LCORE,
parsed_items.lcorelist, 1);
set_fwd_lcores_list(parsed_items.lcorelist, nb_item);
set_fwd_lcores_list(parsed_items.lcorelist, nb_item);
+ fwd_config_setup();
+ }
return;
}
if (!strcmp(res->list_name, "portlist")) {
nb_item = parse_item_list(res->list_of_items, "port",
RTE_MAX_ETHPORTS,
parsed_items.portlist, 1);
return;
}
if (!strcmp(res->list_name, "portlist")) {
nb_item = parse_item_list(res->list_of_items, "port",
RTE_MAX_ETHPORTS,
parsed_items.portlist, 1);
set_fwd_ports_list(parsed_items.portlist, nb_item);
set_fwd_ports_list(parsed_items.portlist, nb_item);
+ fwd_config_setup();
+ }
printf("Please stop forwarding first\n");
return;
}
printf("Please stop forwarding first\n");
return;
}
- if (!strcmp(res->mask, "coremask"))
+ if (!strcmp(res->mask, "coremask")) {
set_fwd_lcores_mask(res->hexavalue);
set_fwd_lcores_mask(res->hexavalue);
- else if (!strcmp(res->mask, "portmask"))
+ fwd_config_setup();
+ } else if (!strcmp(res->mask, "portmask")) {
set_fwd_ports_mask(res->hexavalue);
set_fwd_ports_mask(res->hexavalue);
+ fwd_config_setup();
+ }
}
cmdline_parse_token_string_t cmd_setmask_set =
}
cmdline_parse_token_string_t cmd_setmask_set =
__attribute__((unused)) void *data)
{
struct cmd_set_result *res = parsed_result;
__attribute__((unused)) void *data)
{
struct cmd_set_result *res = parsed_result;
- if (!strcmp(res->what, "nbport"))
+ if (!strcmp(res->what, "nbport")) {
set_fwd_ports_number(res->value);
set_fwd_ports_number(res->value);
- else if (!strcmp(res->what, "nbcore"))
+ fwd_config_setup();
+ } else if (!strcmp(res->what, "nbcore")) {
set_fwd_lcores_number(res->value);
set_fwd_lcores_number(res->value);
- else if (!strcmp(res->what, "burst"))
+ fwd_config_setup();
+ } else if (!strcmp(res->what, "burst"))
set_nb_pkt_per_burst(res->value);
else if (!strcmp(res->what, "verbose"))
set_verbose_level(res->value);
set_nb_pkt_per_burst(res->value);
else if (!strcmp(res->what, "verbose"))
set_verbose_level(res->value);
else if (!strcmp(res->what, "cores"))
fwd_lcores_config_display();
else if (!strcmp(res->what, "fwd"))
else if (!strcmp(res->what, "cores"))
fwd_lcores_config_display();
else if (!strcmp(res->what, "fwd"))
+ pkt_fwd_config_display(&cur_fwd_config);
else if (!strcmp(res->what, "txpkts"))
show_tx_pkt_segments();
}
else if (!strcmp(res->what, "txpkts"))
show_tx_pkt_segments();
}
simple_fwd_config_setup();
}
simple_fwd_config_setup();
}
pkt_fwd_config_display(struct fwd_config *cfg)
{
struct fwd_stream *fs;
pkt_fwd_config_display(struct fwd_config *cfg)
{
struct fwd_stream *fs;
-
-void
-fwd_config_display(void)
-{
- fwd_config_setup();
- pkt_fwd_config_display(&cur_fwd_config);
-}
-
int
set_fwd_lcores_list(unsigned int *lcorelist, unsigned int nb_lc)
{
int
set_fwd_lcores_list(unsigned int *lcorelist, unsigned int nb_lc)
{
/* Configuration of packet forwarding streams. */
if (init_fwd_streams() < 0)
rte_exit(EXIT_FAILURE, "FAIL from init_fwd_streams()\n");
/* Configuration of packet forwarding streams. */
if (init_fwd_streams() < 0)
rte_exit(EXIT_FAILURE, "FAIL from init_fwd_streams()\n");
void rx_queue_infos_display(portid_t port_idi, uint16_t queue_id);
void tx_queue_infos_display(portid_t port_idi, uint16_t queue_id);
void fwd_lcores_config_display(void);
void rx_queue_infos_display(portid_t port_idi, uint16_t queue_id);
void tx_queue_infos_display(portid_t port_idi, uint16_t queue_id);
void fwd_lcores_config_display(void);
-void fwd_config_display(void);
+void pkt_fwd_config_display(struct fwd_config *cfg);
void rxtx_config_display(void);
void fwd_config_setup(void);
void set_def_fwd_config(void);
void rxtx_config_display(void);
void fwd_config_setup(void);
void set_def_fwd_config(void);