On Fri, 3 Aug 2018 02:05:39 +0200
Florian Westphal wrote:
> + if (-skb_network_offset(skb) + skb->len < IPV6_MIN_MTU &&
Is there a reason to write the arithmetic expression in this order?
Why not:
if (skb->len - skb_network_offset(skb) < IPV6_MIN_MTU &&
don't bother with pathological cases, they only waste cycles.
IPv6 requires a minimum MTU of 1280 so we should never see fragments
smaller than this (except last frag).
v2: drop IPv4 part, which added same check w. IPV4_MIN_MTU (68).
There were concerns that there could be even smaller frags