patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 1/1] app/testpmd: revert max Rx packet length adjustment
       [not found] <4da07e46-cf17-57ac-c38d-aa82aacc895e@intel.com>
@ 2020-11-05 17:44 ` Thomas Monjalon
  2020-11-05 18:02   ` Lance Richardson
  2020-11-05 18:11   ` Ferruh Yigit
  0 siblings, 2 replies; 4+ messages in thread
From: Thomas Monjalon @ 2020-11-05 17:44 UTC (permalink / raw)
  To: dev
  Cc: ferruh.yigit, david.marchand, olivier.matz, andrew.rybchenko,
	lance.richardson, maxime.coquelin, stable, Wenzhuo Lu,
	Beilei Xing, Bernard Iremonger, Steve Yang

The fix of max_rx_pkt_len for allowing VLAN packets in all cases
was breaking configuration of some drivers. Example with virtio:

	Ethdev port_id=0 max_rx_pkt_len 11229 > max valid value 9728
	Fail to configure port 0

Trying to fix the logic was revealing other issues in some drivers.
That's why it is decided to revert.

The workaround for the original issue would be
to set the MTU explicitly from the application
with rte_eth_dev_set_mtu().

Fixes: f6870a7ed6b3 ("app/testpmd: fix max Rx packet length for VLAN packet")
Cc: stable@dpdk.org

Reported-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 app/test-pmd/testpmd.c | 23 -----------------------
 1 file changed, 23 deletions(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index c263121a9a..33fc0fddf5 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -1421,7 +1421,6 @@ init_config(void)
 	struct rte_gro_param gro_param;
 	uint32_t gso_types;
 	uint16_t data_size;
-	uint16_t overhead_len;
 	bool warning = 0;
 	int k;
 	int ret;
@@ -1458,28 +1457,6 @@ init_config(void)
 			rte_exit(EXIT_FAILURE,
 				 "rte_eth_dev_info_get() failed\n");
 
-		/* Update the max_rx_pkt_len to have MTU as RTE_ETHER_MTU */
-		if (port->dev_info.max_rx_pktlen && port->dev_info.max_mtu)
-			overhead_len = port->dev_info.max_rx_pktlen -
-				port->dev_info.max_mtu;
-		else
-			overhead_len = RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN;
-
-		port->dev_conf.rxmode.max_rx_pkt_len =
-						RTE_ETHER_MTU + overhead_len;
-
-		/*
-		 * This is workaround to avoid resize max rx packet len.
-		 * Ethdev assumes jumbo frame size must be greater than
-		 * RTE_ETHER_MAX_LEN, and will resize 'max_rx_pkt_len' to
-		 * default value when it is greater than RTE_ETHER_MAX_LEN
-		 * for normal frame.
-		 */
-		if (port->dev_conf.rxmode.max_rx_pkt_len > RTE_ETHER_MAX_LEN) {
-			port->dev_conf.rxmode.offloads |=
-						DEV_RX_OFFLOAD_JUMBO_FRAME;
-		}
-
 		if (!(port->dev_info.tx_offload_capa &
 		      DEV_TX_OFFLOAD_MBUF_FAST_FREE))
 			port->dev_conf.txmode.offloads &=
-- 
2.28.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-stable] [PATCH 1/1] app/testpmd: revert max Rx packet length adjustment
  2020-11-05 17:44 ` [dpdk-stable] [PATCH 1/1] app/testpmd: revert max Rx packet length adjustment Thomas Monjalon
@ 2020-11-05 18:02   ` Lance Richardson
  2020-11-05 18:11   ` Ferruh Yigit
  1 sibling, 0 replies; 4+ messages in thread
From: Lance Richardson @ 2020-11-05 18:02 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: dev, Ferruh Yigit, David Marchand, Olivier Matz,
	Andrew Rybchenko, Maxime Coquelin, stable, Wenzhuo Lu,
	Beilei Xing, Bernard Iremonger, Steve Yang

