From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=QsghlLVNroM21yq07lXkoh6ykfDyiWbYR0bV9BFmYqI=; b=xqq8N4dxOA8nitq4PfK0qUSyHKfBJxXsDq4pIrTB2a07UzYUxjUoPZHS3p2PSQYpPK i8YvvzROP4EmSPgSCIDaUTR6b0YDJ4HQIguL4wZoY/Ug6bIBs3PgQF2U2A3/vjrGWHC0 lmF69dOMzFVP4ywL+PbcjbjCwhui9SFa5TDOpOWQ0YQBediPm4NLTifERdyNdVv/Swy8 CP3A5xwNz4pVKXShrnUFB5aluwLsAsuTiigpeZe8Hwq6A0k1Ym0NfBpncqikDwfXqTWq oI0FNfmFaSr1XpG0c2uOzKrArQM6dk0Uv+NmtnGrHMsSOCplu8KK6sMfQ7IylmdMWYHe y0Pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=QsghlLVNroM21yq07lXkoh6ykfDyiWbYR0bV9BFmYqI=; b=ds3nb/Xz1nSbpr5Jd4C1d4e25XeauD7p0geM2rUb9AXi3ak/qXWxQ7GYG8MvD/+SdK eKqY2fnOBzAZ7bXAABRDy0wVGu3AIgMb4DlId76Q3Vat+Y79W3uuoMt1oJd+GnxFuhef oRI1UGK18NNVA6yir9tUgPdjHVmftCdpYw6Pj0v6CbxtF9mAurvq+dgEV4rwmCgeCcHV oe7cvhWFzUpNGFNNZ//PQKi+2HPwj7dK0eXbnmRRjRK0O2sNqp12tIFoAUuiutNm1KsU NE4QsFjuENxxA3wJORWZ211CN7xyyRyHW7u8Pj10NO1AiDO+EAYlcAxo+IKIuk0aMMS+ yS9A== X-Gm-Message-State: ABUngvfzlM/NFKk1QlcNtXoC76cKS+8O6LJVbSyzSTCb+dsoZxEABNQhXT67VJjczm1NGjLO X-Received: by 10.28.66.68 with SMTP id p65mr5098743wma.126.1477433331363; Tue, 25 Oct 2016 15:08:51 -0700 (PDT) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id jx8sm27316138wjc.2.2016.10.25.15.08.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Oct 2016 15:08:50 -0700 (PDT) From: Thomas Monjalon To: Yuanhan Liu Date: Wed, 26 Oct 2016 00:08:49 +0200 Message-ID: <4827637.JFOYA5HLyK@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <1476437678-7102-4-git-send-email-yuanhan.liu@linux.intel.com> 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-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v7 3/7] vhost: simplify mergeable Rx vring reservation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2016 22:08:51 -0000 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.