net/ixgbe: align register setting when RSC is disabled
PATCH 1/1 net/ixgbe: align register setting when RSC is disabled
When RSC is not used, the RSC_DIS of register RFCTL should be set according to ixgbe datasheet.
--- drivers/net/ixgbe/ixgbe_rxtx.c | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-)
drivers/net/ixgbe/ixgbe_rxtx.c +13 -16
@@ -4522,6 +4522,7 @@ ixgbe_set_rsc(struct rte_eth_dev *dev)bool rsc_capable = false;uint16_t i;uint32_t rdrxctl; +uint32_t rfctl;/* Sanity check */ dev->dev_ops->dev_infos_get (dev, &dev_info);
@@ -4549,22 +4550,18 @@ ixgbe_set_rsc(struct rte_eth_dev *dev) }/* RFCTL configuration */ -if (rsc_capable) { -uint32_t rfctl =IXGBE_READ_REG (hw,IXGBE_RFCTL ); - -if (rx_conf->enable_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 ); -else - rfctl |=IXGBE_RFCTL_RSC_DIS ; - -IXGBE_WRITE_REG (hw,IXGBE_RFCTL , rfctl); - } + rfctl =IXGBE_READ_REG (hw,IXGBE_RFCTL ); +if ((rsc_capable) && (rx_conf->enable_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 ); +else + rfctl |=IXGBE_RFCTL_RSC_DIS ; +IXGBE_WRITE_REG (hw,IXGBE_RFCTL , rfctl);/* If LRO hasn't been requested - we are done here. */ if (!rx_conf->enable_lro)
Signature · 1 line
2.7.4
Hi,
Quoted 11 lines
-----Original Message-----
From: Dai, Wei
Sent: Thursday, April 20, 2017 11:06 AM
To: Zhang, Helin; Ananyev, Konstantin; Lu, Wenzhuo; Dai, Wei
Cc: [email protected]
Subject: [PATCH] net/ixgbe: align register setting when RSC is disabledWhen RSC is not used, the
RSC_DISof register RFCTL should be set according to ixgbe datasheet.Signed-off-by Wei Dai <[email protected]>
Ferruh Yigit
AppliedQuoted 10 lines · Wenzhuo
Hi,
Quoted 7 lines
-----Original Message-----
From: Dai, Wei
Sent: Thursday, April 20, 2017 11:06 AM
To: Zhang, Helin; Ananyev, Konstantin; Lu, Wenzhuo; Dai, Wei
Cc: [email protected]
Subject: [PATCH] net/ixgbe: align register setting when RSC is disabled
Quoted 5 lines
Quoted 4 lines
When RSC is not used, the
RSC_DISof register RFCTL should be set according to ixgbe datasheet.Signed-off-by Wei Dai <[email protected]>Acked-by Wenzhuo Lu <[email protected]>
Applied to dpdk-next-net/master, thanks.