Re: [PATCH net-next 05/15] ipv6/gso: remove temporary HBH/jumbo header
From: Eric Dumazet <edumazet@google.com>
Date: 2022-02-03 21:42:11
On Thu, Feb 3, 2022 at 1:08 PM Alexander H Duyck [off-list ref] wrote:
On Thu, 2022-02-03 at 11:59 -0800, Eric Dumazet wrote:quoted
On Thu, Feb 3, 2022 at 11:45 AM Alexander Duyck [off-list ref] wrote:quoted
It is the fact that you are adding IPv6 specific code to the net/core/skbuff.c block here. Logically speaking if you are adding the header in ipv6_gro_receive then it really seems li:ke the logic to remove the header really belongs in ipv6_gso_segment. I suppose this is an attempt to optimize it though, since normally updates to the header are done after segmentation instead of before.Right, doing this at the top level means we do the thing once only, instead of 45 times if the skb has 45 segments.I'm just wondering if there is a way for us to do it in ipv6_gso_segment directly instead though. With this we essentially end up having to free the skb if the segmentation fails anyway since it won't be able to go out on the wire.
Having a HBH jumbo header in place while the current frame is MTU size (typically MTU < 9000) would violate the specs. A HBH jumbo header presence implies packet length > 64K.
If we assume the stack will successfully segment the frame then it might make sense to just take care of the hop-by-hop header before we start processing the L4 protocol.