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 CFA45A052A for ; Mon, 25 Jan 2021 18:15:25 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A736B140FF6; Mon, 25 Jan 2021 18:15:25 +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 19B6E141008 for ; Mon, 25 Jan 2021 18:15:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611594923; 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=cskg6ls3A+WFjTciTwDh7egqkq0zkcvoRj/A0EtShMo=; b=VM2jWlsO1btRr04p/Ad0KBEXdQd0yFzf1stikLrAdPFXzp/8W5OCD34XNFPRHe8SNVsZOs NF0jZ8MYQHJH+WFvhIL77odKGvqKIzXxGO4UbBGjoPe0Luow6D78tfsIPDo3D7pYMO0WHP P1YObaZ/uvdzsWr7p/wi8x3a7a7INRo= 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-15-irlTEXWJNJGPN_a2ZgjB-A-1; Mon, 25 Jan 2021 12:15:19 -0500 X-MC-Unique: irlTEXWJNJGPN_a2ZgjB-A-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 98D6219251C3; Mon, 25 Jan 2021 17:15:18 +0000 (UTC) Received: from max-t490s.redhat.com (unknown [10.36.110.31]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1111F5D9DB; Mon, 25 Jan 2021 17:15:00 +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: Mon, 25 Jan 2021 18:14:03 +0100 Message-Id: <20210125171444.167241-4-maxime.coquelin@redhat.com> In-Reply-To: <20210125171444.167241-1-maxime.coquelin@redhat.com> References: <20210125171444.167241-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 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Subject: [dpdk-stable] [PATCH v3 03/44] net/virtio: fix getting old status on reconnect X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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" 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); -- 2.29.2