On Thu, Nov 5, 2020 at 12:51 PM Thomas Monjalon <thomas@monjalon.net> wrote:
>
> The fix of max_rx_pkt_len for allowing VLAN packets in all cases
> was breaking configuration of some drivers. Example with virtio:
>
>         Ethdev port_id=0 max_rx_pkt_len 11229 > max valid value 9728
>         Fail to configure port 0
>
> Trying to fix the logic was revealing other issues in some drivers.
> That's why it is decided to revert.
>
> The workaround for the original issue would be
> to set the MTU explicitly from the application
> with rte_eth_dev_set_mtu().
>
> Fixes: f6870a7ed6b3 ("app/testpmd: fix max Rx packet length for VLAN packet")
> Cc: stable@dpdk.org
>
> Reported-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---
Acked-by: Lance Richardson <lance.richardson@broadcom.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-stable] [PATCH 1/1] app/testpmd: revert max Rx packet length adjustment
  2020-11-05 17:44 ` [dpdk-stable] [PATCH 1/1] app/testpmd: revert max Rx packet length adjustment Thomas Monjalon
  2020-11-05 18:02   ` Lance Richardson
@ 2020-11-05 18:11   ` Ferruh Yigit
  2020-11-05 18:18     ` Thomas Monjalon
  1 sibling, 1 reply; 4+ messages in thread
From: Ferruh Yigit @ 2020-11-05 18:11 UTC (permalink / raw)
  To: Thomas Monjalon, dev
  Cc: david.marchand, olivier.matz, andrew.rybchenko, lance.richardson,
	maxime.coquelin, stable, Wenzhuo Lu, Beilei Xing,
	Bernard Iremonger, Steve Yang

On 11/5/2020 5:44 PM, Thomas Monjalon wrote:
> The fix of max_rx_pkt_len for allowing VLAN packets in all cases
> was breaking configuration of some drivers. Example with virtio:
> 
> 	Ethdev port_id=0 max_rx_pkt_len 11229 > max valid value 9728
> 	Fail to configure port 0
> 
> Trying to fix the logic was revealing other issues in some drivers.
> That's why it is decided to revert.
> 
> The workaround for the original issue would be
> to set the MTU explicitly from the application
> with rte_eth_dev_set_mtu().
> 

Sent this option as RFC:
https://patches.dpdk.org/patch/83756/

> Fixes: f6870a7ed6b3 ("app/testpmd: fix max Rx packet length for VLAN packet")
> Cc: stable@dpdk.org
> 
> Reported-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-stable] [PATCH 1/1] app/testpmd: revert max Rx packet length adjustment
  2020-11-05 18:11   ` Ferruh Yigit
@ 2020-11-05 18:18     ` Thomas Monjalon
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2020-11-05 18:18 UTC (permalink / raw)
  To: Ferruh Yigit
  Cc: dev, david.marchand, olivier.matz, andrew.rybchenko,
	lance.richardson, maxime.coquelin, stable, Wenzhuo Lu,
	Beilei Xing, Bernard Iremonger, Steve Yang

05/11/2020 19:11, Ferruh Yigit:
> On 11/5/2020 5:44 PM, Thomas Monjalon wrote:
> > The fix of max_rx_pkt_len for allowing VLAN packets in all cases
> > was breaking configuration of some drivers. Example with virtio:
> > 
> > 	Ethdev port_id=0 max_rx_pkt_len 11229 > max valid value 9728
> > 	Fail to configure port 0
> > 
> > Trying to fix the logic was revealing other issues in some drivers.
> > That's why it is decided to revert.
> > 
> > The workaround for the original issue would be
> > to set the MTU explicitly from the application
> > with rte_eth_dev_set_mtu().
> > 
> 
> Sent this option as RFC:
> https://patches.dpdk.org/patch/83756/
> 
> > Fixes: f6870a7ed6b3 ("app/testpmd: fix max Rx packet length for VLAN packet")
> > Cc: stable@dpdk.org
> > 
> > Reported-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-11-05 18:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <4da07e46-cf17-57ac-c38d-aa82aacc895e@intel.com>
2020-11-05 17:44 ` [dpdk-stable] [PATCH 1/1] app/testpmd: revert max Rx packet length adjustment Thomas Monjalon
2020-11-05 18:02   ` Lance Richardson
2020-11-05 18:11   ` Ferruh Yigit
2020-11-05 18:18     ` Thomas Monjalon

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git