From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id ED8A41B13B for ; Wed, 24 Oct 2018 18:55:18 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 48B1BA8BB; Wed, 24 Oct 2018 16:55:18 +0000 (UTC) Received: from [10.36.112.24] (ovpn-112-24.ams2.redhat.com [10.36.112.24]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 385436046B; Wed, 24 Oct 2018 16:55:16 +0000 (UTC) To: Jens Freimann , dev@dpdk.org Cc: tiwei.bie@intel.com References: <20181024143236.21271-1-jfreimann@redhat.com> <20181024143236.21271-6-jfreimann@redhat.com> From: Maxime Coquelin Message-ID: <896de2a5-8cf4-0118-7743-3ccc32c8f205@redhat.com> Date: Wed, 24 Oct 2018 18:55:15 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20181024143236.21271-6-jfreimann@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Wed, 24 Oct 2018 16:55:18 +0000 (UTC) Subject: Re: [dpdk-dev] [PATCH v9 5/8] 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: Wed, 24 Oct 2018 16:55:19 -0000 On 10/24/18 4:32 PM, Jens Freimann wrote: > diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c > index eb891433e..837457243 100644 > --- a/drivers/net/virtio/virtio_rxtx.c > +++ b/drivers/net/virtio/virtio_rxtx.c > @@ -88,6 +88,42 @@ vq_ring_free_chain(struct virtqueue *vq, uint16_t desc_idx) > dp->next = VQ_RING_DESC_CHAIN_END; > } > > +void > +vq_ring_free_chain_packed(struct virtqueue *vq, uint16_t desc_idx, used_idx) > +{ > + struct vring_desc_packed *dp; > + struct vq_desc_extra *dxp = NULL, *dxp_tail = NULL; > + uint16_t desc_idx_last = desc_idx; > + int i = 0; > + > + dp = &vq->vq_ring.desc_packed[used_idx]; > + dxp = &vq->vq_descx[desc_idx]; > + vq->vq_free_cnt = (uint16_t)(vq->vq_free_cnt + dxp->ndescs); > + if ((dp->flags & VRING_DESC_F_INDIRECT) == 0) { > + while (dp->flags & VRING_DESC_F_NEXT && i < dxp->ndescs) { > + desc_idx_last = dxp->next; > + dp = &vq->vq_ring.desc_packed[dxp->next]; > + dxp = &vq->vq_descx[dxp->next]; > + i++; > + } > + } Haven't you missed to squash some changes you did? It seems you made some changes on your github branch to take Tiwei's comment on v8 into account, but it is not here (i.e. you can't use VRING_DESC_F_NEXT here).