From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7A512A0351 for ; Fri, 15 May 2020 04:36:16 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5935F1D9D4; Fri, 15 May 2020 04:36:16 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 716321D9B9; Fri, 15 May 2020 04:36:13 +0200 (CEST) IronPort-SDR: CZ6suTjwAejSsy+mpTfbphl+N9d2n+ihY89ANh4/DVRSl6WJKdwt2Zn44lXuz76El1Ke4RWV05 COyKflDLGitw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 May 2020 19:36:12 -0700 IronPort-SDR: F7W2N5lQZGGgMRd6e7AZd4g0BGt0auLpVafSXZHSsinLt5dG737AhBZm4UoI641CdSq70CC0dL ewT/1tG1bBhA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,393,1583222400"; d="scan'208";a="287638150" Received: from npg-dpdk-virtual-marvin-dev.sh.intel.com ([10.67.119.56]) by fmsmga004.fm.intel.com with ESMTP; 14 May 2020 19:36:10 -0700 From: Marvin Liu To: maxime.coquelin@redhat.com, xiaolong.ye@intel.com, zhihong.wang@intel.com, xiao.w.wang@intel.com Cc: dev@dpdk.org, Marvin Liu , stable@dpdk.org Date: Fri, 15 May 2020 10:35:07 +0800 Message-Id: <20200515023507.46543-1-yong.liu@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200515014056.44949-1-yong.liu@intel.com> References: <20200515014056.44949-1-yong.liu@intel.com> Subject: [dpdk-stable] [PATCH v2] net/virtio: fix unexpected event after reconnect 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: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Event notification should be disabled after virtqueue initialization and enabled by calling rte_eth_dev_rx_intr_enable later. When virtio user device reconnecting to vhost, virtqueue_disable_intr should be called to disable event notification. Fixes: 6ebbf4109f35 ("net/virtio-user: fix packed ring server mode") Cc: stable@dpdk.org Signed-off-by: Marvin Liu --- v2: commit log update and cc stable diff --git a/drivers/net/virtio/virtqueue.c b/drivers/net/virtio/virtqueue.c index 0b4e3bf3e..02c8b9fc5 100644 --- a/drivers/net/virtio/virtqueue.c +++ b/drivers/net/virtio/virtqueue.c @@ -174,6 +174,7 @@ virtqueue_rxvq_reset_packed(struct virtqueue *vq) vring_desc_init_packed(vq, size); + virtqueue_disable_intr(vq); return 0; } @@ -210,5 +211,6 @@ virtqueue_txvq_reset_packed(struct virtqueue *vq) vring_desc_init_packed(vq, size); + virtqueue_disable_intr(vq); return 0; } -- 2.17.1