On Thu, 28 May 2015 16:19:44 +0800
Wei li <liw at dtdream.com> wrote:

> +             if (desc->flags & VRING_DESC_F_NEXT)
> +             {
> +                     /* Discard first buffer as it is the virtio header */
> +                     desc = &vq->desc[desc->next];
> +                     vb_offset = 0;
> +                     vb_avail = desc->len;
> +             }
> +             else /* virtio header in one desc with real pkt */
> +             {
> +                     /* strip the virtio header */
> +                     vb_offset = vq->vhost_hlen;
> +                     vb_avail = desc->len - vq->vhost_hlen;
> +
This code looks correct, but please follow the same style as
other code in the driver. The virtio driver uses Linux/BSD
style:
        if () {
        } else {
        }

Reply via email to