From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 777A11C823 for ; Sun, 8 Apr 2018 08:09:55 +0200 (CEST) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Apr 2018 23:09:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,422,1517904000"; d="scan'208";a="31614465" Received: from debian.sh.intel.com (HELO debian) ([10.67.104.164]) by orsmga007.jf.intel.com with ESMTP; 07 Apr 2018 23:09:51 -0700 Date: Sun, 8 Apr 2018 14:07:50 +0800 From: Tiwei Bie To: Jens Freimann Cc: dev@dpdk.org, yliu@fridaylinux.org, maxime.coquelin@redhat.com, mst@redhat.com Message-ID: <20180408060750.nlg6o5hyaqpmauos@debian> References: <20180405101031.26468-1-jfreimann@redhat.com> <20180405101031.26468-21-jfreimann@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180405101031.26468-21-jfreimann@redhat.com> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [PATCH v3 20/21] net/virtio: add support for event 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: Sun, 08 Apr 2018 06:09:55 -0000 On Thu, Apr 05, 2018 at 12:10:30PM +0200, Jens Freimann wrote: > Signed-off-by: Jens Freimann > --- > drivers/net/virtio/virtio_ethdev.c | 2 +- > drivers/net/virtio/virtio_ethdev.h | 2 +- > drivers/net/virtio/virtio_rxtx.c | 15 +++++++- > drivers/net/virtio/virtqueue.h | 73 ++++++++++++++++++++++++++++++++++++-- > 4 files changed, 86 insertions(+), 6 deletions(-) > > diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c > index a3c3376d7..65a6a9d89 100644 > --- a/drivers/net/virtio/virtio_ethdev.c > +++ b/drivers/net/virtio/virtio_ethdev.c > @@ -727,7 +727,7 @@ virtio_dev_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id) > struct virtnet_rx *rxvq = dev->data->rx_queues[queue_id]; > struct virtqueue *vq = rxvq->vq; > > - virtqueue_enable_intr(vq); > + virtqueue_enable_intr(vq, 0, 0); > return 0; > } > > diff --git a/drivers/net/virtio/virtio_ethdev.h b/drivers/net/virtio/virtio_ethdev.h > index 3aeced4bb..19d3f2617 100644 > --- a/drivers/net/virtio/virtio_ethdev.h > +++ b/drivers/net/virtio/virtio_ethdev.h > @@ -37,7 +37,7 @@ > 1u << VIRTIO_RING_F_INDIRECT_DESC | \ > 1ULL << VIRTIO_F_VERSION_1 | \ > 1ULL << VIRTIO_F_RING_PACKED | \ > - 1ULL << VIRTIO_F_IOMMU_PLATFORM) Why remove this feature bit? > + 1ULL << VIRTIO_RING_F_EVENT_IDX) Supporting event suppression doesn't means supporting F_EVENT_IDX. Event suppression is mandatory and not a negotiable feature. F_EVENT_IDX is just an optional enhancement for event suppression. > > #define VIRTIO_PMD_SUPPORTED_GUEST_FEATURES \ > (VIRTIO_PMD_DEFAULT_GUEST_FEATURES | \ > diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c > index a48ca6aaa..ed65434ce 100644 > --- a/drivers/net/virtio/virtio_rxtx.c > +++ b/drivers/net/virtio/virtio_rxtx.c > @@ -127,6 +127,10 @@ virtio_xmit_pkts_packed(void *tx_queue, struct rte_mbuf **tx_pkts, > > rte_smp_wmb(); > _set_desc_avail(&desc[head_idx], wrap_counter); > + if (unlikely(virtqueue_kick_prepare_packed(vq))) { > + virtqueue_notify(vq); > + PMD_RX_LOG(DEBUG, "Notified"); The indent isn't right. > + } > } [...]