* [dpdk-dev] [PATCH] app/testpmd: revert setting MTU explicitly after configure @ 2020-11-16 19:03 Ferruh Yigit 2020-11-20 1:51 ` Chen, BoX C 0 siblings, 1 reply; 3+ messages in thread From: Ferruh Yigit @ 2020-11-16 19:03 UTC (permalink / raw) To: Wenzhuo Lu, Beilei Xing, Bernard Iremonger, Qi Zhang, Andrew Rybchenko Cc: Ferruh Yigit, dev, stable 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. Fixes: 1c21ee95cf52 ("app/testpmd: fix MTU after device configure") Cc: stable@dpdk.org Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com> --- app/test-pmd/testpmd.c | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 48e9647fc7..33fc0fddf5 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -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; -- 2.26.2 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] app/testpmd: revert setting MTU explicitly after configure 2020-11-16 19:03 [dpdk-dev] [PATCH] app/testpmd: revert setting MTU explicitly after configure Ferruh Yigit @ 2020-11-20 1:51 ` Chen, BoX C 2020-11-20 12:07 ` Ferruh Yigit 0 siblings, 1 reply; 3+ messages in thread From: Chen, BoX C @ 2020-11-20 1:51 UTC (permalink / raw) To: Yigit, Ferruh, Lu, Wenzhuo, Xing, Beilei, Iremonger, Bernard, Zhang, Qi Z, Andrew Rybchenko Cc: Yigit, Ferruh, dev, stable, Chen, BoX C, Yu, PingX Tested-by: Chen, BoX C <BoX.C.Chen@intel.com> Thanks. Regards, Chen Bo > -----Original Message----- > From: dev <dev-bounces@dpdk.org> On Behalf Of Ferruh Yigit > Sent: November 17, 2020 3:04 > To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Xing, Beilei > <beilei.xing@intel.com>; Iremonger, Bernard > <bernard.iremonger@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; > Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> > Cc: Yigit, Ferruh <ferruh.yigit@intel.com>; dev@dpdk.org; stable@dpdk.org > Subject: [dpdk-dev] [PATCH] 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. > > Fixes: 1c21ee95cf52 ("app/testpmd: fix MTU after device configure") > Cc: stable@dpdk.org > > Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com> > --- > app/test-pmd/testpmd.c | 19 ------------------- > 1 file changed, 19 deletions(-) > > diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index > 48e9647fc7..33fc0fddf5 100644 > --- a/app/test-pmd/testpmd.c > +++ b/app/test-pmd/testpmd.c > @@ -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; > -- > 2.26.2 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] app/testpmd: revert setting MTU explicitly after configure 2020-11-20 1:51 ` Chen, BoX C @ 2020-11-20 12:07 ` Ferruh Yigit 0 siblings, 0 replies; 3+ messages in thread From: Ferruh Yigit @ 2020-11-20 12:07 UTC (permalink / raw) To: Chen, BoX C, Lu, Wenzhuo, Xing, Beilei, Iremonger, Bernard, Zhang, Qi Z, Andrew Rybchenko Cc: dev, stable, Yu, PingX On 11/20/2020 1:51 AM, Chen, BoX C wrote: > >> -----Original Message----- >> From: dev <dev-bounces@dpdk.org> On Behalf Of Ferruh Yigit >> Sent: November 17, 2020 3:04 >> To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Xing, Beilei >> <beilei.xing@intel.com>; Iremonger, Bernard >> <bernard.iremonger@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; >> Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> >> Cc: Yigit, Ferruh <ferruh.yigit@intel.com>; dev@dpdk.org; stable@dpdk.org >> Subject: [dpdk-dev] [PATCH] 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. >> >> Fixes: 1c21ee95cf52 ("app/testpmd: fix MTU after device configure") >> Cc: stable@dpdk.org >> >> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com> > Tested-by: Chen, BoX C <BoX.C.Chen@intel.com> > Thanks. > Applied to dpdk-next-net/main, thanks. ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-11-20 12:07 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-11-16 19:03 [dpdk-dev] [PATCH] app/testpmd: revert setting MTU explicitly after configure Ferruh Yigit 2020-11-20 1:51 ` Chen, BoX C 2020-11-20 12:07 ` Ferruh Yigit
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).