[dpdk-dev] net/ixgbe: fix VF RX hang

Message ID 1511149065-15646-1-git-send-email-wenzhuo.lu@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Helin Zhang
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Wenzhuo Lu Nov. 20, 2017, 3:37 a.m. UTC
  The datasheet says, if using MSI-X mode, the PBA support
bit of the GPIE register must be set to 1.
DPDK uses polling mode, we cannot hit this issue in the
scenario DPDK PF + DPDK VF. If we use DPDK PF + kernel VF,
as the kernel driver uses interrpt mode, VF may hit RX hang
after running hours.

Fixes: 00e30184daa0 ("ixgbe: add PF support")
Cc: stable@dpdk.org

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
 drivers/net/ixgbe/ixgbe_pf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Wei Dai Nov. 22, 2017, 1:18 a.m. UTC | #1
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Wenzhuo Lu
> Sent: Monday, November 20, 2017 11:38 AM
> To: dev@dpdk.org
> Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] net/ixgbe: fix VF RX hang
> 
> The datasheet says, if using MSI-X mode, the PBA support bit of the GPIE
> register must be set to 1.
> DPDK uses polling mode, we cannot hit this issue in the scenario DPDK PF +
> DPDK VF. If we use DPDK PF + kernel VF, as the kernel driver uses interrpt
> mode, VF may hit RX hang after running hours.
> 
> Fixes: 00e30184daa0 ("ixgbe: add PF support")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>

Thank you, Wenzhuo.
This bug-fix address to Rx hang after long time running.
It has also been confirmed by Intel NIC firmware team and tested by one of our customers.

> ---
>  drivers/net/ixgbe/ixgbe_pf.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c index
> 676e92c..0114694 100644
> --- a/drivers/net/ixgbe/ixgbe_pf.c
> +++ b/drivers/net/ixgbe/ixgbe_pf.c
> @@ -273,7 +273,7 @@ int ixgbe_pf_host_configure(struct rte_eth_dev
> *eth_dev)
> 
>  	gpie = IXGBE_READ_REG(hw, IXGBE_GPIE);
>  	gpie &= ~IXGBE_GPIE_VTMODE_MASK;
> -	gpie |= IXGBE_GPIE_MSIX_MODE;
> +	gpie |= IXGBE_GPIE_MSIX_MODE | IXGBE_GPIE_PBA_SUPPORT;
> 
>  	switch (RTE_ETH_DEV_SRIOV(eth_dev).active) {
>  	case ETH_64_POOLS:
> --
> 1.9.3
  
Zhang, Helin Dec. 20, 2017, 6:09 a.m. UTC | #2
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Dai, Wei
> Sent: Wednesday, November 22, 2017 9:18 AM
> To: Lu, Wenzhuo; dev@dpdk.org
> Cc: Lu, Wenzhuo; stable@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: fix VF RX hang
> 
> 
> 
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Wenzhuo Lu
> > Sent: Monday, November 20, 2017 11:38 AM
> > To: dev@dpdk.org
> > Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>; stable@dpdk.org
> > Subject: [dpdk-dev] [PATCH] net/ixgbe: fix VF RX hang
> >
> > The datasheet says, if using MSI-X mode, the PBA support bit of the
> > GPIE register must be set to 1.
> > DPDK uses polling mode, we cannot hit this issue in the scenario DPDK
> > PF + DPDK VF. If we use DPDK PF + kernel VF, as the kernel driver uses
> > interrpt mode, VF may hit RX hang after running hours.
> >
> > Fixes: 00e30184daa0 ("ixgbe: add PF support")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
> Acked-by: Wei Dai <wei.dai@intel.com>

Applied to next-net-intel, thanks! /Helin
  

Patch

diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c
index 676e92c..0114694 100644
--- a/drivers/net/ixgbe/ixgbe_pf.c
+++ b/drivers/net/ixgbe/ixgbe_pf.c
@@ -273,7 +273,7 @@  int ixgbe_pf_host_configure(struct rte_eth_dev *eth_dev)
 
 	gpie = IXGBE_READ_REG(hw, IXGBE_GPIE);
 	gpie &= ~IXGBE_GPIE_VTMODE_MASK;
-	gpie |= IXGBE_GPIE_MSIX_MODE;
+	gpie |= IXGBE_GPIE_MSIX_MODE | IXGBE_GPIE_PBA_SUPPORT;
 
 	switch (RTE_ETH_DEV_SRIOV(eth_dev).active) {
 	case ETH_64_POOLS: