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 AA1D71CC9B for ; Fri, 6 Apr 2018 10:10:44 +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 468038424E; Fri, 6 Apr 2018 08:10:44 +0000 (UTC) Received: from localhost (dhcp-192-241.str.redhat.com [10.33.192.241]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B67D62024CA4; Fri, 6 Apr 2018 08:10:43 +0000 (UTC) Date: Fri, 6 Apr 2018 10:10:42 +0200 From: Jens Freimann To: Maxime Coquelin Cc: dev@dpdk.org, tiwei.bie@intel.com, yliu@fridaylinux.org, mst@redhat.com Message-ID: <20180406081042.6bb3awgnm4ax722b@reserved-198-163.str.redhat.com> References: <20180405101031.26468-1-jfreimann@redhat.com> <20180405101031.26468-8-jfreimann@redhat.com> <00b1cffc-4d0f-30d8-289a-babfdcfa2f7a@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <00b1cffc-4d0f-30d8-289a-babfdcfa2f7a@redhat.com> 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.2]); Fri, 06 Apr 2018 08:10:44 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Fri, 06 Apr 2018 08:10:44 +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 07/21] net/virtio: implement transmit path for packed queues 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: Fri, 06 Apr 2018 08:10:45 -0000 On Fri, Apr 06, 2018 at 09:56:06AM +0200, Maxime Coquelin wrote: > > >On 04/05/2018 12:10 PM, Jens Freimann wrote: >>This implements the transmit path for devices with >>support for Virtio 1.1. >> >>Add the feature bit for Virtio 1.1 and enable code to >>add buffers to vring and mark descriptors as available. >> >>This is based on a patch by Yuanhan Liu. >> >>Signed-off-by: Jens Freiman >>--- >> drivers/net/virtio/virtio_ethdev.c | 8 ++- >> drivers/net/virtio/virtio_ethdev.h | 3 ++ >> drivers/net/virtio/virtio_rxtx.c | 102 ++++++++++++++++++++++++++++++++++++- >> 3 files changed, 111 insertions(+), 2 deletions(-) >> >>diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c >>index cccefafe9..089a161ac 100644 >>--- a/drivers/net/virtio/virtio_ethdev.c >>+++ b/drivers/net/virtio/virtio_ethdev.c >>@@ -383,6 +383,8 @@ virtio_init_queue(struct rte_eth_dev *dev, uint16_t vtpci_queue_idx) >> vq->hw = hw; >> vq->vq_queue_index = vtpci_queue_idx; >> vq->vq_nentries = vq_size; >>+ if (vtpci_packed_queue(hw)) >>+ vq->vq_ring.avail_wrap_counter = 1; >> /* >> * Reserve a memzone for vring elements >>@@ -1328,7 +1330,11 @@ set_rxtx_funcs(struct rte_eth_dev *eth_dev) >> eth_dev->rx_pkt_burst = &virtio_recv_pkts; >> } >>- if (hw->use_simple_tx) { >>+ if (vtpci_packed_queue(hw)) { >>+ PMD_INIT_LOG(INFO, "virtio: using virtio 1.1 Tx path on port %u", >>+ eth_dev->data->port_id); >>+ eth_dev->tx_pkt_burst = virtio_xmit_pkts_packed; >>+ } else if (hw->use_simple_tx) { >> PMD_INIT_LOG(INFO, "virtio: using simple Tx path on port %u", >> eth_dev->data->port_id); >> eth_dev->tx_pkt_burst = virtio_xmit_pkts_simple; >>diff --git a/drivers/net/virtio/virtio_ethdev.h b/drivers/net/virtio/virtio_ethdev.h >>index bb40064ea..d457013cb 100644 >>--- a/drivers/net/virtio/virtio_ethdev.h >>+++ b/drivers/net/virtio/virtio_ethdev.h >>@@ -36,6 +36,7 @@ >> 1ULL << VIRTIO_NET_F_GUEST_ANNOUNCE | \ >> 1u << VIRTIO_RING_F_INDIRECT_DESC | \ >> 1ULL << VIRTIO_F_VERSION_1 | \ >>+ 1ULL << VIRTIO_F_RING_PACKED | \ > >Should it really advertise VIRTIO_F_RING_PACKED unconditionally, as it >is not yet fully supported? (non-pow2, indirect descs, etc...) We can advertise packed ring but have VIRTIO_F_INDIRECT_DESC disabled. non-pow2 needs to be integrated thoug and will be in v4. regards, Jens > >> 1ULL << VIRTIO_F_IOMMU_PLATFORM) >> #define VIRTIO_PMD_SUPPORTED_GUEST_FEATURES \