From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 26C46A3295 for ; Wed, 23 Oct 2019 16:32:37 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 679A11C219; Wed, 23 Oct 2019 16:32:36 +0200 (CEST) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 2F6411C214; Wed, 23 Oct 2019 16:32:35 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id BF4AE21165; Wed, 23 Oct 2019 10:32:34 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 23 Oct 2019 10:32:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=+gxG6skbiZK1HcEWjDgp99lupTegj44jw+rhUJkE3OE=; b=K/SjObCE3Fzd XiPEBeFLFkC1HpxIjNdGFoBPnyyUioWzrzqVYYeV9lgYPVfHDNTg9ghfHRcdrmSB LjF7b/GCoNm0YGwlN4aWahlxvT4O8nZhmSFzspJSbFOpl61XR6I9biEJnqAuOSHV oZaymVOniWOJ/aBmqy7OoNEhvjjlBkk= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=+gxG6skbiZK1HcEWjDgp99lupTegj44jw+rhUJkE3 OE=; b=uKivqLEon3E17NrQaeTqYYxN2R15wHIQxYwVM1X8RMK7fqQHJRt6SoZ1j xSQseoPC9Th4GSEWEHKZtxSUK3PTItIPRMJXUbSudy5qCMvrpV866AV+W2BHwW2j 5rFagQd065Aqu9pbByb6MV+mIA1ydcRbk+ylbunY8V7zpvzMIz9oo1L79cEEIWQc eTHAdN9fL4eVwSm+goJVp9PPxW2KD0l/Lh/6GJQDd8M8Kadr+mQo02uNZFuh0wpE v+C7gn2MPZ43f/KAd+Ek3F5A7dkioVqFztfcwefcjJCm8H5bONkXjo3i1G+F97P8 9WOqpmtp4hx30mOmw/rfv0xrSnpig== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrkeelgdejkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkph epjeejrddufeegrddvtdefrddukeegnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhho mhgrshesmhhonhhjrghlohhnrdhnvghtnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 6C9118005B; Wed, 23 Oct 2019 10:32:33 -0400 (EDT) From: Thomas Monjalon To: "Zhang, Xiao" Cc: dev@dpdk.org, "Liu, Yong" , "stable@dpdk.org" , David Hunt Date: Wed, 23 Oct 2019 16:32:32 +0200 Message-ID: <2827869.UTeVd217Fa@xps> In-Reply-To: <86228AFD5BCD8E4EBFD2B90117B5E81E633A8040@SHSMSX103.ccr.corp.intel.com> References: <1568131814-48424-1-git-send-email-xiao.zhang@intel.com> <86228AFD5BCD8E4EBFD2B90117B5E81E633A8040@SHSMSX103.ccr.corp.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] examples/l3fwd-power: fix RX interrupt disable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" +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 > > --- > > 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