app/testpmd: revert setting MTU explicitly after configure
PATCH 1/1 app/testpmd: revert setting MTU explicitly after configure
Setting MTU after each 'rte_eth_dev_configure()' prevents using "--max-pkt-len=N" parameter and "port config all max-pkt-len #" command
This is breaking DTS scatter test case which is using "--max-pkt-len=9000" testpmd parameter.
Reverting workaround to recover the DTS testcase.
--- app/test-pmd/testpmd.c | 19 ------------------- 1 file changed, 19 deletions(-)
app/test-pmd/testpmd.c +0 -19
@@ -2537,8 +2537,6 @@ start_port(portid_t pid) }if (port->need_reconfig >0 ) { -uint16_t mtu =RTE_ETHER_MTU ; - port->need_reconfig =0 ;if (flow_isolate_all) {
@@ -2572,23 +2570,6 @@ start_port(portid_t pid) port->need_reconfig =1 ;return -1 ; } - -/* -* Workaround for rte_eth_dev_configure(), max_rx_pkt_len -* set MTU wrong for the PMDs that have frame overhead -* bigger than RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN. -* For a PMD that has 26 bytes overhead, rte_eth_dev_configure() -* can set MTU to max 1492, not to expected 1500 bytes. -* Using rte_eth_dev_set_mtu() to be able to set MTU correctly, -* default MTU value is 1500. -*/ - diag =rte_eth_dev_get_mtu (pi, &mtu); -if (diag) -printf ("Failed to get MTU for port %d\n" , pi); - diag =rte_eth_dev_set_mtu (pi, mtu); -if (diag !=0 && diag != -ENOTSUP ) -printf ("Failed to set MTU to %u for port %d\n" , - mtu, pi); }if (port->need_reconfig_queues >0 ) { port->need_reconfig_queues =0 ;
Signature · 1 line
2.26.2
Thanks.
Regards,
Chen Bo
Quoted 73 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Ferruh Yigit
Sent: November 17, 2020 3:04
To: Lu, Wenzhuo <[email protected]>; Xing, Beilei <[email protected]>; Iremonger, Bernard <[email protected]>; Zhang, Qi Z <[email protected]>; Andrew Rybchenko <[email protected]>
Cc: Yigit, Ferruh <[email protected]>; [email protected]; [email protected]
Subject: [dpdk-dev] [PATCH] app/testpmd: revert setting MTU explicitly after configureSetting MTU after each '
rte_eth_dev_configure()' prevents using "--max- pkt-len=N" parameter and "port config all max-pkt-len #" commandThis is breaking DTS scatter test case which is using "--max-pkt-len=9000" testpmd parameter.
Reverting workaround to recover the DTS testcase.
Fixes 1c21ee95cf52 ("app/testpmd: fix MTU after device configure")Signed-off-by Ferruh Yigit <[email protected]>--- app/test-pmd/testpmd.c | 19 ------------------- 1 file changed, 19 deletions(-)app/test-pmd/testpmd.c index renamed from app/test-pmd/testpmd.c +0
-0
48e9647fc7..33fc0fddf5100644app/test-pmd/testpmd.c +0
-5@@ -2537,8 +2537,6 @@ start_port(portid_t pid) }if (port->need_reconfig >0 ) { -uint16_t mtu =RTE_ETHER_MTU ; - port->need_reconfig =0 ;if (flow_isolate_all) {@@ -2572,23 +2570,6 @@ start_port(portid_t pid) port->need_reconfig =1 ;return -1 ; } - -/* -* Workaround for rte_eth_dev_configure(),
max_rx_pkt_lenapp/test-pmd/testpmd.c +0
-1-* set MTU wrong for the PMDs that have frame overhead
app/test-pmd/testpmd.c +0
-1-* bigger than RTE_ETHER_HDR_LEN +
RTE_ETHER_CRC_LEN.app/test-pmd/testpmd.c +0
-1-* For a PMD that has 26 bytes overhead,
rte_eth_dev_configure()app/test-pmd/testpmd.c +0
-1-* can set MTU to max 1492, not to expected 1500 bytes.
app/test-pmd/testpmd.c +0
-1-* Using rte_eth_dev_set_mtu() to be able to set MTU correctly,
app/test-pmd/testpmd.c +0
-8-* default MTU value is 1500. -*/ - diag =rte_eth_dev_get_mtu (pi, &mtu); -if (diag) -printf ("Failed to get MTU for port %d\n" , pi); - diag =rte_eth_dev_set_mtu (pi, mtu); -if (diag !=0 && diag != -ENOTSUP ) - printf("Failed to set MTU to %u forport %d\n",
app/test-pmd/testpmd.c +0
-2- mtu, pi); }if (port->need_reconfig_queues >0 ) { port->need_reconfig_queues =0 ; --2.26.2
Ferruh Yigit
AppliedQuoted 18 lines · BoX C
Quoted 18 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Ferruh Yigit
Sent: November 17, 2020 3:04
To: Lu, Wenzhuo <[email protected]>; Xing, Beilei <[email protected]>; Iremonger, Bernard <[email protected]>; Zhang, Qi Z <[email protected]>; Andrew Rybchenko <[email protected]>
Cc: Yigit, Ferruh <[email protected]>; [email protected]; [email protected]
Subject: [dpdk-dev] [PATCH] app/testpmd: revert setting MTU explicitly after configureSetting MTU after each '
rte_eth_dev_configure()' prevents using "--max- pkt-len=N" parameter and "port config all max-pkt-len #" commandThis is breaking DTS scatter test case which is using "--max-pkt-len=9000" testpmd parameter.
Quoted 9 lines
Quoted 6 lines
Reverting workaround to recover the DTS testcase.
Fixes 1c21ee95cf52 ("app/testpmd: fix MTU after device configure")Signed-off-by Ferruh Yigit <[email protected]>Tested-by Chen, BoX C <[email protected]>Thanks.
Applied to dpdk-next-net/main, thanks.