Skip to content

net: ip: push gso skb forwarding handling down the stack

Florian Westphal netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2net: ip: push gso skb forwarding handling down the stacknet/ipv4/ip_forward.c net/ipv4/ip_output.c+48 -530 replies
2/2Revert "net: core: introduce netif_skb_dev_features"include/linux/netdevice.h net/core/dev.c+11 -180 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] net: ip: push gso skb forwarding handling down the stack

Turns out doing the segmentation in forwarding was not a bright idea, there are corner-cases where this has unintended side-effects.

This patch pushes the segmentation downwards.

After this, netif_skb_dev_features() function can be removed again, it was only added to fetch the features of the output device, we can just use skb->dev after the pushdown.

Tested with following setup:

host -> kvm_router -> kvm_host
mtu 1500 mtu1280

- 'host' has route to kvm_host with locked mtu of 1500
- gso/gro enabled on all interfaces

Did tests with all of following combinations:
- netfilter conntrack off and on on kvm_router
- virtio-net and e1000 driver on kvm_router
- tcp and udp bulk xmit from host to kvm_host

for tcp, I added TCPMSS mangling on kvm_host to make it lie about tcp mss.

Also added a dummy '-t mangle -A POSTROUTING -p udp -f' rule to make sure no udp fragments are seen in the 'conntrack on' and 'virtio-net' case.

Also checked (with ping -M do -s 1400)' that it still sends the wanted icmp error message when size exceeds 1280.