DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Wenzhuo Lu <wenzhuo.lu@intel.com>,
	Beilei Xing <beilei.xing@intel.com>,
	Bernard Iremonger <bernard.iremonger@intel.com>,
	Qi Zhang <qi.z.zhang@intel.com>,
	Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Cc: Ferruh Yigit <ferruh.yigit@intel.com>, dev@dpdk.org, stable@dpdk.org
Subject: [dpdk-dev] [PATCH] app/testpmd: revert setting MTU explicitly after configure
Date: Mon, 16 Nov 2020 19:03:54 +0000	[thread overview]
Message-ID: <20201116190355.3390447-1-ferruh.yigit@intel.com> (raw)

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


             reply	other threads:[~2020-11-16 19:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-16 19:03 Ferruh Yigit [this message]
2020-11-20  1:51 ` Chen, BoX C
2020-11-20 12:07   ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201116190355.3390447-1-ferruh.yigit@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=beilei.xing@intel.com \
    --cc=bernard.iremonger@intel.com \
    --cc=dev@dpdk.org \
    --cc=qi.z.zhang@intel.com \
    --cc=stable@dpdk.org \
    --cc=wenzhuo.lu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).