From patchwork Tue Jan 19 21:24:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Coquelin X-Patchwork-Id: 86899 X-Patchwork-Delegate: maxime.coquelin@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id AC3B1A0A05; Tue, 19 Jan 2021 22:26:18 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E80F8140E0C; Tue, 19 Jan 2021 22:26:00 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mails.dpdk.org (Postfix) with ESMTP id 918A5140E07 for ; Tue, 19 Jan 2021 22:25:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611091559; 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=Eu63RdE/wlJsSWLssbNc44jibRPKUsK7e0FJLCb6lsg=; b=OJTTdXat3HddeJ4i+S13WGLOiyJuyWq1cps7BG72Ec2Yde9btHKO+vgefkeUWfm9dqRfXu 9fim1sTJp3yEzi8i4n6HSKDohYWfe6nWRU1ESn+JIUB/uORLoowBsufuCOm+k2MVsIg3Rb N9to3Dwq8vh0NAP9igSakUHa8ZDiVEM= 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-447-37ySPFsMMKSj7MR92pAiyw-1; Tue, 19 Jan 2021 16:25:55 -0500 X-MC-Unique: 37ySPFsMMKSj7MR92pAiyw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 09166180A0AD; Tue, 19 Jan 2021 21:25:54 +0000 (UTC) Received: from max-t490s.redhat.com (unknown [10.36.110.29]) by smtp.corp.redhat.com (Postfix) with ESMTP id 539BE5D9E2; Tue, 19 Jan 2021 21:25:52 +0000 (UTC) From: Maxime Coquelin To: dev@dpdk.org, chenbo.xia@intel.com, olivier.matz@6wind.com, amorenoz@redhat.com, david.marchand@redhat.com Cc: Maxime Coquelin , stable@dpdk.org Date: Tue, 19 Jan 2021 22:24:26 +0100 Message-Id: <20210119212507.1043636-4-maxime.coquelin@redhat.com> In-Reply-To: <20210119212507.1043636-1-maxime.coquelin@redhat.com> References: <20210119212507.1043636-1-maxime.coquelin@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=maxime.coquelin@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [dpdk-dev] [PATCH v2 03/44] net/virtio: fix getting old status on reconnect 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 Sender: "dev" This patch fixes getting reset status from the restarted vhost-user backend in case of reconnection, instead of the status at the time of the disconnection. This issue was not spotted earlier because Vhost-user protocol status feature was disabled in server mode. Fixes: 47235f16505f ("net/virtio-user: set status on socket reconnect") Cc: stable@dpdk.org Signed-off-by: Maxime Coquelin Reviewed-by: Chenbo Xia --- drivers/net/virtio/virtio_user_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c index 241808cd8f..7abba1f1ee 100644 --- a/drivers/net/virtio/virtio_user_ethdev.c +++ b/drivers/net/virtio/virtio_user_ethdev.c @@ -77,7 +77,7 @@ virtio_user_server_reconnect(struct virtio_user_dev *dev) return -1; dev->vhostfd = connectfd; - old_status = vtpci_get_status(hw); + old_status = dev->status; vtpci_reset(hw);