From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v7 3/7] vhost: simplify mergeable Rx vring reservation Date: Wed, 26 Oct 2016 00:08:49 +0200 Message-ID: <4827637.JFOYA5HLyK@xps13> References: <1474336817-22683-1-git-send-email-zhihong.wang@intel.com> <1476437678-7102-1-git-send-email-yuanhan.liu@linux.intel.com> <1476437678-7102-4-git-send-email-yuanhan.liu@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Cc: dev@dpdk.org To: Yuanhan Liu Return-path: Received: from mail-wm0-f49.google.com (mail-wm0-f49.google.com [74.125.82.49]) by dpdk.org (Postfix) with ESMTP id 9BC89914 for ; Wed, 26 Oct 2016 00:08:51 +0200 (CEST) Received: by mail-wm0-f49.google.com with SMTP id c78so189459027wme.0 for ; Tue, 25 Oct 2016 15:08:51 -0700 (PDT) In-Reply-To: <1476437678-7102-4-git-send-email-yuanhan.liu@linux.intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2016-10-14 17:34, Yuanhan Liu: > -static inline uint32_t __attribute__((always_inline)) > +static inline int __attribute__((always_inline)) > copy_mbuf_to_desc_mergeable(struct virtio_net *dev, struct vhost_vir= tqueue *vq, > -=09=09=09 uint16_t end_idx, struct rte_mbuf *m, > -=09=09=09 struct buf_vector *buf_vec) > +=09=09=09 struct rte_mbuf *m, struct buf_vector *buf_vec, > +=09=09=09 uint16_t num_buffers) > { > =09struct virtio_net_hdr_mrg_rxbuf virtio_hdr =3D {{0, 0, 0, 0, 0, 0= }, 0}; > =09uint32_t vec_idx =3D 0; > -=09uint16_t start_idx =3D vq->last_used_idx; > -=09uint16_t cur_idx =3D start_idx; > +=09uint16_t cur_idx =3D vq->last_used_idx; > =09uint64_t desc_addr; > =09uint32_t desc_chain_head; > =09uint32_t desc_chain_len; > @@ -394,21 +393,21 @@ copy_mbuf_to_desc_mergeable(struct virtio_net *= dev, struct vhost_virtqueue *vq, > =09struct rte_mbuf *hdr_mbuf; > =20 > =09if (unlikely(m =3D=3D NULL)) > -=09=09return 0; > +=09=09return -1; > =20 > =09LOG_DEBUG(VHOST_DATA, "(%d) current index %d | end index %d\n", > =09=09dev->vid, cur_idx, end_idx); There is a build error: =09lib/librte_vhost/virtio_net.c:399:22: error: =E2=80=98end_idx=E2=80=99= undeclared It is probably trivial and could be fixed directly in the already appli= ed commit in next-virtio.