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 E813DA04B5 for ; Tue, 3 Dec 2019 19:27:50 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DEAE71F5; Tue, 3 Dec 2019 19:27:50 +0100 (CET) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by dpdk.org (Postfix) with ESMTP id 7C9951F5 for ; Tue, 3 Dec 2019 19:27:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575397668; 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=2tC840qHYoOgbnx+ppJRJDsiEkJVT1McCzBCgkRjBjw=; b=OrUP4ml5Qli1kZT6QIzK4PXfjz/b6uopzXTKFognHtvahQz5tngkw2ni7DrNHfpglE+92B kDh9IExIVrY15M6beB9x2NDQ64MecxmPS3lTNjLxs8C70HAqUI0tZNVNRbRNFBdAg27wyo I9Xax3XiqepUpLlJd6LfgWu6SiHnmq8= 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-161-324hY7M7Pxq0XNAMhj8aXQ-1; Tue, 03 Dec 2019 13:27:45 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A2B4F188352D; Tue, 3 Dec 2019 18:27:44 +0000 (UTC) Received: from rh.redhat.com (ovpn-117-10.ams2.redhat.com [10.36.117.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 25F6B5C557; Tue, 3 Dec 2019 18:27:41 +0000 (UTC) From: Kevin Traynor To: Noa Ezra Cc: Matan Azrad , Maxime Coquelin , dpdk stable Date: Tue, 3 Dec 2019 18:26:18 +0000 Message-Id: <20191203182714.17297-9-ktraynor@redhat.com> In-Reply-To: <20191203182714.17297-1-ktraynor@redhat.com> References: <20191203182714.17297-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: 324hY7M7Pxq0XNAMhj8aXQ-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Subject: [dpdk-stable] patch 'net/vhost: fix redundant queue state event' has been queued to LTS release 18.11.6 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.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 12/10/19. 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/7cc59d5a0c085e4e4d= 2556525615f0b3084441d2 Thanks. Kevin. --- >From 7cc59d5a0c085e4e4d2556525615f0b3084441d2 Mon Sep 17 00:00:00 2001 From: Noa Ezra Date: Thu, 20 Jun 2019 06:33:03 +0000 Subject: [PATCH] net/vhost: fix redundant queue state event [ upstream commit f2f0577eff3d13e761996c7390a244963b433bdc ] In some situations, when a virtual machine is starting, vring_state_changed can be called while there was no change in the queue state. This fix makes sure that there was really a change in the queue state before calling the callback for EVENT_QUEUE_STATE. Fixes: ee584e9710b9 ("vhost: add driver on top of the library") Signed-off-by: Noa Ezra Reviewed-by: Matan Azrad Reviewed-by: Maxime Coquelin --- drivers/net/vhost/rte_eth_vhost.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_= vhost.c index ad18b1bd5..b70b9152f 100644 --- a/drivers/net/vhost/rte_eth_vhost.c +++ b/drivers/net/vhost/rte_eth_vhost.c @@ -852,4 +852,8 @@ vring_state_changed(int vid, uint16_t vring, int enable= ) =09state =3D vring_states[eth_dev->data->port_id]; =09rte_spinlock_lock(&state->lock); +=09if (state->cur[vring] =3D=3D enable) { +=09=09rte_spinlock_unlock(&state->lock); +=09=09return 0; +=09} =09state->cur[vring] =3D enable; =09state->max_vring =3D RTE_MAX(vring, state->max_vring); --=20 2.21.0 --- Diff of the applied patch vs upstream commit (please double-check if non-= empty: --- --- -=092019-12-03 17:29:52.343802104 +0000 +++ 0009-net-vhost-fix-redundant-queue-state-event.patch=092019-12-03 17:29= :51.703750932 +0000 @@ -1 +1 @@ -From f2f0577eff3d13e761996c7390a244963b433bdc Mon Sep 17 00:00:00 2001 +From 7cc59d5a0c085e4e4d2556525615f0b3084441d2 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit f2f0577eff3d13e761996c7390a244963b433bdc ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -22 +23 @@ -index c3ba60276..5de21f143 100644 +index ad18b1bd5..b70b9152f 100644 @@ -25 +26 @@ -@@ -854,4 +854,8 @@ vring_state_changed(int vid, uint16_t vring, int enabl= e) +@@ -852,4 +852,8 @@ vring_state_changed(int vid, uint16_t vring, int enabl= e)