Skip to contentSkip to conversation

net/ixgbe: disable NFS filtering

PATCH Superseded [email protected] 3 participants 9 messages Jan 20, 2021 – Jan 26, 2021 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/ixgbe: disable NFS filtering

From: Dapeng Yu <[email protected]>

Disable NFS header filtering whether NFS packets coalescing are required or not.

This behavior is aligned with ixgbe kernel driver.

Fixes b826efba6de4 ("net/ixgbe: align register setting when RSC is disabled")
---
 drivers/net/ixgbe/ixgbe_rxtx.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
drivers/net/ixgbe/ixgbe_rxtx.c +3 -7
index cc8f70e6d..3fb55c675 100644
@@ -4923,15 +4923,11 @@ ixgbe_set_rsc(struct rte_eth_dev *dev)
 	/* RFCTL configuration  */
 	rfctl = IXGBE_READ_REG(hw, IXGBE_RFCTL);
 	if ((rsc_capable) && (rx_conf->offloads & DEV_RX_OFFLOAD_TCP_LRO))
-		/*
-		 * Since NFS packets coalescing is not supported - clear
-		 * RFCTL.NFSW_DIS and RFCTL.NFSR_DIS when RSC is
-		 * enabled.
-		 */
-		rfctl &= ~(IXGBE_RFCTL_RSC_DIS | IXGBE_RFCTL_NFSW_DIS |
-			   IXGBE_RFCTL_NFSR_DIS);
+		rfctl &= ~IXGBE_RFCTL_RSC_DIS;
 	else
 		rfctl |= IXGBE_RFCTL_RSC_DIS;
+	/* disable NFS filtering */
+	rfctl |= (IXGBE_RFCTL_NFSW_DIS | IXGBE_RFCTL_NFSR_DIS);
 	IXGBE_WRITE_REG(hw, IXGBE_RFCTL, rfctl);
 
 	/* If LRO hasn't been requested - we are done here. */
Signature · 1 line
2.27.0
#1 lore raw

Hi, dapeng

Quoted 8 lines

-----Original Message-----
From: [email protected] <[email protected]>
Sent: Wednesday, January 20, 2021 5:27 PM
To: Guo, Jia <[email protected]>; Wang, Haiyue <[email protected]>; Yang, Qiming <[email protected]>
Cc: [email protected]; Yu, DapengX <[email protected]>; [email protected]
Subject: [PATCH] net/ixgbe: disable NFS filtering

Quoted 8 lines

From: Dapeng Yu <[email protected]>

Disable NFS header filtering whether NFS packets coalescing are required or not.

This behavior is aligned with ixgbe kernel driver.

Fixes b826efba6de4 ("net/ixgbe: align register setting when RSC is disabled")

I suggest to add one more fix line which related with the patch, since below patch is what you most change the behaviors. the Fixes: 8eecb3295aed ("ixgbe: add LRO support ")

And I saw prior fixed patch are also said it would flow the datasheet, could you explain why you bring this change? Is it anything change about that in kernel driver prior with currently?

Quoted 23 lines
---
 drivers/net/ixgbe/ixgbe_rxtx.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
drivers/net/ixgbe/ixgbe_rxtx.c +0 -6
index cc8f70e6d..3fb55c675 100644
@@ -4923,15 +4923,11 @@ ixgbe_set_rsc(struct rte_eth_dev *dev)
 	/* RFCTL configuration  */
 	rfctl = IXGBE_READ_REG(hw, IXGBE_RFCTL);
 	if ((rsc_capable) && (rx_conf->offloads &
 DEV_RX_OFFLOAD_TCP_LRO))
