Re: [PATCH] ipv6: udp packets following an UFO enqueued packet need also be handled by UFO
From: Hannes Frederic Sowa <hidden>
Date: 2013-10-01 12:09:09
On Tue, Oct 01, 2013 at 12:58:37PM +0200, Jiri Pirko wrote:
quoted
quoted
What if non-ufo-path-created skb is peeked?You mean like: first append a frame < mtu second frame > mtu so it gets handles by ip6_ufo_append? Currently I don't see a problem with it but I may be wrong. What is your suspicion?Well the skb will have gso_size==0 and ip_summed==CHECKSUM_NONE Because of that it will be not threated as ufo skb. Following patch fixes it: Subject: [patch net] ip6_output: do skb ufo init for peeked non ufo skb as well Now, if user application does: sendto len<mtu flag MSG_MORE sendto len>mtu flag 0 The skb is not treated as fragmented one because it is not initialized that way. So move the initialization to fix this. Signed-off-by: Jiri Pirko <jiri@resnulli.us>
My understanding is that the frame is only a valid gso frame iff the first skb queued up is setup as an UFO frame. In other cases we only need to make sure we append to the fragment list without updating the gso field and the skb will get linearized (if needed) later in the output path. This seems not to matter for virtio_net and loopback because we seem to pass the skb as is. But the remaining ethernet card which sets NETIF_F_UFO is neterion and we have to verify if this assumption is correct, there. This is also the way the IPv4 stack deals with UFO. Either way, this needs a look from Eric Dumazet and Herbert Xu, so I added them in Cc. Greetings, Hannes