From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B0546C35247 for ; Wed, 5 Feb 2020 02:11:54 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 68D16214AF for ; Wed, 5 Feb 2020 02:11:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 68D16214AF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 27E271C1E0; Wed, 5 Feb 2020 03:11:53 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 2B3E51C1DF for ; Wed, 5 Feb 2020 03:11:51 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Feb 2020 18:11:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,404,1574150400"; d="scan'208";a="225698787" Received: from dpdk-virtio-tbie-2.sh.intel.com ([10.67.104.74]) by fmsmga008.fm.intel.com with ESMTP; 04 Feb 2020 18:11:49 -0800 From: Tiwei Bie To: dev@dpdk.org, maxime.coquelin@redhat.com, zhihong.wang@intel.com Cc: Xuan Ding Date: Wed, 5 Feb 2020 10:11:08 +0800 Message-Id: <20200205021108.370141-1-tiwei.bie@intel.com> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] net/virtio-user: do not reset virtqueues for split ring X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" Add missing braces to avoid resetting virtqueues unconditionally during reconnection. Fixes: 6ebbf4109f35 ("net/virtio-user: fix packed ring server mode") Signed-off-by: Tiwei Bie --- Cc: Xuan Ding drivers/net/virtio/virtio_user_ethdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c index f3b35d1bd..e61af4068 100644 --- a/drivers/net/virtio/virtio_user_ethdev.c +++ b/drivers/net/virtio/virtio_user_ethdev.c @@ -89,10 +89,11 @@ virtio_user_server_reconnect(struct virtio_user_dev *dev) dev->features &= dev->device_features; /* For packed ring, resetting queues is required in reconnection. */ - if (vtpci_packed_queue(hw)) + if (vtpci_packed_queue(hw)) { PMD_INIT_LOG(NOTICE, "Packets on the fly will be dropped" " when packed ring reconnecting."); virtio_user_reset_queues_packed(eth_dev); + } ret = virtio_user_start_device(dev); if (ret < 0) -- 2.24.1