Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Dec 2021 17:00:52 +0800
From:      Zhenlei Huang <zlei.huang@gmail.com>
To:        Marek Zarychta <zarychtam@plan-b.pwste.edu.pl>, Rozhuk Ivan <rozhuk.im@gmail.com>
Cc:        freebsd-net@freebsd.org
Subject:   Re: if_vlan allow to set incorrect mtu
Message-ID:  <9AD983D7-51ED-4892-9D7F-9F9D60BED485@gmail.com>
In-Reply-To: <0f2883d1-80a6-29e3-46df-ab2b3ea43eaf@plan-b.pwste.edu.pl>
References:  <20211107105130.2ccbb253@rimwks.local> <F07B770B-E17F-467A-982F-4EF34F55870E@gmail.com> <0f2883d1-80a6-29e3-46df-ab2b3ea43eaf@plan-b.pwste.edu.pl>

next in thread | previous in thread | raw e-mail | index | archive | help


> On Dec 7, 2021, at 5:39 AM, Marek Zarychta =
<zarychtam@plan-b.pwste.edu.pl> wrote:
>=20
> W dniu 8.11.2021 o 08:13, Zhenlei Huang pisze:
>>> On Nov 7, 2021, at 3:51 PM, Rozhuk Ivan <rozhuk.im@gmail.com> wrote:
>>>=20
>>> Hi!
>>>=20
>>>=20
>>> Why if_vlan allow to set same MTU size or bigger as on parrent nic?
>>>=20
>>>=20
>>> Setup:
>>> - workstation with MTU 9000 and IPv4 on h/w nic
>>> - server with MTU 9000 on h/w nic and IPv4 on vlan nic with MTU 9000 =
(set by defauil on iface creation)
>>>=20
>>> This setup have issue:
>>> - big packets from server->wks - OK
>>> - big packets from wks->server - FAIL.
>>>=20
>>> Server init sequence:
>>> 1. Create vlans
>>> 2. Set MTU lower than default on parent nic
>>>=20
>>> Result: vlan have bigger or same MTU as parrent nic, but parrent nic =
reports IFCAP_VLAN_MTU.
>>> Probably this is if_em driver issue or iflib.
>>>=20
>>>=20
>>>=20
>>> This is rc.conf, vlan77 - where I got MTU 9000 and fail to receive =
packets:
>>> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>>> vlans_igb0=3D"vlan77 vlan86 vlan87"
>>> create_args_vlan87=3D"vlan 87"
>>> create_args_vlan86=3D"vlan 86"
>>> create_args_vlan77=3D"vlan 77"
>>> ifconfig_vlan87=3D"inet 15.44.77.2 netmask 255.255.252.0 mtu 1500 =
down up"
>>> ifconfig_vlan87_alias0=3D"link 00:aa:fa:dd:44:55"
>>> ifconfig_vlan86=3D"DHCP mtu 1500"
>>> ifconfig_vlan86_alias0=3D"link 00:ff:fa:dd:44:55"
>>> ifconfig_vlan77=3D"inet 192.168.0.254 netmask 255.255.255.0"
>>> ifconfig_vlan77_alias0=3D"link 00:0f:43:48:67:fe"
>>> ifconfig_vlan77_ipv6=3D"inet6 2001:470:2345:555::1/64 prefixlen 64 =
auto_linklocal"
>>> ifconfig_igb0=3D"-lro -tso -vlanhwtso mtu 9000 down up"
>>> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>>>=20
>>>=20
>>>=20
>> Can you please disable all vlan hardware offloading features and =
repeat the test again?
>> ifconfig igb0 -vlanmtu -vlanhwtag -vlanhwfilter -vlanhwtso =
-vlanhwcsum
>=20
> Disabling the capabilities listed above doesn't solve the issue, but =
assigning mtu 8996 to VLAN children does.
> Reproduced on the most recent 13-STABLE (13-n248421-3b936a8c889) while =
testing the fix[1]
>=20
> To reproduce:
>=20
> ifconfig_igb0=3D"mtu 9000 up"
> ifconfig_igb1=3D"mtu 9000 up"

Try disabling all vlan hardware offloading features in rc.conf.

ifconfig_igb0=3D"mtu 9000 -vlanmtu -vlanhwtag -vlanhwfilter -vlanhwtso =
-vlanhwcsum up"
ifconfig_igb1=3D"mtu 9000 -vlanmtu -vlanhwtag -vlanhwfilter -vlanhwtso =
-vlanhwcsum up"

> ifconfig_lagg0=3D"laggproto lacp laggport igb0 laggport igb1 =
-lacp_strict"
> vlans_lagg0=3D"vlan0 vlan1 ..."
> ifconfig_vlan0=3D"inet x.x.x.x/y"
>=20
> # iperf3 -R -c y.y.y.y
> Connecting to host y.y.y.y, port 5201
> Reverse mode, remote host y.y.y.y is sending
> [  5] local x.x.x.x port 52750 connected to y.y.y.y port 5201
> [ ID] Interval           Transfer     Bitrate
> [  5]   0.00-1.02   sec  0.00 Bytes  0.00 bits/sec
> [  5]   1.02-2.02   sec  0.00 Bytes  0.00 bits/sec
> [  5]   2.02-3.02   sec  0.00 Bytes  0.00 bits/sec
> [  5]   3.02-3.55   sec  0.00 Bytes  0.00 bits/sec
>=20
> #ifconfig vlan0 mtu 8996
>=20
> # iperf3 -R -c y.y.y.y
> Connecting to host y.y.y.y, port 5201
> Reverse mode, remote host y.y.y.y is sending
> [  5] local x.x.x.x port 49056 connected to y.y.y.y port 5201
> [ ID] Interval           Transfer     Bitrate
> [  5]   0.00-1.00   sec   118 MBytes   989 Mbits/sec
> [  5]   1.00-2.00   sec   118 MBytes   990 Mbits/sec
> [  5]   2.00-3.00   sec   118 MBytes   990 Mbits/sec
> [  5]   3.00-3.69   sec  81.8 MBytes   989 Mbits/sec
>=20
> I am setting MTU to 8996 since early 13-BETA? or maybe PRERELEASE. =
12-STABLE at the beginning of 2021 was fine with the default settings =
and MTU 9000 set for igb(4) on the same hardware. It looks like =
regression. Should the PR be submitted in this case?
>=20
> [1]  https://reviews.freebsd.org/D30002 (commit =
9c6432dc4bb936f0842d766d8b3b19dfcde15da2)
>=20
> Regards,
> --=20
> Marek Zarychta




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9AD983D7-51ED-4892-9D7F-9F9D60BED485>