patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] examples/l3fwd-power: fix RX interrupt disable
@ 2019-09-10 16:10 Xiao Zhang
  2019-09-20  5:22 ` Liu, Yong
  0 siblings, 1 reply; 5+ messages in thread
From: Xiao Zhang @ 2019-09-10 16:10 UTC (permalink / raw)
  To: dev; +Cc: yong.liu, Xiao Zhang, stable

Interrupt will not be received when disabling RX interrupt without
synchronization mechanism sometimes which leads to wake up issue,
add spinlock to fix it.

Fixes: b736d64787fc ("mples/l3fwd-power: disable Rx interrupt when
waking up")
Cc: stable@dpdk.org

Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
---
 examples/l3fwd-power/main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
index fd8d952..ff1ad37 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
@@ -880,7 +880,9 @@ sleep_until_rx_interrupt(int num)
 		port_id = ((uintptr_t)data) >> CHAR_BIT;
 		queue_id = ((uintptr_t)data) &
 			RTE_LEN2MASK(CHAR_BIT, uint8_t);
+		rte_spinlock_lock(&(locks[port_id]));
 		rte_eth_dev_rx_intr_disable(port_id, queue_id);
+		rte_spinlock_unlock(&(locks[port_id]));
 		RTE_LOG(INFO, L3FWD_POWER,
 			"lcore %u is waked up from rx interrupt on"
 			" port %d queue %d\n",
-- 
2.7.4


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

* Re: [dpdk-stable] examples/l3fwd-power: fix RX interrupt disable
  2019-09-10 16:10 [dpdk-stable] examples/l3fwd-power: fix RX interrupt disable Xiao Zhang
@ 2019-09-20  5:22 ` Liu, Yong
  2019-10-23 14:32   ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon
  0 siblings, 1 reply; 5+ messages in thread
From: Liu, Yong @ 2019-09-20  5:22 UTC (permalink / raw)
  To: Zhang, Xiao, dev; +Cc: stable

