skbuff: introduce skb_gso_validate_mtu
authorMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Thu, 2 Jun 2016 18:05:41 +0000 (15:05 -0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 3 Jun 2016 23:37:21 +0000 (19:37 -0400)
commitae7ef81ef000adeee7a87585b9135ff8a8064acc
tree50968928f3eed74570ba0b79afc8eef29200c86e
parent3953c46c3ac7eef31a9935427371c6f54a22f1ba
skbuff: introduce skb_gso_validate_mtu

skb_gso_network_seglen is not enough for checking fragment sizes if
skb is using GSO_BY_FRAGS as we have to check frag per frag.

This patch introduces skb_gso_validate_mtu, based on the former, which
will wrap the use case inside it as all calls to skb_gso_network_seglen
were to validate if it fits on a given TMU, and improve the check.

Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Tested-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/skbuff.h
net/core/skbuff.c
net/ipv4/ip_forward.c
net/ipv4/ip_output.c
net/ipv6/ip6_output.c
net/mpls/af_mpls.c