Bug 255749

Summary: jumbo frame support of IPv6 vlan interfaces is broken
Product: Base System Reporter: topical <topical>
Component: kernAssignee: freebsd-net (Nobody) <net>
Status: New ---    
Severity: Affects Some People CC: ae, ross
Priority: ---    
Version: 13.0-RELEASE   
Hardware: Any   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248005

Description topical 2021-05-10 13:33:51 UTC
If you have an interface with jumbo frame support enabled and create a vlan, mtu is not inherited by its IPv6 vlan interface. IPv4 is unaffected.

Setup: change mtu of an interface to 9k, create a vlan sub interface and (optionally) activate it:

  # ifconfig vtnet0 mtu 9000
  # ifconfig vtnet0.1000 create
  # ifconfig vtnet0.1000 up

Check state with "ifconfig"

  vtnet0: flags=8863<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 9000
  ...
  vtnet0.1000: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 9000

Check ipv6 mtu:

  # ndp -i vtnet0.1000

  linkmtu=0, maxmtu=1500, curhlim=64, basereachable=30s0ms, reachable=19s, retrans=1s0ms
  ...

You see that "maxmtu=1500". So, this host never uses IPv6 with Jumbo frames on this vlan.

To make things worse: Mellanox cards don't like that scenario and have massive packet loss (but this is another story).

To fix it, you need to temporarily change mtu of vlan interface

  # ifconfig vtnet0.1000 mtu 8000
  # ifconfig vtnet0.1000 mtu 9000
  # ndp -i vtnet0.1000

  linkmtu=0, maxmtu=9000, curhlim=64, basereachable=30s0ms, reachable=19s, retrans=1s0ms