patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] net/ixgbe: fix LSC interrupt issue
@ 2017-05-08  3:57 Qi Zhang
  2017-05-08 11:49 ` [dpdk-stable] [dpdk-dev] " Liu, Yu Y
  2017-05-09  1:15 ` [dpdk-stable] " Lu, Wenzhuo
  0 siblings, 2 replies; 4+ messages in thread
From: Qi Zhang @ 2017-05-08  3:57 UTC (permalink / raw)
  To: helin.zhang, wenzhuo.lu; +Cc: dev, Qi Zhang, stable

There is a bug in previous fix for lsc interrupt.
lsc interrupt is not disabled before delayed handler,
that cause the delayed handler be re-entered.

Fixes: 9b667210700e ("net/ixgbe: fix blocked interrupts")
Cc: stable@dpdk.org

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index ec667d8..c680aab 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -4107,14 +4107,15 @@ ixgbe_dev_interrupt_action(struct rte_eth_dev *dev,
 			timeout = IXGBE_LINK_DOWN_CHECK_TIMEOUT;
 
 		ixgbe_dev_link_status_print(dev);
-		intr->mask_original = intr->mask;
-		/* only disable lsc interrupt */
-		intr->mask &= ~IXGBE_EIMS_LSC;
 		if (rte_eal_alarm_set(timeout * 1000,
 				      ixgbe_dev_interrupt_delayed_handler, (void *)dev) < 0)
 			PMD_DRV_LOG(ERR, "Error setting alarm");
-		else
-			intr->mask = intr->mask_original;
+		else {
+			/* remember orignal mask */
+			intr->mask_original = intr->mask;
+			/* only disable lsc interrupt */
+			intr->mask &= ~IXGBE_EIMS_LSC;
+		}
 	}
 
 	PMD_DRV_LOG(DEBUG, "enable intr immediately");
-- 
2.7.4

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH] net/ixgbe: fix LSC interrupt issue
  2017-05-08  3:57 [dpdk-stable] [PATCH] net/ixgbe: fix LSC interrupt issue Qi Zhang
@ 2017-05-08 11:49 ` Liu, Yu Y
  2017-05-09  1:15 ` [dpdk-stable] " Lu, Wenzhuo
  1 sibling, 0 replies; 4+ messages in thread
From: Liu, Yu Y @ 2017-05-08 11:49 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: dev, stable, Zhang, Qi Z, Zhang, Helin, Lu, Wenzhuo, Liu, Yuanhan

Hi Thomas,

This is fix for critical issues exposed by Gaetan Rivet's commit(8ea656f8c300175ac84f3cbe1117f5ef11ffc4eb) to enable LSC. 

This fix two issues. One is "VF testpmd can't set up successfully on Niantic nic.", another is " kernel VF sometimes can't link up successfully when test DPDK PF+kernel VF".

The fix is verified and code review show it is low risk.

It would be great if it can be released with DPDK 17.05.

Thanks & Regards,
Yu Liu

-----Original Message-----
From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Qi Zhang
Sent: Monday, May 8, 2017 11:58 AM
To: Zhang, Helin <helin.zhang@intel.com>; Lu, Wenzhuo <wenzhuo.lu@intel.com>
Cc: dev@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>; stable@dpdk.org
Subject: [dpdk-dev] [PATCH] net/ixgbe: fix LSC interrupt issue

There is a bug in previous fix for lsc interrupt.
lsc interrupt is not disabled before delayed handler, that cause the delayed handler be re-entered.

Fixes: 9b667210700e ("net/ixgbe: fix blocked interrupts")
Cc: stable@dpdk.org

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index ec667d8..c680aab 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -4107,14 +4107,15 @@ ixgbe_dev_interrupt_action(struct rte_eth_dev *dev,
 			timeout = IXGBE_LINK_DOWN_CHECK_TIMEOUT;
 
 		ixgbe_dev_link_status_print(dev);
-		intr->mask_original = intr->mask;
-		/* only disable lsc interrupt */
-		intr->mask &= ~IXGBE_EIMS_LSC;
 		if (rte_eal_alarm_set(timeout * 1000,
 				      ixgbe_dev_interrupt_delayed_handler, (void *)dev) < 0)
 			PMD_DRV_LOG(ERR, "Error setting alarm");
-		else
-			intr->mask = intr->mask_original;
+		else {
+			/* remember orignal mask */
+			intr->mask_original = intr->mask;
+			/* only disable lsc interrupt */
+			intr->mask &= ~IXGBE_EIMS_LSC;
+		}
 	}
 
 	PMD_DRV_LOG(DEBUG, "enable intr immediately");
