From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 34C0243DDE; Wed, 3 Apr 2024 07:08:52 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B964440144; Wed, 3 Apr 2024 07:08:51 +0200 (CEST) Received: from mail-oa1-f50.google.com (mail-oa1-f50.google.com [209.85.160.50]) by mails.dpdk.org (Postfix) with ESMTP id 5AF4C400D7 for ; Wed, 3 Apr 2024 07:08:50 +0200 (CEST) Received: by mail-oa1-f50.google.com with SMTP id 586e51a60fabf-22e82734a13so553515fac.2 for ; Tue, 02 Apr 2024 22:08:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smartx-com.20230601.gappssmtp.com; s=20230601; t=1712120929; x=1712725729; darn=dpdk.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=JPsObpHT11qp7vr9FshFzqrHjLAOkzwmGywnGBB9Nfw=; b=IPTc7cHkb9YJVlKGnPxHgxuV73AiXFJQ4dwNa7VwKObaXzE6KhAXFVflphF6ReKQem t2BRtY9gQpuZT3bTP+xKx8ftmOot5jFY2hEP1gXT2dpwptNcsUQxn2P9b5X+nqg8vHks QZUi/wvw4OH1bSXYqqa7E/CUEzMPw3j2MINdhs50avrhDKcrsPOdYrS85B943Cs6x8Hb QbD2V5eIt+yWOHKjV61b1HOu2qdasR4912hDie+CxEOgB9k8M5vLwek5UDQ4aGbJwBVf nRfOwYVcdKxb/ulJgcg2v1okzei6UCT29AalNSdpQBB8XXRGFmFRsnsMtdsbxycwloFa L2mA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712120929; x=1712725729; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JPsObpHT11qp7vr9FshFzqrHjLAOkzwmGywnGBB9Nfw=; b=Dzcqpy403gBcWjzlisdoJVfmBZRtTyrjpOEKXVHow3uoMPWcH6rfzmc+7ES5B3jo6K jishQ+UtRd/FK6dw5HGwkVoaDgpyE2jsFl6iuTXdnGr+2RU8eMhZGpeaS6cPYOhLPiod wjEEQlxmKiInJmlZzK0iJ7p/Ym88Pwq6LopgcrX0EHaW6OuXcbcGQpfarkz7g4qhLKxX nHvlxzfU7qQObnyVAnD60t4Tu0/RG+pzjh+cGBRKAa7KQaL6kojC7AJnfdNqhJ2ULm/z 5dpCd+bWr3wwZkOpemTYXTsDjIV/ZfyNrnFV+xqQXHrA06KMnj+4iSl2h3m+iqpF/Sl1 H8Kw== X-Gm-Message-State: AOJu0YzKdnXT85kCAZnYqdQrshsvACnG/iWISIJvX7zvS0CDIGI+YqO2 coGyIbdeY5flalwYzN5+USH3tGGPajjru4GGjn+BY/8svX5d2L5ptmI6OAVSaoK+/4GIHITjYRJ Gy9Y= X-Google-Smtp-Source: AGHT+IGAY4G6Of1cp46pp5DpU9GECUMCkCqtB58TW71G4tlU+D/BSr3fPDu7dT+iQXT9ASv8ON8HCw== X-Received: by 2002:a05:6871:5b01:b0:22a:7dc3:2457 with SMTP id op1-20020a0568715b0100b0022a7dc32457mr15183490oac.36.1712120928919; Tue, 02 Apr 2024 22:08:48 -0700 (PDT) Received: from smtpclient.apple ([8.210.91.195]) by smtp.gmail.com with ESMTPSA id ey12-20020a056a0038cc00b006eaaaf5e0a8sm10823487pfb.71.2024.04.02.22.08.46 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Apr 2024 22:08:47 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.500.231\)) Subject: Re: [PATCH] vhost: cleanup vq resubmit info when set_inflight_fd From: Haoqian He In-Reply-To: <20240321095805.923117-1-haoqian.he@smartx.com> Date: Wed, 3 Apr 2024 13:08:34 +0800 Cc: Maxime Coquelin , Chenbo Xia , Li Feng , yuhua@smartx.com Content-Transfer-Encoding: quoted-printable Message-Id: <0138B0A6-200E-407F-A8F8-E8648398820E@smartx.com> References: <20240321095805.923117-1-haoqian.he@smartx.com> To: dev@dpdk.org X-Mailer: Apple Mail (2.3731.500.231) X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > 2024=E5=B9=B43=E6=9C=8821=E6=97=A5 17:57=EF=BC=8CHaoqian He = =E5=86=99=E9=81=93=EF=BC=9A >=20 > We should cleanup vq resubmit info when set_inflight_fd > before set_vring_kick which will check if there is any > inflight io waiting for resubmission. >=20 > Otherwise, when the vm is rebooting immediately after > reconnecting to the vhost target (inflight io has not > been resubmitted yet), the vhost backend still use the > old resubmit info set when reconnection. >=20 > Signed-off-by: Haoqian He > --- > lib/vhost/vhost_user.c | 1 + > 1 file changed, 1 insertion(+) >=20 > diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c > index 414192500e..7c54afc5fb 100644 > --- a/lib/vhost/vhost_user.c > +++ b/lib/vhost/vhost_user.c > @@ -1871,6 +1871,7 @@ vhost_user_set_inflight_fd(struct virtio_net = **pdev, > if (!vq) > continue; >=20 > + cleanup_vq_inflight(dev, vq); > if (vq_is_packed(dev)) { > vq->inflight_packed =3D addr; > vq->inflight_packed->desc_num =3D queue_size; > --=20 > 2.41.0 >=20 Ping. Hi, This issue can be reproduced by restarting vm internally and the = vhost live recovery continuously. Thanks, Haoqian=