From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id E2B1F28EE for ; Tue, 28 Nov 2017 03:47:05 +0100 (CET) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Nov 2017 18:47:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,466,1505804400"; d="scan'208";a="153867987" Received: from deepin-15.sh.intel.com (HELO deepin-15.5-oivbkq) ([10.67.104.165]) by orsmga004.jf.intel.com with ESMTP; 27 Nov 2017 18:47:02 -0800 Date: Tue, 28 Nov 2017 10:46:35 +0800 From: Tiwei Bie To: junjie.j.chen@intel.com Cc: yliu@fridaylinux.org, maxime.coquelin@redhat.com, jianfeng.tan@intel.com, dev@dpdk.org Message-ID: <20171128024635.5zouuhptqbbv3bsx@deepin-15.5-oivbkq> References: <20171128094826.179454-1-junjie.j.chen@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20171128094826.179454-1-junjie.j.chen@intel.com> User-Agent: NeoMutt/20170609 (1.8.3) Subject: Re: [dpdk-dev] [PATCH v2] vhost: support virtqueue interrupt/notification suppression 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: Tue, 28 Nov 2017 02:47:06 -0000 Hi, On Tue, Nov 28, 2017 at 04:48:26AM -0500, junjie.j.chen@intel.com wrote: [...] > @@ -195,6 +197,10 @@ struct vhost_msg { > > #define VHOST_USER_F_PROTOCOL_FEATURES 30 > > +#ifndef VIRTIO_F_EVENT_IDX > + #define VIRTIO_F_EVENT_IDX 29 > +#endif > + > /* Features supported by this builtin vhost-user net driver. */ > #define VIRTIO_NET_SUPPORTED_FEATURES ((1ULL << VIRTIO_NET_F_MRG_RXBUF) | \ > (1ULL << VIRTIO_NET_F_CTRL_VQ) | \ > @@ -212,7 +218,8 @@ struct vhost_msg { > (1ULL << VIRTIO_NET_F_GUEST_TSO6) | \ > (1ULL << VIRTIO_RING_F_INDIRECT_DESC) | \ > (1ULL << VIRTIO_NET_F_MTU) | \ > - (1ULL << VIRTIO_F_IOMMU_PLATFORM)) > + (1ULL << VIRTIO_F_IOMMU_PLATFORM) | \ > + (1ULL << VIRTIO_F_EVENT_IDX)) > You can use VIRTIO_RING_F_EVENT_IDX directly. It has already been defined by Linux. And you can add this new feature bit after VIRTIO_RING_F_INDIRECT_DESC: diff --git i/lib/librte_vhost/vhost.h w/lib/librte_vhost/vhost.h index 2f36a034e..350ac3acc 100644 --- i/lib/librte_vhost/vhost.h +++ w/lib/librte_vhost/vhost.h @@ -211,6 +211,7 @@ struct vhost_msg { (1ULL << VIRTIO_NET_F_GUEST_TSO4) | \ (1ULL << VIRTIO_NET_F_GUEST_TSO6) | \ (1ULL << VIRTIO_RING_F_INDIRECT_DESC) | \ + (1ULL << VIRTIO_RING_F_EVENT_IDX) | \ (1ULL << VIRTIO_NET_F_MTU) | \ (1ULL << VIRTIO_F_IOMMU_PLATFORM)) Best regards, Tiwei