From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tiwei Bie Subject: Re: [PATCH 03/17] net/virtio: add virtio 1.1 defines Date: Mon, 19 Mar 2018 16:16:44 +0800 Message-ID: <20180319081644.lkwamldbwgqcd4ge@debian> References: <20180316152120.13199-1-jfreimann@redhat.com> <20180316152120.13199-4-jfreimann@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Cc: dev@dpdk.org, yliu@fridaylinux.org, maxime.coquelin@redhat.com, mst@redhat.com To: Jens Freimann Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 6AF552BF2 for ; Mon, 19 Mar 2018 09:18:21 +0100 (CET) Content-Disposition: inline In-Reply-To: <20180316152120.13199-4-jfreimann@redhat.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Fri, Mar 16, 2018 at 04:21:06PM +0100, Jens Freimann wrote: > Signed-off-by: Jens Freimann > --- > drivers/net/virtio/virtio_ring.h | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/net/virtio/virtio_ring.h b/drivers/net/virtio/virtio_ring.h > index fc45e34..6eb0077 100644 > --- a/drivers/net/virtio/virtio_ring.h > +++ b/drivers/net/virtio/virtio_ring.h > @@ -17,6 +17,12 @@ > /* This means the buffer contains a list of buffer descriptors. */ > #define VRING_DESC_F_INDIRECT 4 > > +#define VIRTQ_DESC_F_AVAIL 7 > +#define VIRTQ_DESC_F_USED 15 It's better to use consistent prefix (VRING_DESC_F_ instead of VIRTQ_DESC_F_). Besides, maybe it's better to define them as (1ULL << 7) and (1ULL << 15) to make them consistent with the definitions of other VRING_DESC_F_* flags. > +#define DESC_USED (1ULL << VIRTQ_DESC_F_USED) > +#define DESC_AVAIL (1ULL << VIRTQ_DESC_F_AVAIL) > + > + There is no need to add two blank lines here. Thanks > /* The Host uses this in used->flags to advise the Guest: don't kick me > * when you add a buffer. It's unreliable, so it's simply an > * optimization. Guest will still kick if it's out of buffers. */ > -- > 1.8.3.1 >