[PATCH net-next 08/10] hv_netvsc: Don't ask for additional head room in the skb

KY Srinivasan kys at microsoft.com
Tue Nov 24 16:39:51 UTC 2015



> -----Original Message-----
> From: Florian Westphal [mailto:fw at strlen.de]
> Sent: Tuesday, November 24, 2015 12:56 AM
> To: KY Srinivasan <kys at microsoft.com>
> Cc: davem at davemloft.net; netdev at vger.kernel.org; linux-
> kernel at vger.kernel.org; devel at linuxdriverproject.org; olaf at aepfle.de;
> apw at canonical.com; jasowang at redhat.com
> Subject: Re: [PATCH net-next 08/10] hv_netvsc: Don't ask for additional head
> room in the skb
> 
> K. Y. Srinivasan <kys at microsoft.com> wrote:
> > The rndis header is 116 bytes big and can be placed in the default
> > head room that will be available in the skb. Since the netvsc packet
> > is less than 48 bytes, we can use the skb control buffer
> > for the netvsc packet. With these changes we don't need to
> > ask for additional head room.
> 
> Minor nit: could you add a BUILD_BUG_ON test for this?  Something like
> 
> BUILD_BUG_ON(sizeof(struct hv_netvsc_packet) > FIELD_SIZEOF(struct
> sk_buff, cb));

Good point; will add this check.

Thanks,

K. Y


More information about the devel mailing list