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 9DA03A0555 for ; Wed, 19 Feb 2020 16:57:01 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 94B59B62; Wed, 19 Feb 2020 16:57:01 +0100 (CET) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by dpdk.org (Postfix) with ESMTP id 65462B62 for ; Wed, 19 Feb 2020 16:57:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582127819; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OlakV5YjIOeF6wSd5fMZSj2uuLWaD4vXW/g0fqm2wsw=; b=YHOOYUObM6hTcTgoPHx5Q/qCECAx4V5+b6n/17elevfDlgg4cgNkb3Ivd6gWd4mPUIdVGq rc3N290RshpUL3RvwlCnP7BikdUOKcoIsdd6fPmvaYahScJThwSz0bQhZnyhVTKKieI2qu ptVJiCFPyKC6zDiyz0Yt7aDHfY4o13U= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-308-BsbOlupGP7KHEGpfG7-wCQ-1; Wed, 19 Feb 2020 10:56:57 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 35123800D4E; Wed, 19 Feb 2020 15:56:56 +0000 (UTC) Received: from rh.redhat.com (unknown [10.33.36.109]) by smtp.corp.redhat.com (Postfix) with ESMTP id 666E5811F8; Wed, 19 Feb 2020 15:56:54 +0000 (UTC) From: Kevin Traynor To: Xiao Wang Cc: Harman Kalra , Liang Ma , David Hunt , dpdk stable Date: Wed, 19 Feb 2020 15:55:52 +0000 Message-Id: <20200219155607.20495-7-ktraynor@redhat.com> In-Reply-To: <20200219155607.20495-1-ktraynor@redhat.com> References: <20200219155607.20495-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-MC-Unique: BsbOlupGP7KHEGpfG7-wCQ-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Subject: [dpdk-stable] patch 'examples/l3fwd-power: fix interrupt disable' has been queued to LTS release 18.11.7 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" Hi, FYI, your patch has been queued to LTS release 18.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/25/20. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasi= ng (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/10fdbbc7af55e6d1aa= 5a4501848c1edb17c47b8c Thanks. Kevin. --- >From 10fdbbc7af55e6d1aa5a4501848c1edb17c47b8c Mon Sep 17 00:00:00 2001 From: Xiao Wang Date: Mon, 20 Jan 2020 22:06:57 -0500 Subject: [PATCH] examples/l3fwd-power: fix interrupt disable [ upstream commit 49dcf7b98e87a5d2880693da4c09af11e58f3447 ] Since all related queues' interrupts are turned on before epoll, we need to turn off all the interrupts after wakeup. This patch fixes the issue of only turning off the interrupted queues. Fixes: b736d64787fc ("examples/l3fwd-power: disable Rx interrupt when wakin= g up") Signed-off-by: Xiao Wang Tested-by: Harman Kalra Reviewed-by: Liang Ma Tested-by: Liang Ma Acked-by: David Hunt --- examples/l3fwd-power/main.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c index cbad7f7b59..77009ce809 100644 --- a/examples/l3fwd-power/main.c +++ b/examples/l3fwd-power/main.c @@ -815,7 +815,4 @@ sleep_until_rx_interrupt(int num) =09=09queue_id =3D ((uintptr_t)data) & =09=09=09RTE_LEN2MASK(CHAR_BIT, uint8_t); -=09=09rte_spinlock_lock(&(locks[port_id])); -=09=09rte_eth_dev_rx_intr_disable(port_id, queue_id); -=09=09rte_spinlock_unlock(&(locks[port_id])); =09=09RTE_LOG(INFO, L3FWD_POWER, =09=09=09"lcore %u is waked up from rx interrupt on" @@ -827,5 +824,5 @@ sleep_until_rx_interrupt(int num) } =20 -static void turn_on_intr(struct lcore_conf *qconf) +static void turn_on_off_intr(struct lcore_conf *qconf, bool on) { =09int i; @@ -840,5 +837,8 @@ static void turn_on_intr(struct lcore_conf *qconf) =20 =09=09rte_spinlock_lock(&(locks[port_id])); -=09=09rte_eth_dev_rx_intr_enable(port_id, queue_id); +=09=09if (on) +=09=09=09rte_eth_dev_rx_intr_enable(port_id, queue_id); +=09=09else +=09=09=09rte_eth_dev_rx_intr_disable(port_id, queue_id); =09=09rte_spinlock_unlock(&(locks[port_id])); =09} @@ -1155,7 +1155,8 @@ start_rx: =09=09=09=09/* suspend until rx interrupt triggers */ =09=09=09=09if (intr_en) { -=09=09=09=09=09turn_on_intr(qconf); +=09=09=09=09=09turn_on_off_intr(qconf, 1); =09=09=09=09=09sleep_until_rx_interrupt( =09=09=09=09=09=09qconf->n_rx_queue); +=09=09=09=09=09turn_on_off_intr(qconf, 0); =09=09=09=09=09/** =09=09=09=09=09 * start receiving packets immediately --=20 2.21.1 --- Diff of the applied patch vs upstream commit (please double-check if non-= empty: --- --- -=092020-02-19 15:43:50.096863152 +0000 +++ 0007-examples-l3fwd-power-fix-interrupt-disable.patch=092020-02-19 15:4= 3:49.724142135 +0000 @@ -1 +1 @@ -From 49dcf7b98e87a5d2880693da4c09af11e58f3447 Mon Sep 17 00:00:00 2001 +From 10fdbbc7af55e6d1aa5a4501848c1edb17c47b8c Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 49dcf7b98e87a5d2880693da4c09af11e58f3447 ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -23 +24 @@ -index e63abb1da8..c7fe0ec034 100644 +index cbad7f7b59..77009ce809 100644 @@ -26 +27 @@ -@@ -871,7 +871,4 @@ sleep_until_rx_interrupt(int num) +@@ -815,7 +815,4 @@ sleep_until_rx_interrupt(int num) @@ -34 +35 @@ -@@ -883,5 +880,5 @@ sleep_until_rx_interrupt(int num) +@@ -827,5 +824,5 @@ sleep_until_rx_interrupt(int num) @@ -41 +42 @@ -@@ -896,5 +893,8 @@ static void turn_on_intr(struct lcore_conf *qconf) +@@ -840,5 +837,8 @@ static void turn_on_intr(struct lcore_conf *qconf) @@ -51 +52 @@ -@@ -1331,7 +1331,8 @@ start_rx: +@@ -1155,7 +1155,8 @@ start_rx: