* [dpdk-dev] [PATCH] net/ixgbe: align register setting when RSC is disabled
@ 2017-04-20 3:06 Wei Dai
2017-04-21 2:21 ` Lu, Wenzhuo
0 siblings, 1 reply; 3+ messages in thread
From: Wei Dai @ 2017-04-20 3:06 UTC (permalink / raw)
To: helin.zhang, konstantin.ananyev, wenzhuo.lu, wei.dai; +Cc: dev
When RSC is not used, the RSC_DIS of register RFCTL should
be set according to ixgbe datasheet.
Signed-off-by: Wei Dai <wei.dai@intel.com>
---
drivers/net/ixgbe/ixgbe_rxtx.c | 29 +++++++++++++----------------
1 file changed, 13 insertions(+), 16 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index e8b5107..1e07895 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -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)
--
2.7.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] net/ixgbe: align register setting when RSC is disabled
2017-04-20 3:06 [dpdk-dev] [PATCH] net/ixgbe: align register setting when RSC is disabled Wei Dai
@ 2017-04-21 2:21 ` Lu, Wenzhuo
2017-04-21 12:19 ` Ferruh Yigit
0 siblings, 1 reply; 3+ messages in thread
From: Lu, Wenzhuo @ 2017-04-21 2:21 UTC (permalink / raw)
To: Dai, Wei, Zhang, Helin, Ananyev, Konstantin; +Cc: dev
Hi,
> -----Original Message-----
> From: Dai, Wei
> Sent: Thursday, April 20, 2017 11:06 AM
> To: Zhang, Helin; Ananyev, Konstantin; Lu, Wenzhuo; Dai, Wei
> Cc: dev@dpdk.org
> Subject: [PATCH] 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.
>
> Signed-off-by: Wei Dai <wei.dai@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] net/ixgbe: align register setting when RSC is disabled
2017-04-21 2:21 ` Lu, Wenzhuo
@ 2017-04-21 12:19 ` Ferruh Yigit
0 siblings, 0 replies; 3+ messages in thread
From: Ferruh Yigit @ 2017-04-21 12:19 UTC (permalink / raw)
To: Lu, Wenzhuo, Dai, Wei, Zhang, Helin, Ananyev, Konstantin; +Cc: dev
On 4/21/2017 3:21 AM, Lu, Wenzhuo wrote:
> Hi,
>
>
>> -----Original Message-----
>> From: Dai, Wei
>> Sent: Thursday, April 20, 2017 11:06 AM
>> To: Zhang, Helin; Ananyev, Konstantin; Lu, Wenzhuo; Dai, Wei
>> Cc: dev@dpdk.org
>> Subject: [PATCH] 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.
>>
>> Signed-off-by: Wei Dai <wei.dai@intel.com>
> Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Applied to dpdk-next-net/master, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-04-21 12:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-20 3:06 [dpdk-dev] [PATCH] net/ixgbe: align register setting when RSC is disabled Wei Dai
2017-04-21 2:21 ` Lu, Wenzhuo
2017-04-21 12:19 ` Ferruh Yigit
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).