--
2.7.4

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-stable] [PATCH] net/ixgbe: fix LSC interrupt issue
  2017-05-08  3:57 [dpdk-stable] [PATCH] net/ixgbe: fix LSC interrupt issue Qi Zhang
  2017-05-08 11:49 ` [dpdk-stable] [dpdk-dev] " Liu, Yu Y
@ 2017-05-09  1:15 ` Lu, Wenzhuo
  2017-05-10 15:34   ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon
  1 sibling, 1 reply; 4+ messages in thread
From: Lu, Wenzhuo @ 2017-05-09  1:15 UTC (permalink / raw)
  To: Zhang, Qi Z, Zhang, Helin; +Cc: dev, stable

Hi Qi,

> -----Original Message-----
> From: Zhang, Qi Z
> Sent: Monday, May 8, 2017 11:58 AM
> To: Zhang, Helin; Lu, Wenzhuo
> Cc: dev@dpdk.org; Zhang, Qi Z; stable@dpdk.org
> Subject: [PATCH] net/ixgbe: fix LSC interrupt issue
> 
> There is a bug in previous fix for lsc interrupt.
> lsc interrupt is not disabled before delayed handler, that cause the delayed
> handler be re-entered.
> 
> Fixes: 9b667210700e ("net/ixgbe: fix blocked interrupts")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
> ---
>  drivers/net/ixgbe/ixgbe_ethdev.c | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c
> b/drivers/net/ixgbe/ixgbe_ethdev.c
> index ec667d8..c680aab 100644
> --- a/drivers/net/ixgbe/ixgbe_ethdev.c
> +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
> @@ -4107,14 +4107,15 @@ ixgbe_dev_interrupt_action(struct rte_eth_dev
> *dev,
>  			timeout = IXGBE_LINK_DOWN_CHECK_TIMEOUT;
> 
>  		ixgbe_dev_link_status_print(dev);
> -		intr->mask_original = intr->mask;
> -		/* only disable lsc interrupt */
> -		intr->mask &= ~IXGBE_EIMS_LSC;
>  		if (rte_eal_alarm_set(timeout * 1000,
>  				      ixgbe_dev_interrupt_delayed_handler,
> (void *)dev) < 0)
>  			PMD_DRV_LOG(ERR, "Error setting alarm");
> -		else
> -			intr->mask = intr->mask_original;
> +		else {
> +			/* remember orignal mask */
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>

Except orignal -> original

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH] net/ixgbe: fix LSC interrupt issue
  2017-05-09  1:15 ` [dpdk-stable] " Lu, Wenzhuo
@ 2017-05-10 15:34   ` Thomas Monjalon
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2017-05-10 15:34 UTC (permalink / raw)
  To: Zhang, Qi Z; +Cc: dev, Lu, Wenzhuo, Zhang, Helin, stable

09/05/2017 03:15, Lu, Wenzhuo:
> Hi Qi,
> 
> From: Zhang, Qi Z
> > 
> > There is a bug in previous fix for lsc interrupt.
> > lsc interrupt is not disabled before delayed handler, that cause the delayed
> > handler be re-entered.
> > 
> > Fixes: 9b667210700e ("net/ixgbe: fix blocked interrupts")
> > Cc: stable@dpdk.org
> > 
> > Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
> 
> Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
> 
> Except orignal -> original

Applied with typo fixed, thanks

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-05-10 15:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-08  3:57 [dpdk-stable] [PATCH] net/ixgbe: fix LSC interrupt issue Qi Zhang
2017-05-08 11:49 ` [dpdk-stable] [dpdk-dev] " Liu, Yu Y
2017-05-09  1:15 ` [dpdk-stable] " Lu, Wenzhuo
2017-05-10 15:34   ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon

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).