From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <stable-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 7400DA32A1
	for <public@inbox.dpdk.org>; Thu, 24 Oct 2019 10:07:08 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 685D21DF96;
	Thu, 24 Oct 2019 10:07:08 +0200 (CEST)
Received: from mga07.intel.com (mga07.intel.com [134.134.136.100])
 by dpdk.org (Postfix) with ESMTP id E0B641DF96;
 Thu, 24 Oct 2019 10:07:06 +0200 (CEST)
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
Received: from orsmga008.jf.intel.com ([10.7.209.65])
 by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 24 Oct 2019 01:07:05 -0700
X-IronPort-AV: E=Sophos;i="5.68,224,1569308400"; d="scan'208";a="192109962"
Received: from dhunt5-mobl4.ger.corp.intel.com (HELO [10.237.221.107])
 ([10.237.221.107])
 by orsmga008-auth.jf.intel.com with ESMTP/TLS/AES256-SHA;
 24 Oct 2019 01:07:04 -0700
To: Thomas Monjalon <thomas@monjalon.net>, "Zhang, Xiao" <xiao.zhang@intel.com>
Cc: dev@dpdk.org, "Liu, Yong" <yong.liu@intel.com>,
 "stable@dpdk.org" <stable@dpdk.org>
References: <1568131814-48424-1-git-send-email-xiao.zhang@intel.com>
 <86228AFD5BCD8E4EBFD2B90117B5E81E633A8040@SHSMSX103.ccr.corp.intel.com>
 <2827869.UTeVd217Fa@xps>
From: "Hunt, David" <david.hunt@intel.com>
Message-ID: <17d41a58-909a-0650-eac2-0ffe33081ca8@intel.com>
Date: Thu, 24 Oct 2019 09:07:02 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101
 Thunderbird/60.7.2
MIME-Version: 1.0
In-Reply-To: <2827869.UTeVd217Fa@xps>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Content-Language: en-US
Subject: Re: [dpdk-stable] [dpdk-dev] examples/l3fwd-power: fix RX interrupt
	disable
X-BeenThere: stable@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches for DPDK stable branches <stable.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/stable>,
 <mailto:stable-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/stable/>
List-Post: <mailto:stable@dpdk.org>
List-Help: <mailto:stable-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/stable>,
 <mailto:stable-request@dpdk.org?subject=subscribe>
Errors-To: stable-bounces@dpdk.org
Sender: "stable" <stable-bounces@dpdk.org>


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>