> -----Original Message-----
> From: Zhang, Xiao
> Sent: Wednesday, September 11, 2019 12:10 AM
> To: dev@dpdk.org
> Cc: Liu, Yong <yong.liu@intel.com>; Zhang, Xiao <xiao.zhang@intel.com>;
> stable@dpdk.org
> Subject: examples/l3fwd-power: fix RX interrupt disable
> 
> Interrupt will not be received when disabling RX interrupt without
> synchronization mechanism sometimes which leads to wake up issue,
> add spinlock to fix it.
> 
> Fixes: b736d64787fc ("mples/l3fwd-power: disable Rx interrupt when
> waking up")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
> ---
>  examples/l3fwd-power/main.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
> index fd8d952..ff1ad37 100644
> --- a/examples/l3fwd-power/main.c
> +++ b/examples/l3fwd-power/main.c
> @@ -880,7 +880,9 @@ sleep_until_rx_interrupt(int num)
>  		port_id = ((uintptr_t)data) >> CHAR_BIT;
>  		queue_id = ((uintptr_t)data) &
>  			RTE_LEN2MASK(CHAR_BIT, uint8_t);
> +		rte_spinlock_lock(&(locks[port_id]));
>  		rte_eth_dev_rx_intr_disable(port_id, queue_id);
> +		rte_spinlock_unlock(&(locks[port_id]));
>  		RTE_LOG(INFO, L3FWD_POWER,
>  			"lcore %u is waked up from rx interrupt on"
>  			" port %d queue %d\n",
> --
> 2.7.4

Reviewed-by: Marvin Liu
<yong.liu@intel.com>

Regards,
Marvin


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

* Re: [dpdk-stable] [dpdk-dev] examples/l3fwd-power: fix RX interrupt disable
  2019-09-20  5:22 ` Liu, Yong
@ 2019-10-23 14:32   ` Thomas Monjalon
  2019-10-24  8:07     ` Hunt, David
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Monjalon @ 2019-10-23 14:32 UTC (permalink / raw)
  To: Zhang, Xiao; +Cc: dev, Liu, Yong, stable, David Hunt

+Cc Dave, the maintainer

> > Interrupt will not be received when disabling RX interrupt without
> > synchronization mechanism sometimes which leads to wake up issue,
> > add spinlock to fix it.
> > 
> > Fixes: b736d64787fc ("mples/l3fwd-power: disable Rx interrupt when
> > waking up")
> > Cc: stable@dpdk.org
> > 
> > Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
> > ---
> >  examples/l3fwd-power/main.c | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
> > index fd8d952..ff1ad37 100644
> > --- a/examples/l3fwd-power/main.c
> > +++ b/examples/l3fwd-power/main.c
> > @@ -880,7 +880,9 @@ sleep_until_rx_interrupt(int num)
> >  		port_id = ((uintptr_t)data) >> CHAR_BIT;
> >  		queue_id = ((uintptr_t)data) &
> >  			RTE_LEN2MASK(CHAR_BIT, uint8_t);
> > +		rte_spinlock_lock(&(locks[port_id]));
> >  		rte_eth_dev_rx_intr_disable(port_id, queue_id);
> > +		rte_spinlock_unlock(&(locks[port_id]));
> >  		RTE_LOG(INFO, L3FWD_POWER,
> >  			"lcore %u is waked up from rx interrupt on"
> >  			" port %d queue %d\n",
> > --
> > 2.7.4
> 
> Reviewed-by: Marvin Liu <yong.liu@intel.com>



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

* Re: [dpdk-stable] [dpdk-dev] examples/l3fwd-power: fix RX interrupt disable
  2019-10-23 14:32   ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon
@ 2019-10-24  8:07     ` Hunt, David
  2019-10-27 17:39       ` Thomas Monjalon
  0 siblings, 1 reply; 5+ messages in thread
From: Hunt, David @ 2019-10-24  8:07 UTC (permalink / raw)
  To: Thomas Monjalon, Zhang, Xiao; +Cc: dev, Liu, Yong, stable


On 23/10/2019 15:32, Thomas Monjalon wrote:
> +Cc Dave, the maintainer
>
>>> Interrupt will not be received when disabling RX interrupt without
>>> synchronization mechanism sometimes which leads to wake up issue,
>>> add spinlock to fix it.
>>>
>>> Fixes: b736d64787fc ("mples/l3fwd-power: disable Rx interrupt when
>>> waking up")
>>> Cc: stable@dpdk.org
>>>
>>> Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
>>> ---
>>>   examples/l3fwd-power/main.c | 2 ++
>>>   1 file changed, 2 insertions(+)
>>>
>>> diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
>>> index fd8d952..ff1ad37 100644
>>> --- a/examples/l3fwd-power/main.c
>>> +++ b/examples/l3fwd-power/main.c
>>> @@ -880,7 +880,9 @@ sleep_until_rx_interrupt(int num)
>>>   		port_id = ((uintptr_t)data) >> CHAR_BIT;
>>>   		queue_id = ((uintptr_t)data) &
>>>   			RTE_LEN2MASK(CHAR_BIT, uint8_t);
>>> +		rte_spinlock_lock(&(locks[port_id]));
>>>   		rte_eth_dev_rx_intr_disable(port_id, queue_id);
>>> +		rte_spinlock_unlock(&(locks[port_id]));
>>>   		RTE_LOG(INFO, L3FWD_POWER,
>>>   			"lcore %u is waked up from rx interrupt on"
>>>   			" port %d queue %d\n",
>>> --
>>> 2.7.4
>> Reviewed-by: Marvin Liu <yong.liu@intel.com>


Hi Marvin,
This makes sense, as the corresponding rte_eth_dev_rx_intr_enable() 
already has a spinlock around it.

Acked-by: David Hunt <david.hunt@intel.com>



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

* Re: [dpdk-stable] [dpdk-dev] examples/l3fwd-power: fix RX interrupt disable
  2019-10-24  8:07     ` Hunt, David
@ 2019-10-27 17:39       ` Thomas Monjalon
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2019-10-27 17:39 UTC (permalink / raw)
  To: Zhang, Xiao; +Cc: stable, Hunt, David, dev, Liu, Yong

24/10/2019 10:07, Hunt, David:
> 
> On 23/10/2019 15:32, Thomas Monjalon wrote:
> > +Cc Dave, the maintainer
> >
> >>> Interrupt will not be received when disabling RX interrupt without
> >>> synchronization mechanism sometimes which leads to wake up issue,
> >>> add spinlock to fix it.
> >>>
> >>> Fixes: b736d64787fc ("mples/l3fwd-power: disable Rx interrupt when
> >>> waking up")
> >>> Cc: stable@dpdk.org
> >>>
> >>> Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
> >> Reviewed-by: Marvin Liu <yong.liu@intel.com>
> 
> This makes sense, as the corresponding rte_eth_dev_rx_intr_enable() 
> already has a spinlock around it.
> 
> Acked-by: David Hunt <david.hunt@intel.com>

Applied, thanks




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

end of thread, other threads:[~2019-10-27 17:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-10 16:10 [dpdk-stable] examples/l3fwd-power: fix RX interrupt disable Xiao Zhang
2019-09-20  5:22 ` Liu, Yong
2019-10-23 14:32   ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon
2019-10-24  8:07     ` Hunt, David
2019-10-27 17:39       ` 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).