From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by dpdk.org (Postfix) with ESMTP id DDB4B1B73F for ; Mon, 9 Apr 2018 08:09:22 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 725384067EF0; Mon, 9 Apr 2018 06:09:22 +0000 (UTC) Received: from localhost (dhcp-192-241.str.redhat.com [10.33.192.241]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 003FE2026E03; Mon, 9 Apr 2018 06:09:21 +0000 (UTC) Date: Mon, 9 Apr 2018 08:09:20 +0200 From: Jens Freimann To: Tiwei Bie Cc: dev@dpdk.org, yliu@fridaylinux.org, maxime.coquelin@redhat.com, mst@redhat.com Message-ID: <20180409060920.zp3xhqvsz5nsg5zq@dhcp-192-241.str.redhat.com> References: <20180405101031.26468-1-jfreimann@redhat.com> <20180405101031.26468-21-jfreimann@redhat.com> <20180408060750.nlg6o5hyaqpmauos@debian> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20180408060750.nlg6o5hyaqpmauos@debian> User-Agent: NeoMutt/20180223 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Mon, 09 Apr 2018 06:09:22 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Mon, 09 Apr 2018 06:09:22 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'jfreimann@redhat.com' RCPT:'' 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: Mon, 09 Apr 2018 06:09:23 -0000 On Sun, Apr 08, 2018 at 02:07:50PM +0800, Tiwei Bie wrote: >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? my mistake. will fix it. > > >> + 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. I understand, will fix that too. > > >> >> #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. will fix. Thanks! regards, Jens