patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] net/e1000: fix max Rx packet size
@ 2021-04-08  7:29 Alvin Zhang
  2021-04-08  7:41 ` [dpdk-stable] [PATCH v2] " Alvin Zhang
  0 siblings, 1 reply; 5+ messages in thread
From: Alvin Zhang @ 2021-04-08  7:29 UTC (permalink / raw)
  To: haiyue.wang, jia.guo; +Cc: dev, Alvin Zhang, stable

According to E1000_ETH_OVERHEAD definition, max_rx_pkt_len contains
one VLAN tag size. Therefor when config RLPML register, if dual VLAN
not enabled there is no need to add VLAN tag size to max_rx_pkt_len,
otherwise only one another VLAN tag size should be added to.

Fixes: e51abef39382 ("igb: fix max RX packet size and support dual VLAN")
Cc: stable@dpdk.org

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
---
 drivers/net/e1000/igb_ethdev.c | 5 ++---
 drivers/net/e1000/igb_rxtx.c   | 9 ++++++---
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index 2927cd7..7df7b0f 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -2688,8 +2688,7 @@ static int eth_igbvf_xstats_get_names(__rte_unused struct rte_eth_dev *dev,
 	/* Update maximum packet length */
 	if (dev->data->dev_conf.rxmode.offloads & DEV_RX_OFFLOAD_JUMBO_FRAME)
 		E1000_WRITE_REG(hw, E1000_RLPML,
-			dev->data->dev_conf.rxmode.max_rx_pkt_len +
-						VLAN_TAG_SIZE);
+				dev->data->dev_conf.rxmode.max_rx_pkt_len);
 }
 
 static void
@@ -2708,7 +2707,7 @@ static int eth_igbvf_xstats_get_names(__rte_unused struct rte_eth_dev *dev,
 	if (dev->data->dev_conf.rxmode.offloads & DEV_RX_OFFLOAD_JUMBO_FRAME)
 		E1000_WRITE_REG(hw, E1000_RLPML,
 			dev->data->dev_conf.rxmode.max_rx_pkt_len +
-						2 * VLAN_TAG_SIZE);
+						VLAN_TAG_SIZE);
 }
 
 static int
diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c
index 1500d2f..81f06f9 100644
--- a/drivers/net/e1000/igb_rxtx.c
+++ b/drivers/net/e1000/igb_rxtx.c
@@ -2343,15 +2343,18 @@ int eth_igb_rss_hash_conf_get(struct rte_eth_dev *dev,
 	 * Configure support of jumbo frames, if any.
 	 */
 	if (dev->data->dev_conf.rxmode.offloads & DEV_RX_OFFLOAD_JUMBO_FRAME) {
+		uint32_t max_len = dev->data->dev_conf.rxmode.max_rx_pkt_len;
+
 		rctl |= E1000_RCTL_LPE;
 
 		/*
 		 * Set maximum packet length by default, and might be updated
 		 * together with enabling/disabling dual VLAN.
 		 */
-		E1000_WRITE_REG(hw, E1000_RLPML,
-			dev->data->dev_conf.rxmode.max_rx_pkt_len +
-						VLAN_TAG_SIZE);
+		if (rxmode->offloads & DEV_RX_OFFLOAD_VLAN_EXTEND)
+			max_len += VLAN_TAG_SIZE;
+
+		E1000_WRITE_REG(hw, E1000_RLPML, max_len);
 	} else
 		rctl &= ~E1000_RCTL_LPE;
 
-- 
1.8.3.1


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

* [dpdk-stable] [PATCH v2] net/e1000: fix max Rx packet size
  2021-04-08  7:29 [dpdk-stable] [PATCH] net/e1000: fix max Rx packet size Alvin Zhang
@ 2021-04-08  7:41 ` Alvin Zhang
  2021-04-08  9:51   ` [dpdk-stable] [dpdk-dev] " Chen, LingliX
  2021-04-09  0:58   ` [dpdk-stable] " Wang, Haiyue
  0 siblings, 2 replies; 5+ messages in thread
From: Alvin Zhang @ 2021-04-08  7:41 UTC (permalink / raw)
  To: haiyue.wang, jia.guo; +Cc: dev, Alvin Zhang, stable

