From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 82CC91B331; Mon, 12 Feb 2018 04:18:48 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Feb 2018 19:18:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,499,1511856000"; d="scan'208";a="26853859" Received: from dpdk06.sh.intel.com ([10.67.110.196]) by orsmga003.jf.intel.com with ESMTP; 11 Feb 2018 19:18:46 -0800 From: Jianfeng Tan To: dev@dpdk.org Cc: yliu@fridaylinux.org, maxime.coquelin@redhat.com, tiwei.bie@intel.com, Jianfeng Tan , stable@dpdk.org Date: Mon, 12 Feb 2018 03:20:28 +0000 Message-Id: <1518405628-23976-4-git-send-email-jianfeng.tan@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1518405628-23976-1-git-send-email-jianfeng.tan@intel.com> References: <1518405628-23976-1-git-send-email-jianfeng.tan@intel.com> Subject: [dpdk-dev] [PATCH 3/3] net/virtio-user: fix not proper initialized 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: , X-List-Received-Date: Mon, 12 Feb 2018 03:18:49 -0000 intr_handle->fd was wrongly initialized as 0 (usually as the stdio fd) when virtio-user is used with vhost-kernel. So the interrupt thread might wrongly treat stdin events as LSC interrupts. Fixes: 3d4fb6fd2505 ("net/virtio-user: support Rx interrupt") Cc: stable@dpdk.org Signed-off-by: Jianfeng Tan --- drivers/net/virtio/virtio_user/virtio_user_dev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c index b5809ee..f90fee9 100644 --- a/drivers/net/virtio/virtio_user/virtio_user_dev.c +++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c @@ -251,6 +251,7 @@ virtio_user_fill_intr_handle(struct virtio_user_dev *dev) eth_dev->intr_handle->type = RTE_INTR_HANDLE_VDEV; /* For virtio vdev, no need to read counter for clean */ eth_dev->intr_handle->efd_counter_size = 0; + eth_dev->intr_handle->fd = -1; if (dev->vhostfd >= 0) eth_dev->intr_handle->fd = dev->vhostfd; -- 2.7.4