When 'max-pkt-len' value caused the 'rx_offloads' flag change, the all offloads of rx queues ('rx_conf[qid].offloads') weren't synchronized, that will cause the offloads check failed with 'rx_queue_offload_capa' within 'rte_eth_rx_queue_setup'.
Apply rx offloads configuration once it changed when 'max-pkt-len' command parsed. Fixes: 384161e00627 ("app/testpmd: adjust on the fly VLAN configuration") Signed-off-by: Steve Yang <stevex.y...@intel.com> --- app/test-pmd/cmdline.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 2ccbaa039e..d72a40d7de 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -1902,7 +1902,23 @@ cmd_config_max_pkt_len_parsed(void *parsed_result, rx_offloads |= DEV_RX_OFFLOAD_JUMBO_FRAME; else rx_offloads &= ~DEV_RX_OFFLOAD_JUMBO_FRAME; - port->dev_conf.rxmode.offloads = rx_offloads; + + if (rx_offloads != port->dev_conf.rxmode.offloads) { + uint16_t k; + int ret; + + port->dev_conf.rxmode.offloads = rx_offloads; + /* Apply Rx offloads configuration */ + ret = eth_dev_info_get_print_err(pid, + &port->dev_info); + if (ret != 0) + rte_exit(EXIT_FAILURE, + "rte_eth_dev_info_get() failed\n"); + + for (k = 0; + k < port->dev_info.nb_rx_queues; k++) + port->rx_conf[k].offloads = rx_offloads; + } } else { printf("Unknown parameter\n"); return; -- 2.17.1