]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitf0938a9b193ec4233e65da292eeb161a1cbde427
tree50968928f3eed74570ba0b79afc8eef29200c86e
parent68bd939291ad586fcd431dd0672dacfe9d5f3f81
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