From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f194.google.com (mail-wr0-f194.google.com [209.85.128.194]) by dpdk.org (Postfix) with ESMTP id E75532C8 for ; Wed, 23 May 2018 11:20:10 +0200 (CEST) Received: by mail-wr0-f194.google.com with SMTP id w18-v6so21360361wrn.6 for ; Wed, 23 May 2018 02:20:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:content-transfer-encoding:mime-version; bh=4KUiuq9OwfAf5OzsDHMTlX6M4hYgglv7FmF+sX10KtY=; b=V3ntWqx6MnGMSVRSrGdx4hJNMJvfdi1UyoJJ+0AirvvEyUK/XzdJgfGttHY5rb9QLN 0r+Z7XhTRPL8Qz9g3Ol9k+BSdjwwKa4cCfgVuIV21XgGyJk4dAP0hOt9bhrL75ogHs1w A4PwFdB/3dJfXruBVk9/v11Xrihn9qlaiatUWokhvk941qwvTOMT4FSuKQPw18g8dCXe e4y+Qg5osw55rxxMVdPMi9Hm5k03Dt9PBIR5UB+bzfn7cm05GCyBBqGiTCRl9uSlGtdc JjxP7g8USFf37pWXcCvTduP6C8wR/ED2zjge3Mc4z4gt6HAJUKVE5HHF026h2oizYQcA JZXw== X-Gm-Message-State: ALKqPweEsAnqQZ6chIF8qIKyU4TqDUCo2sX4XULl3nRW2I8O9Szws3Yr e1p1tBQvaR2osoC+ogbOvd8= X-Google-Smtp-Source: AB8JxZpJho1nz15/rzpCJh0U0EV4KGMYg7T8M20zyExc70h97ZOOu5Pza0JNK27juyCU8vQS+/TIgA== X-Received: by 2002:adf:a0fd:: with SMTP id n58-v6mr1492971wrn.217.1527067210579; Wed, 23 May 2018 02:20:10 -0700 (PDT) Received: from localhost ([2a00:23c5:be9a:5200:ce4c:82c0:d567:ecbb]) by smtp.gmail.com with ESMTPSA id c21-v6sm21724675wre.81.2018.05.23.02.20.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 May 2018 02:20:09 -0700 (PDT) Message-ID: <1527067207.6997.3.camel@debian.org> From: Luca Boccassi To: Maxime Coquelin , Tomasz Kulasek Cc: Dariusz Stojaczyk , Jianfeng Tan , dpdk stable Date: Wed, 23 May 2018 10:20:07 +0100 In-Reply-To: <3003cecb-1c1d-c21b-8a41-0639bdd01511@redhat.com> References: <20180501104509.17238-1-luca.boccassi@gmail.com> <20180501104509.17238-7-luca.boccassi@gmail.com> <3003cecb-1c1d-c21b-8a41-0639bdd01511@redhat.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Evolution 3.22.6-1+deb9u1 Mime-Version: 1.0 Subject: Re: [dpdk-stable] patch 'vhost: fix device cleanup at stop' has been queued to LTS release 16.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: , X-List-Received-Date: Wed, 23 May 2018 09:20:11 -0000 On Wed, 2018-05-23 at 09:35 +0200, Maxime Coquelin wrote: > Hi Luca, Tomasz, >=20 > While testing 16.11 branch, I noticed vhost lib is broken. > The symptoms is no packets are sent or received. >=20 > I ran a bisect which points to this commit. Reverting it solves the > issue. >=20 > Debugging a bit more, I can see that the callfd is valid when no > packets > are being transmitted. I think the problem is that the callfd is > received after the kickfd: >=20 > VHOST_CONFIG: read message VHOST_USER_SET_VRING_KICK > VHOST_CONFIG: vring kick idx:0 file:16 > VHOST_CONFIG: virtio is not ready for processing. > VHOST_CONFIG: read message VHOST_USER_SET_VRING_CALL > VHOST_CONFIG: vring call idx:0 file:17 >=20 > And in 16.11, the new_device callback is called from the > VHOST_USER_SET_VRING_KICK handling, only if the device is ready. > This is different in later versions, where the new_device callback > can be called for any request. >=20 > The right way to fix this would be to move the new_device callback > call > for any request, but I think there is a non-negligible risk of > regression so we'd need to be careful doing that. >=20 > Other option is to simply revert Tomasz patch in 16.11 LTS. This is > not > ideal because Tomasz patch is fixing a real issue (new_device get > called > with an outdated/invalid callfd). However, I don't know if it has > real > consequences, as the callfd is updated right after. >=20 > Except if someone face real issue due to callfd being updated after > new_device is called, then my suggestion would be to revert Tomasz > patch > as we are at 6 months of 16.11 EOL. >=20 > Luca, Tomasz, what's your take on this? >=20 > Regards, > Maxime I'm fine with your suggestion of reverting the patch, as it seems less risky. > On 05/01/2018 12:44 PM, luca.boccassi@gmail.com wrote: > > Hi, > >=20 > > FYI, your patch has been queued to LTS release 16.11.7 > >=20 > > Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable > > yet. > > It will be pushed if I get no objections before 05/03/18. So please > > shout if anyone has objections. > >=20 > > Thanks. > >=20 > > Luca Boccassi > >=20 > > --- > > =C2=A0From 357f27736c79d0258409666277b6e113d11c757b Mon Sep 17 00:00:00 > > 2001 > > From: Tomasz Kulasek > > Date: Fri, 9 Feb 2018 18:10:00 +0100 > > Subject: [PATCH] vhost: fix device cleanup at stop > >=20 > > [ upstream commit ace7b6b7859e1dc410589610a8e436c1a3b430f3 ] > >=20 > > This prevents from destroying & recreating user device in > > "incomplete" > > vring state. virtio_is_ready() was returning true for devices with > > vrings which did not have valid callfd (their > > VHOST_USER_SET_VRING_CALL > > hasn't arrived yet) > >=20 > > Fixes: 8f972312b8f4 ("vhost: support vhost-user") > >=20 > > Signed-off-by: Dariusz Stojaczyk > > Signed-off-by: Tomasz Kulasek > > Reviewed-by: Jianfeng Tan > > Reviewed-by: Maxime Coquelin > > --- > > =C2=A0 lib/librte_vhost/vhost_user.c | 5 +++++ > > =C2=A0 1 file changed, 5 insertions(+) > >=20 > > diff --git a/lib/librte_vhost/vhost_user.c > > b/lib/librte_vhost/vhost_user.c > > index abcb6ac14..0d30f11ef 100644 > > --- a/lib/librte_vhost/vhost_user.c > > +++ b/lib/librte_vhost/vhost_user.c > > @@ -800,6 +800,11 @@ vhost_user_get_vring_base(struct virtio_net > > *dev, > > =C2=A0=C2=A0 > > =C2=A0=C2=A0 vq->kickfd =3D VIRTIO_UNINITIALIZED_EVENTFD; > > =C2=A0=C2=A0 > > + if (vq->callfd >=3D 0) > > + close(vq->callfd); > > + > > + vq->callfd =3D VIRTIO_UNINITIALIZED_EVENTFD; > > + > > =C2=A0=C2=A0 if (dev->dequeue_zero_copy) > > =C2=A0=C2=A0 free_zmbufs(vq); > > =C2=A0=C2=A0 rte_free(vq->shadow_used_ring); > >=20 --=20 Kind regards, Luca Boccassi