diff mbox series

net/ixgbe: disable NFS filtering

Message ID 20210120092700.105207-1-dapengx.yu@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Qi Zhang
Headers show
Series net/ixgbe: disable NFS filtering | expand

Checks

Context Check Description
ci/iol-testing warning Testing issues
ci/iol-abi-testing success Testing PASS
ci/iol-testing warning Testing issues
ci/iol-abi-testing success Testing PASS
ci/iol-mellanox-Functional success Functional Testing PASS
ci/iol-mellanox-Functional success Functional Testing PASS
ci/intel-Testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/checkpatch success coding style OK

Commit Message

Yu, DapengX Jan. 20, 2021, 9:27 a.m. UTC
From: Dapeng Yu <dapengx.yu@intel.com>

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")
Cc: stable@dpdk.org

Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
---
 drivers/net/ixgbe/ixgbe_rxtx.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

Comments

Guo, Jia Jan. 22, 2021, 5:33 a.m. UTC | #1
Hi, dapeng

> -----Original Message-----
> From: dapengx.yu@intel.com <dapengx.yu@intel.com>
> Sent: Wednesday, January 20, 2021 5:27 PM
> To: Guo, Jia <jia.guo@intel.com>; Wang, Haiyue <haiyue.wang@intel.com>;
> Yang, Qiming <qiming.yang@intel.com>
> Cc: dev@dpdk.org; Yu, DapengX <dapengx.yu@intel.com>; stable@dpdk.org
> Subject: [PATCH] net/ixgbe: disable NFS filtering
> 
> From: Dapeng Yu <dapengx.yu@intel.com>
> 
> 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?

> Cc: stable@dpdk.org
> 
> Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
> ---
>  drivers/net/ixgbe/ixgbe_rxtx.c | 10 +++-------
>  1 file changed, 3 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
> index cc8f70e6d..3fb55c675 100644
> --- a/drivers/net/ixgbe/ixgbe_rxtx.c
> +++ b/drivers/net/ixgbe/ixgbe_rxtx.c
> @@ -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);

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

>  	IXGBE_WRITE_REG(hw, IXGBE_RFCTL, rfctl);
> 
>  	/* If LRO hasn't been requested - we are done here. */
> --
> 2.27.0
Yu, DapengX Jan. 22, 2021, 7:06 a.m. UTC | #2
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 <dapengx.yu@intel.com>; Wang, Haiyue <haiyue.wang@intel.com>; Yang, Qiming <qiming.yang@intel.com>
Cc: dev@dpdk.org; Yu, DapengX <dapengx.yu@intel.com>; stable@dpdk.org
Subject: RE: [PATCH] net/ixgbe: disable NFS filtering

Hi, dapeng

> -----Original Message-----
> From: dapengx.yu@intel.com <dapengx.yu@intel.com>
> Sent: Wednesday, January 20, 2021 5:27 PM
> To: Guo, Jia <jia.guo@intel.com>; Wang, Haiyue 
> <haiyue.wang@intel.com>; Yang, Qiming <qiming.yang@intel.com>
> Cc: dev@dpdk.org; Yu, DapengX <dapengx.yu@intel.com>; stable@dpdk.org
> Subject: [PATCH] net/ixgbe: disable NFS filtering
> 
> From: Dapeng Yu <dapengx.yu@intel.com>
> 
> 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?

> Cc: stable@dpdk.org
> 
> Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
> ---
>  drivers/net/ixgbe/ixgbe_rxtx.c | 10 +++-------
>  1 file changed, 3 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c 
> b/drivers/net/ixgbe/ixgbe_rxtx.c index cc8f70e6d..3fb55c675 100644
> --- a/drivers/net/ixgbe/ixgbe_rxtx.c
> +++ b/drivers/net/ixgbe/ixgbe_rxtx.c
> @@ -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);

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

>  	IXGBE_WRITE_REG(hw, IXGBE_RFCTL, rfctl);
> 
>  	/* If LRO hasn't been requested - we are done here. */
> --
> 2.27.0
diff mbox series

Patch

diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index cc8f70e6d..3fb55c675 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -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. */