[dpdk-dev] [PATCH 03/17] net/virtio: add virtio 1.1 defines
Tiwei Bie
tiwei.bie at intel.com
Mon Mar 19 09:16:44 CET 2018
On Fri, Mar 16, 2018 at 04:21:06PM +0100, Jens Freimann wrote:
> Signed-off-by: Jens Freimann <jfreimann at redhat.com>
> ---
> 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
>
More information about the dev
mailing list