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 CAA23A2EFC for ; Fri, 20 Sep 2019 07:22:21 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 881561F2A5; Fri, 20 Sep 2019 07:22:21 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id AFE2C1F29B; Fri, 20 Sep 2019 07:22:17 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Sep 2019 22:22:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,527,1559545200"; d="scan'208";a="189833696" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga003.jf.intel.com with ESMTP; 19 Sep 2019 22:22:09 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 19 Sep 2019 22:22:02 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.140]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.92]) with mapi id 14.03.0439.000; Fri, 20 Sep 2019 13:22:00 +0800 From: "Liu, Yong" To: "Zhang, Xiao" , "dev@dpdk.org" CC: "stable@dpdk.org" Thread-Topic: examples/l3fwd-power: fix RX interrupt disable Thread-Index: AQHVZ6e6kXNsAJmlPUOjOJxtjAD+tqc0FqCw Date: Fri, 20 Sep 2019 05:22:00 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E633A8040@SHSMSX103.ccr.corp.intel.com> References: <1568131814-48424-1-git-send-email-xiao.zhang@intel.com> In-Reply-To: <1568131814-48424-1-git-send-email-xiao.zhang@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNmQ0NjA1M2MtZjg3OS00OTlhLWFiOTItM2RkYjhkMGJkNGEyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoick9yM0RJZzZcL2ZBdmhTT1NFbXd6eTVUUVIwMndMakVWS29lbm12c0xBRWUwbVwvdm1Icmk3cEIyejR1RGpxUUY4In0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [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" > -----Original Message----- > From: Zhang, Xiao > Sent: Wednesday, September 11, 2019 12:10 AM > To: dev@dpdk.org > Cc: Liu, Yong ; Zhang, Xiao ; > stable@dpdk.org > Subject: examples/l3fwd-power: fix RX interrupt disable >=20 > Interrupt will not be received when disabling RX interrupt without > synchronization mechanism sometimes which leads to wake up issue, > add spinlock to fix it. >=20 > Fixes: b736d64787fc ("mples/l3fwd-power: disable Rx interrupt when > waking up") > Cc: stable@dpdk.org >=20 > Signed-off-by: Xiao Zhang > --- > examples/l3fwd-power/main.c | 2 ++ > 1 file changed, 2 insertions(+) >=20 > 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 =3D ((uintptr_t)data) >> CHAR_BIT; > queue_id =3D ((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 Regards, Marvin