-		/*
-		 * Since NFS packets coalescing is not supported - clear
-		 * RFCTL.NFSW_DIS and RFCTL.NFSR_DIS when RSC is
-		 * enabled.
-		 */
-		rfctl &= ~(IXGBE_RFCTL_RSC_DIS | IXGBE_RFCTL_NFSW_DIS

|

drivers/net/ixgbe/ixgbe_rxtx.c ixgbe_set_rsc(struct rte_eth_dev *dev) · line 4930

Quoted 6 lines
drivers/net/ixgbe/ixgbe_rxtx.c +3 -1
-			   IXGBE_RFCTL_NFSR_DIS);
+		rfctl &= ~IXGBE_RFCTL_RSC_DIS;
 	else
 		rfctl |= IXGBE_RFCTL_RSC_DIS;
+	/* disable NFS filtering */
+	rfctl |= (IXGBE_RFCTL_NFSW_DIS | IXGBE_RFCTL_NFSR_DIS);

I thinks the "()" is no need, right?

Quoted 5 lines
drivers/net/ixgbe/ixgbe_rxtx.c +0 -1
 	IXGBE_WRITE_REG(hw, IXGBE_RFCTL, rfctl);
 
 	/* If LRO hasn't been requested - we are done here. */
--

2.27.0

#2 lore raw

Hi Jia,

The change in commit:b826efba6de4 does follow the x540 datasheet, but is not consistent with the latest ixgbe kernel driver(v5.10.2).

In ixgbe_main.c(kernel driver), there are the following code, without any precondition. I think the author think NFS packet shall not be filtered in any condition. /**
* ixgbe_configure_rx - Configure 8259x Receive Unit after Reset
* @adapter: board private structure
*
* Configure the Rx unit of the MAC after a reset.
**/
static void ixgbe_configure_rx(struct ixgbe_adapter *adapter)

{
	...
	/* RSC Setup */
	rfctl = IXGBE_READ_REG(hw, IXGBE_RFCTL);
	rfctl &= ~IXGBE_RFCTL_RSC_DIS;
	if (!(adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED))
		rfctl |= IXGBE_RFCTL_RSC_DIS;

	/* disable NFS filtering */
	rfctl |= (IXGBE_RFCTL_NFSW_DIS | IXGBE_RFCTL_NFSR_DIS);
	IXGBE_WRITE_REG(hw, IXGBE_RFCTL, rfctl);
	...
}

I cannot find the complete modification history of these code lines in kernel driver. But these line is introduced in ixgbe 4.5.4(2016-12-13), and never changed later.

I bring this change because NFS packet will be filtered without it, the result is that all NFS packets flow into queue0, before RSS can work on it.

Thanks for your suggestions on this patch, I will submit patch v2 to include them.

-----Original Message-----
From: Guo, Jia
Sent: Friday, January 22, 2021 1:34 PM
To: Yu, DapengX <[email protected]>; Wang, Haiyue <[email protected]>; Yang, Qiming <[email protected]>
Cc: [email protected]; Yu, DapengX <[email protected]>; [email protected]
Subject: RE: [PATCH] net/ixgbe: disable NFS filtering

Hi, dapeng

Quoted 10 lines

-----Original Message-----
From: [email protected] <[email protected]>
Sent: Wednesday, January 20, 2021 5:27 PM
To: Guo, Jia <[email protected]>; Wang, Haiyue <[email protected]>; Yang, Qiming <[email protected]>
Cc: [email protected]; Yu, DapengX <[email protected]>; [email protected]
Subject: [PATCH] net/ixgbe: disable NFS filtering

From: Dapeng Yu <[email protected]>

Quoted 7 lines

Disable NFS header filtering whether NFS packets coalescing are required or not.

This behavior is aligned with ixgbe kernel driver.

Fixes b826efba6de4 ("net/ixgbe: align register setting when RSC is

disabled")

I suggest to add one more fix line which related with the patch, since below patch is what you most change the behaviors. the Fixes: 8eecb3295aed ("ixgbe: add LRO support ")

And I saw prior fixed patch are also said it would flow the datasheet, could you explain why you bring this change? Is it anything change about that in kernel driver prior with currently?

Quoted 23 lines
---
 drivers/net/ixgbe/ixgbe_rxtx.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
(quoted diff) +0 -0

b/drivers/net/ixgbe/ixgbe_rxtx.c index cc8f70e6d..3fb55c675 100644

drivers/net/ixgbe/ixgbe_rxtx.c +0 -6
@@ -4923,15 +4923,11 @@ ixgbe_set_rsc(struct rte_eth_dev *dev)
 	/* RFCTL configuration  */
 	rfctl = IXGBE_READ_REG(hw, IXGBE_RFCTL);
 	if ((rsc_capable) && (rx_conf->offloads &
 DEV_RX_OFFLOAD_TCP_LRO))
-		/*
-		 * Since NFS packets coalescing is not supported - clear
-		 * RFCTL.NFSW_DIS and RFCTL.NFSR_DIS when RSC is
-		 * enabled.
-		 */
-		rfctl &= ~(IXGBE_RFCTL_RSC_DIS | IXGBE_RFCTL_NFSW_DIS

|

drivers/net/ixgbe/ixgbe_rxtx.c ixgbe_set_rsc(struct rte_eth_dev *dev) · line 4930

Quoted 6 lines
drivers/net/ixgbe/ixgbe_rxtx.c +3 -1
-			   IXGBE_RFCTL_NFSR_DIS);
+		rfctl &= ~IXGBE_RFCTL_RSC_DIS;
 	else
 		rfctl |= IXGBE_RFCTL_RSC_DIS;
+	/* disable NFS filtering */
+	rfctl |= (IXGBE_RFCTL_NFSW_DIS | IXGBE_RFCTL_NFSR_DIS);

I thinks the "()" is no need, right?

Quoted 5 lines
drivers/net/ixgbe/ixgbe_rxtx.c +0 -1
 	IXGBE_WRITE_REG(hw, IXGBE_RFCTL, rfctl);
 
 	/* If LRO hasn't been requested - we are done here. */
--

2.27.0

#3 lore raw

PATCH v2 1/1 net/ixgbe: disable NFS filtering

In reply to [email protected]

From: Dapeng Yu <[email protected]>

Disable NFS header filtering whether NFS packets coalescing are required or not.

This behavior is aligned with ixgbe kernel driver.

Fixes b826efba6de4 ("net/ixgbe: align register setting when RSC is disabled")
Fixes 8eecb3295aed ("ixgbe: add LRO support")
---
 drivers/net/ixgbe/ixgbe_rxtx.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
drivers/net/ixgbe/ixgbe_rxtx.c +3 -7
index cc8f70e6d..2efd054f7 100644
@@ -4923,15 +4923,11 @@ ixgbe_set_rsc(struct rte_eth_dev *dev)
 	/* RFCTL configuration  */
 	rfctl = IXGBE_READ_REG(hw, IXGBE_RFCTL);
 	if ((rsc_capable) && (rx_conf->offloads & DEV_RX_OFFLOAD_TCP_LRO))
-		/*
-		 * Since NFS packets coalescing is not supported - clear
-		 * RFCTL.NFSW_DIS and RFCTL.NFSR_DIS when RSC is
-		 * enabled.
-		 */
-		rfctl &= ~(IXGBE_RFCTL_RSC_DIS | IXGBE_RFCTL_NFSW_DIS |
-			   IXGBE_RFCTL_NFSR_DIS);
+		rfctl &= ~IXGBE_RFCTL_RSC_DIS;
 	else
 		rfctl |= IXGBE_RFCTL_RSC_DIS;
+	/* disable NFS filtering */
+	rfctl |= IXGBE_RFCTL_NFSW_DIS | IXGBE_RFCTL_NFSR_DIS;
 	IXGBE_WRITE_REG(hw, IXGBE_RFCTL, rfctl);
 
 	/* If LRO hasn't been requested - we are done here. */
Signature · 1 line
2.27.0
#4 lore raw

Hi, dapeng

Quoted 8 lines

-----Original Message-----
From: [email protected] <[email protected]>
Sent: Monday, January 25, 2021 11:11 AM
To: Guo, Jia <[email protected]>; Wang, Haiyue <[email protected]>; Yang, Qiming <[email protected]>
Cc: [email protected]; Yu, DapengX <[email protected]>; [email protected]
Subject: [PATCH v2] net/ixgbe: disable NFS filtering

Quoted 7 lines

From: Dapeng Yu <[email protected]>

Disable NFS header filtering whether NFS packets coalescing are required or not.

This behavior is aligned with ixgbe kernel driver.

I saw your comments about the reason in another email, so could you briefly add the reason in the commit log?
You just said what you do with this patch, but why or say without this patch what is the problem, it it better be mentioned if this is a fixing patch. Other is LGTM.

Quoted 36 lines
Fixes b826efba6de4 ("net/ixgbe: align register setting when RSC is disabled")
Fixes 8eecb3295aed ("ixgbe: add LRO support")
---
 drivers/net/ixgbe/ixgbe_rxtx.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
drivers/net/ixgbe/ixgbe_rxtx.c +0 -6
index cc8f70e6d..2efd054f7 100644
@@ -4923,15 +4923,11 @@ ixgbe_set_rsc(struct rte_eth_dev *dev)
 	/* RFCTL configuration  */
 	rfctl = IXGBE_READ_REG(hw, IXGBE_RFCTL);
 	if ((rsc_capable) && (rx_conf->offloads &
 DEV_RX_OFFLOAD_TCP_LRO))
-		/*
-		 * Since NFS packets coalescing is not supported - clear
-		 * RFCTL.NFSW_DIS and RFCTL.NFSR_DIS when RSC is
-		 * enabled.
-		 */
-		rfctl &= ~(IXGBE_RFCTL_RSC_DIS | IXGBE_RFCTL_NFSW_DIS

|

drivers/net/ixgbe/ixgbe_rxtx.c +3 -2
-			   IXGBE_RFCTL_NFSR_DIS);
+		rfctl &= ~IXGBE_RFCTL_RSC_DIS;
 	else
 		rfctl |= IXGBE_RFCTL_RSC_DIS;
+	/* disable NFS filtering */
+	rfctl |= IXGBE_RFCTL_NFSW_DIS | IXGBE_RFCTL_NFSR_DIS;
 	IXGBE_WRITE_REG(hw, IXGBE_RFCTL, rfctl);
 
 	/* If LRO hasn't been requested - we are done here. */
--

2.27.0

#5 lore raw

Hi Jia,
Thanks for the remind, I will submit patch v3 to include the reason to fix.

-----Original Message-----
From: Guo, Jia
Sent: Tuesday, January 26, 2021 10:11 AM
To: Yu, DapengX <[email protected]>; Wang, Haiyue <[email protected]>; Yang, Qiming <[email protected]>
Cc: [email protected]; Yu, DapengX <[email protected]>; [email protected]
Subject: RE: [PATCH v2] net/ixgbe: disable NFS filtering

Hi, dapeng

Quoted 8 lines

-----Original Message-----
From: [email protected] <[email protected]>
Sent: Monday, January 25, 2021 11:11 AM
To: Guo, Jia <[email protected]>; Wang, Haiyue <[email protected]>; Yang, Qiming <[email protected]>
Cc: [email protected]; Yu, DapengX <[email protected]>; [email protected]
Subject: [PATCH v2] net/ixgbe: disable NFS filtering

Quoted 7 lines

From: Dapeng Yu <[email protected]>

Disable NFS header filtering whether NFS packets coalescing are required or not.

This behavior is aligned with ixgbe kernel driver.

I saw your comments about the reason in another email, so could you briefly add the reason in the commit log?
You just said what you do with this patch, but why or say without this patch what is the problem, it it better be mentioned if this is a fixing patch. Other is LGTM.

Quoted 37 lines
Fixes b826efba6de4 ("net/ixgbe: align register setting when RSC is

disabled")

Fixes 8eecb3295aed ("ixgbe: add LRO support")
---
 drivers/net/ixgbe/ixgbe_rxtx.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
(quoted diff) +0 -0

b/drivers/net/ixgbe/ixgbe_rxtx.c index cc8f70e6d..2efd054f7 100644

drivers/net/ixgbe/ixgbe_rxtx.c +0 -6
@@ -4923,15 +4923,11 @@ ixgbe_set_rsc(struct rte_eth_dev *dev)
 	/* RFCTL configuration  */
 	rfctl = IXGBE_READ_REG(hw, IXGBE_RFCTL);
 	if ((rsc_capable) && (rx_conf->offloads &
 DEV_RX_OFFLOAD_TCP_LRO))
-		/*
-		 * Since NFS packets coalescing is not supported - clear
-		 * RFCTL.NFSW_DIS and RFCTL.NFSR_DIS when RSC is
-		 * enabled.
-		 */
-		rfctl &= ~(IXGBE_RFCTL_RSC_DIS | IXGBE_RFCTL_NFSW_DIS

|

drivers/net/ixgbe/ixgbe_rxtx.c +3 -2
-			   IXGBE_RFCTL_NFSR_DIS);
+		rfctl &= ~IXGBE_RFCTL_RSC_DIS;
 	else
 		rfctl |= IXGBE_RFCTL_RSC_DIS;
+	/* disable NFS filtering */
+	rfctl |= IXGBE_RFCTL_NFSW_DIS | IXGBE_RFCTL_NFSR_DIS;
 	IXGBE_WRITE_REG(hw, IXGBE_RFCTL, rfctl);
 
 	/* If LRO hasn't been requested - we are done here. */
--

2.27.0

#6 lore raw

PATCH v3 1/1 net/ixgbe: disable NFS filtering

In reply to [email protected]

From: Dapeng Yu <[email protected]>

Disable NFS header filtering whether NFS packets coalescing are required or not, in order to make RSS can work on NFS packets.

The code without the patch does follow datasheet, but not consistent with the ixgbe kernel driver. It causes NFS packets to be filtered and make them flow into queue 0, before RSS can work on them.

Fixes b826efba6de4 ("net/ixgbe: align register setting when RSC is disabled")
Fixes 8eecb3295aed ("ixgbe: add LRO support")
---
 drivers/net/ixgbe/ixgbe_rxtx.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
drivers/net/ixgbe/ixgbe_rxtx.c +3 -7
index cc8f70e6d..2efd054f7 100644
@@ -4923,15 +4923,11 @@ ixgbe_set_rsc(struct rte_eth_dev *dev)
 	/* RFCTL configuration  */
 	rfctl = IXGBE_READ_REG(hw, IXGBE_RFCTL);
 	if ((rsc_capable) && (rx_conf->offloads & DEV_RX_OFFLOAD_TCP_LRO))
-		/*
-		 * Since NFS packets coalescing is not supported - clear
-		 * RFCTL.NFSW_DIS and RFCTL.NFSR_DIS when RSC is
-		 * enabled.
-		 */
-		rfctl &= ~(IXGBE_RFCTL_RSC_DIS | IXGBE_RFCTL_NFSW_DIS |
-			   IXGBE_RFCTL_NFSR_DIS);
+		rfctl &= ~IXGBE_RFCTL_RSC_DIS;
 	else
 		rfctl |= IXGBE_RFCTL_RSC_DIS;
+	/* disable NFS filtering */
+	rfctl |= IXGBE_RFCTL_NFSW_DIS | IXGBE_RFCTL_NFSR_DIS;
 	IXGBE_WRITE_REG(hw, IXGBE_RFCTL, rfctl);
 
 	/* If LRO hasn't been requested - we are done here. */
Signature · 1 line
2.27.0
Acked-by on v3 1/1
#7 lore raw
Quoted 53 lines

-----Original Message-----
From: [email protected] <[email protected]>
Sent: Tuesday, January 26, 2021 11:03 AM
To: Guo, Jia <[email protected]>; Wang, Haiyue <[email protected]>; Yang, Qiming <[email protected]>
Cc: [email protected]; Yu, DapengX <[email protected]>; [email protected]
Subject: [PATCH v3] net/ixgbe: disable NFS filtering

From: Dapeng Yu <[email protected]>

Disable NFS header filtering whether NFS packets coalescing are required or not, in order to make RSS can work on NFS packets.

The code without the patch does follow datasheet, but not consistent with the ixgbe kernel driver. It causes NFS packets to be filtered and make them flow into queue 0, before RSS can work on them.

Fixes b826efba6de4 ("net/ixgbe: align register setting when RSC is disabled")
Fixes 8eecb3295aed ("ixgbe: add LRO support")
---
 drivers/net/ixgbe/ixgbe_rxtx.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
drivers/net/ixgbe/ixgbe_rxtx.c +0 -6
index cc8f70e6d..2efd054f7 100644
@@ -4923,15 +4923,11 @@ ixgbe_set_rsc(struct rte_eth_dev *dev)
 	/* RFCTL configuration  */
 	rfctl = IXGBE_READ_REG(hw, IXGBE_RFCTL);
 	if ((rsc_capable) && (rx_conf->offloads &
 DEV_RX_OFFLOAD_TCP_LRO))
-		/*
-		 * Since NFS packets coalescing is not supported - clear
-		 * RFCTL.NFSW_DIS and RFCTL.NFSR_DIS when RSC is
-		 * enabled.
-		 */
-		rfctl &= ~(IXGBE_RFCTL_RSC_DIS | IXGBE_RFCTL_NFSW_DIS

|

drivers/net/ixgbe/ixgbe_rxtx.c +3 -2
-			   IXGBE_RFCTL_NFSR_DIS);
+		rfctl &= ~IXGBE_RFCTL_RSC_DIS;
 	else
 		rfctl |= IXGBE_RFCTL_RSC_DIS;
+	/* disable NFS filtering */
+	rfctl |= IXGBE_RFCTL_NFSW_DIS | IXGBE_RFCTL_NFSR_DIS;
 	IXGBE_WRITE_REG(hw, IXGBE_RFCTL, rfctl);
 
 	/* If LRO hasn't been requested - we are done here. */
--

2.27.0

Applied
#8 lore raw
Quoted 10 lines

-----Original Message-----
From: dev <[email protected]> On Behalf Of Guo, Jia
Sent: Tuesday, January 26, 2021 11:36 AM
To: Yu, DapengX <[email protected]>; Wang, Haiyue <[email protected]>; Yang, Qiming <[email protected]>
Cc: [email protected]; Yu, DapengX <[email protected]>; [email protected]
Subject: Re: [dpdk-dev] [PATCH v3] net/ixgbe: disable NFS filtering

Quoted 25 lines
Quoted 23 lines

-----Original Message-----
From: [email protected] <[email protected]>
Sent: Tuesday, January 26, 2021 11:03 AM
To: Guo, Jia <[email protected]>; Wang, Haiyue <[email protected]>; Yang, Qiming <[email protected]>
Cc: [email protected]; Yu, DapengX <[email protected]>; [email protected]
Subject: [PATCH v3] net/ixgbe: disable NFS filtering

From: Dapeng Yu <[email protected]>

Disable NFS header filtering whether NFS packets coalescing are required or not, in order to make RSS can work on NFS packets.

The code without the patch does follow datasheet, but not consistent with the ixgbe kernel driver. It causes NFS packets to be filtered and make them flow into queue 0, before RSS can work on them.

Fixes b826efba6de4 ("net/ixgbe: align register setting when RSC is

disabled")

Fixes 8eecb3295aed ("ixgbe: add LRO support")

Applied to dpdk-next-net-intel.

Thanks
Qi