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 CD2FF34F2 for ; Mon, 19 Mar 2018 10:23:19 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 628E84068034; Mon, 19 Mar 2018 09:23:19 +0000 (UTC) Received: from localhost (dhcp-192-241.str.redhat.com [10.33.192.241]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BE29610FFE6B; Mon, 19 Mar 2018 09:23:12 +0000 (UTC) Date: Mon, 19 Mar 2018 10:23:11 +0100 From: Jens Freimann To: Tiwei Bie Cc: dev@dpdk.org, yliu@fridaylinux.org, maxime.coquelin@redhat.com, mst@redhat.com Message-ID: <20180319092311.3pfnt7ctfgg7dmod@dhcp-192-241.str.redhat.com> References: <20180316152120.13199-1-jfreimann@redhat.com> <20180316152120.13199-8-jfreimann@redhat.com> <20180319090443.7f23v4m7h7wpuqih@debian> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20180319090443.7f23v4m7h7wpuqih@debian> User-Agent: NeoMutt/20180223 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Mon, 19 Mar 2018 09:23:19 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Mon, 19 Mar 2018 09:23:19 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'jfreimann@redhat.com' RCPT:'' Subject: Re: [dpdk-dev] [PATCH 07/17] 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: Mon, 19 Mar 2018 09:23:20 -0000 On Mon, Mar 19, 2018 at 05:04:43PM +0800, Tiwei Bie wrote: >On Fri, Mar 16, 2018 at 04:21:10PM +0100, Jens Freimann wrote: >[...] >> diff --git a/drivers/net/virtio/Makefile b/drivers/net/virtio/Makefile >> index 6c2c996..aa1e600 100644 >> --- a/drivers/net/virtio/Makefile >> +++ b/drivers/net/virtio/Makefile >> @@ -28,6 +28,7 @@ LIBABIVER := 1 >> SRCS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += virtqueue.c >> SRCS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += virtio_pci.c >> SRCS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += virtio_rxtx.c >> +SRCS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += virtio_rxtx_1.1.c > >There is no need to introduce this file just for Tx. I agree, this is a leftover from the prototype. I'll merge it into virtio_rxtx.c > >> SRCS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += virtio_ethdev.c >> SRCS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += virtio_rxtx_simple.c >[...] >> @@ -603,7 +605,8 @@ struct rte_virtio_xstats_name_off { >> } >> >> vtpci_reset(hw); >> - virtio_dev_free_mbufs(dev); >> + if (!vtpci_packed_queue(hw)) >> + virtio_dev_free_mbufs(dev); > >I think we also need to free mbufs for packed ring. yes, will fix > >> virtio_free_queues(hw); >> } >[...] >> +/* Cleanup from completed transmits. */ >> +static void >> +virtio_xmit_cleanup(struct virtqueue *vq) >> +{ >> + uint16_t idx; >> + uint16_t size = vq->vq_nentries; >> + struct vring_desc_packed *desc = vq->vq_ring.desc_packed; >> + >> + idx = vq->vq_used_cons_idx & (size - 1); >> + while (desc_is_used(&desc[idx]) && >> + vq->vq_free_cnt < size) { >> + while (desc[idx].flags & VRING_DESC_F_NEXT) { > >We can't use VRING_DESC_F_NEXT when handling used >descriptors. Already fixes this but must have been lost in a rebase. Will send it in v3. thanks for the review! regards, Jens > >Thanks