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 3454FA2EEB for ; Tue, 10 Sep 2019 09:16:42 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1AC1E1EBE6; Tue, 10 Sep 2019 09:16:42 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 5F10B1EB53; Tue, 10 Sep 2019 09:16:38 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Sep 2019 00:16:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,487,1559545200"; d="scan'208";a="175221847" Received: from npg-dpdk-zhangxiao.sh.intel.com ([10.67.110.190]) by orsmga007.jf.intel.com with ESMTP; 10 Sep 2019 00:16:35 -0700 From: Xiao Zhang To: dev@dpdk.org Cc: yong.liu@intel.com, Xiao Zhang , stable@dpdk.org Date: Wed, 11 Sep 2019 00:10:14 +0800 Message-Id: <1568131814-48424-1-git-send-email-xiao.zhang@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-stable] 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "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 --- 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