According to E1000_ETH_OVERHEAD definition, max_rx_pkt_len contains
one VLAN tag size. Therefore when config RLPML register, if dual VLAN
not enabled there is no need to add VLAN tag size to max_rx_pkt_len,
otherwise only one another VLAN tag size should be added to.

Fixes: e51abef39382 ("igb: fix max RX packet size and support dual VLAN")
Cc: stable@dpdk.org

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
---

V2: Update commit log
---
 drivers/net/e1000/igb_ethdev.c | 5 ++---
 drivers/net/e1000/igb_rxtx.c   | 9 ++++++---
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index 2927cd7..7df7b0f 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -2688,8 +2688,7 @@ static int eth_igbvf_xstats_get_names(__rte_unused struct rte_eth_dev *dev,
 	/* Update maximum packet length */
 	if (dev->data->dev_conf.rxmode.offloads & DEV_RX_OFFLOAD_JUMBO_FRAME)
 		E1000_WRITE_REG(hw, E1000_RLPML,
-			dev->data->dev_conf.rxmode.max_rx_pkt_len +
-						VLAN_TAG_SIZE);
+				dev->data->dev_conf.rxmode.max_rx_pkt_len);
 }
 
 static void
@@ -2708,7 +2707,7 @@ static int eth_igbvf_xstats_get_names(__rte_unused struct rte_eth_dev *dev,
 	if (dev->data->dev_conf.rxmode.offloads & DEV_RX_OFFLOAD_JUMBO_FRAME)
 		E1000_WRITE_REG(hw, E1000_RLPML,
 			dev->data->dev_conf.rxmode.max_rx_pkt_len +
-						2 * VLAN_TAG_SIZE);
+						VLAN_TAG_SIZE);
 }
 
 static int
diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c
index 1500d2f..81f06f9 100644
--- a/drivers/net/e1000/igb_rxtx.c
+++ b/drivers/net/e1000/igb_rxtx.c
@@ -2343,15 +2343,18 @@ int eth_igb_rss_hash_conf_get(struct rte_eth_dev *dev,
 	 * Configure support of jumbo frames, if any.
 	 */
 	if (dev->data->dev_conf.rxmode.offloads & DEV_RX_OFFLOAD_JUMBO_FRAME) {
+		uint32_t max_len = dev->data->dev_conf.rxmode.max_rx_pkt_len;
+
 		rctl |= E1000_RCTL_LPE;
 
 		/*
 		 * Set maximum packet length by default, and might be updated
 		 * together with enabling/disabling dual VLAN.
 		 */
-		E1000_WRITE_REG(hw, E1000_RLPML,
-			dev->data->dev_conf.rxmode.max_rx_pkt_len +
-						VLAN_TAG_SIZE);
+		if (rxmode->offloads & DEV_RX_OFFLOAD_VLAN_EXTEND)
+			max_len += VLAN_TAG_SIZE;
+
+		E1000_WRITE_REG(hw, E1000_RLPML, max_len);
 	} else
 		rctl &= ~E1000_RCTL_LPE;
 
-- 
1.8.3.1


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

* Re: [dpdk-stable] [dpdk-dev] [PATCH v2] net/e1000: fix max Rx packet size
  2021-04-08  7:41 ` [dpdk-stable] [PATCH v2] " Alvin Zhang
@ 2021-04-08  9:51   ` Chen, LingliX
  2021-04-09  0:58   ` [dpdk-stable] " Wang, Haiyue
  1 sibling, 0 replies; 5+ messages in thread
From: Chen, LingliX @ 2021-04-08  9:51 UTC (permalink / raw)
  To: Zhang, AlvinX, Wang, Haiyue, Guo, Jia; +Cc: dev, stable


> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Alvin Zhang
> Sent: Thursday, April 8, 2021 3:41 PM
> To: Wang, Haiyue <haiyue.wang@intel.com>; Guo, Jia <jia.guo@intel.com>
> Cc: dev@dpdk.org; Zhang, AlvinX <alvinx.zhang@intel.com>; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH v2] net/e1000: fix max Rx packet size
> 
Tested-by: Chen Lingli <linglix.chen@intel.com>

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

* Re: [dpdk-stable] [PATCH v2] net/e1000: fix max Rx packet size
  2021-04-08  7:41 ` [dpdk-stable] [PATCH v2] " Alvin Zhang
  2021-04-08  9:51   ` [dpdk-stable] [dpdk-dev] " Chen, LingliX
@ 2021-04-09  0:58   ` Wang, Haiyue
  2021-04-13  5:25     ` Zhang, Qi Z
  1 sibling, 1 reply; 5+ messages in thread
From: Wang, Haiyue @ 2021-04-09  0:58 UTC (permalink / raw)
  To: Zhang, AlvinX, Guo, Jia; +Cc: dev, stable

> -----Original Message-----
> From: Zhang, AlvinX <alvinx.zhang@intel.com>
> Sent: Thursday, April 8, 2021 15:41
> To: Wang, Haiyue <haiyue.wang@intel.com>; Guo, Jia <jia.guo@intel.com>
> Cc: dev@dpdk.org; Zhang, AlvinX <alvinx.zhang@intel.com>; stable@dpdk.org
> Subject: [PATCH v2] net/e1000: fix max Rx packet size
> 
> According to E1000_ETH_OVERHEAD definition, max_rx_pkt_len contains
> one VLAN tag size. Therefore when config RLPML register, if dual VLAN
> not enabled there is no need to add VLAN tag size to max_rx_pkt_len,
> otherwise only one another VLAN tag size should be added to.
> 
> Fixes: e51abef39382 ("igb: fix max RX packet size and support dual VLAN")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
> ---
> 
> V2: Update commit log
> ---
>  drivers/net/e1000/igb_ethdev.c | 5 ++---
>  drivers/net/e1000/igb_rxtx.c   | 9 ++++++---
>  2 files changed, 8 insertions(+), 6 deletions(-)
> 

Acked-by: Haiyue Wang <haiyue.wang@intel.com>

> 1.8.3.1


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

* Re: [dpdk-stable] [PATCH v2] net/e1000: fix max Rx packet size
  2021-04-09  0:58   ` [dpdk-stable] " Wang, Haiyue
@ 2021-04-13  5:25     ` Zhang, Qi Z
  0 siblings, 0 replies; 5+ messages in thread
From: Zhang, Qi Z @ 2021-04-13  5:25 UTC (permalink / raw)
  To: Wang, Haiyue, Zhang, AlvinX, Guo, Jia; +Cc: dev, stable



> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Wang, Haiyue
> Sent: Friday, April 9, 2021 8:59 AM
> To: Zhang, AlvinX <alvinx.zhang@intel.com>; Guo, Jia <jia.guo@intel.com>
> Cc: dev@dpdk.org; stable@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v2] net/e1000: fix max Rx packet size
> 
> > -----Original Message-----
> > From: Zhang, AlvinX <alvinx.zhang@intel.com>
> > Sent: Thursday, April 8, 2021 15:41
> > To: Wang, Haiyue <haiyue.wang@intel.com>; Guo, Jia <jia.guo@intel.com>
> > Cc: dev@dpdk.org; Zhang, AlvinX <alvinx.zhang@intel.com>;
> > stable@dpdk.org
> > Subject: [PATCH v2] net/e1000: fix max Rx packet size
> >
> > According to E1000_ETH_OVERHEAD definition, max_rx_pkt_len contains
> > one VLAN tag size. Therefore when config RLPML register, if dual VLAN
> > not enabled there is no need to add VLAN tag size to max_rx_pkt_len,
> > otherwise only one another VLAN tag size should be added to.
> >
> > Fixes: e51abef39382 ("igb: fix max RX packet size and support dual
> > VLAN")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
> > ---
> >
> > V2: Update commit log
> > ---
> >  drivers/net/e1000/igb_ethdev.c | 5 ++---
> >  drivers/net/e1000/igb_rxtx.c   | 9 ++++++---
> >  2 files changed, 8 insertions(+), 6 deletions(-)
> >
> 
> Acked-by: Haiyue Wang <haiyue.wang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi
> 
> > 1.8.3.1


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

end of thread, other threads:[~2021-04-13  5:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-08  7:29 [dpdk-stable] [PATCH] net/e1000: fix max Rx packet size Alvin Zhang
2021-04-08  7:41 ` [dpdk-stable] [PATCH v2] " Alvin Zhang
2021-04-08  9:51   ` [dpdk-stable] [dpdk-dev] " Chen, LingliX
2021-04-09  0:58   ` [dpdk-stable] " Wang, Haiyue
2021-04-13  5:25     ` Zhang, Qi Z

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://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/ http://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