From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 76665CA9EB6 for ; Wed, 23 Oct 2019 14:32:37 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 0E61D2173B for ; Wed, 23 Oct 2019 14:32:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=monjalon.net header.i=@monjalon.net header.b="K/SjObCE"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="uKivqLEo" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0E61D2173B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=monjalon.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org 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