Re: [PATCH net-next v4 1/2] New kernel function to get IP overhead on a socket.

From: David Miller
Date: Thu Mar 23 2017 - 18:05:43 EST


From: "R. Parameswaran" <parameswaran.r7@xxxxxxxxx>
Date: Wed, 22 Mar 2017 15:59:13 -0700 (PDT)

> A new function, kernel_sock_ip_overhead(), is provided
> to calculate the cumulative overhead imposed by the IP
> Header and IP options, if any, on a socket's payload.
> The new function returns an overhead of zero for sockets
> that do not belong to the IPv4 or IPv6 address families.
>
> Signed-off-by: R. Parameswaran <rparames@xxxxxxxxxxx>

Just use the IPv4/IPv6 header size for now, just like the VXLAN
driver does.

Thanks.