Subject: Re: [net-next V7 PATCH 07/16] virtio_net: convert to use generic xdp_frame and xdp_return_frame API

From: Jesper Dangaard Brouer <[email-masked]>
Date: Sat, 31 Mar 2018 10:56:36 +0200

On Sat, 31 Mar 2018 02:22:35 +0800 kbuild test robot <[email-masked]> wrote:

> reproduce:
>         # apt-get install sparse
>         make ARCH=x86_64 allmodconfig
>         make C=1 CF=-D__CHECK_ENDIAN__

[...]
>    417	
>    418	static bool __virtnet_xdp_xmit(struct virtnet_info *vi,
>    419				       struct xdp_buff *xdp)
>    420	{
[...]
>    445	
>    446		/* Make room for virtqueue hdr (also change xdpf->headroom?) */
>    447		xdpf->data -= vi->hdr_len;
>    448		/* Zero header and leave csum up to XDP layers */
>    449		hdr = xdpf->data;
>    450		memset(hdr, 0, vi->hdr_len);
>  > 451		hdr->hdr.hdr_len = xdpf->len; /* Q: is this needed? */ 

I'll just remove this line, as Jason previously told me that it is not
strictly necessary (so lets avoid playing with endianness here).

>    452		xdpf->len   += vi->hdr_len;
>    453	

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer