Otherwise it breaks when offloading like checksum or TSO are used, because second (encapsulated) ip_output() processing passes fragments of the encapsulated packet down to the hardware interface.
Diagnosed by: hselasky
Differential D29501
vxlan: correct interface MTU when using hw offloads kib on Mar 30 2021, 7:19 PM. Authored by Tags None Referenced Files
Subscribers
Details Otherwise it breaks when offloading like checksum or TSO are used, because second (encapsulated) ip_output() processing passes fragments of the encapsulated packet down to the hardware interface. Diagnosed by: hselasky
Diff Detail
Event TimelineComment Actions I fear I don't know enough about vxlan internals. It seems to me as we'd want to document the reduced mtu somewhere in man page or code and the reason for it though. I wonder if the VXLAN_MAX_MTU / ioctl code path are doing the correct thing in all cases if you have to remove hdrlen in some? Comment Actions vxlan_setup_interface_hdrlen() can be called repeatedly and if the vxlan interface is down it will call vxlan_ctrl_set_remote_addr(). if_mtu will get decremented every time and that's not correct. Comment Actions I meant this the other way around of course. vxlan_ctrl_set_remote_addr() can be called repeatedly and it calls vxlan_setup_interface_hdrlen() if the ifnet is down. Comment Actions Do not override user-set MTU value. Lock sc around vxlan_setup_interface_hdrlen() to get consistent MTU/flag setting.
Comment Actions By the way there's an "MTU" section in the vxlan(4) man page and you might want to update it with this new behavior.
|