From nobody Tue Dec 07 09:00:52 2021 X-Original-To: freebsd-net@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6483D18D2B3A for ; Tue, 7 Dec 2021 09:00:59 +0000 (UTC) (envelope-from zlei.huang@gmail.com) Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J7Z5l284fz3vTH for ; Tue, 7 Dec 2021 09:00:59 +0000 (UTC) (envelope-from zlei.huang@gmail.com) Received: by mail-pg1-x52b.google.com with SMTP id r5so13190650pgi.6 for ; Tue, 07 Dec 2021 01:00:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=8q4qVGjjmdxD2MQ3typveUUMNLuITEukPcowDwtTovE=; b=VGK7JzB3IGjHOsZTz9VVfDzVW2VHsvp0MHofPg4f1rv9XJN9pIiKQOdAj9ZD4nSMRL 7mXhMMCc2uHlgqIP3Jregv96hVF7S7+n2+O0NmoP85t1tEOI2rWoiOB9AM/YCssaFptf 3OueWHoTVWQk6qRJMw5c838JLQltBfoSRtg2MrAvEHailyw2sBpY3ll8ekOCeBMwutaF 6R7Peqmx3n1bc3x5YQ7UkZsuHCTigCqRADZJtpHAb8fcq0khipY8Ya7AIMWiD1GOvqcz tNbdoq9mwO/QOORHhKGlQcHm8lL2AdGcrR9B4aXmPKDQcn3QtrAqkS0+c0oKVtE/FquM S63A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=8q4qVGjjmdxD2MQ3typveUUMNLuITEukPcowDwtTovE=; b=rqs4bBBj9PEDfAbDcQ1HRQoSPY+XvLR4geBs++5Yq5m6NadkPp2CJIL2PZvOnBfG4N zsFw/IQ+pcHPw0ZFci8/8IqVtEhLSuFTPATfmZQAajG4HclmJbjgojeV8fZZnwI/DSs9 p5VydPAhe3hGlqbRaazjx+uHVt+QJeOFxBu5v5xk4xgisDIK+rnwK9mMaf8aIzw4tJSO sf8sjXR9EFAjPmkMRAF9IoYH8yDyKsh7ZAAdac+zH5RTlGQyHu994ORASUMnh+SXwUxW 5iygWGFY+c73elo1u3UWFa0rwI5Zf7g5vFcjHU45wdjagvnAVz5jJ7W5Qs+Q/Qe/q0Y6 yfWQ== X-Gm-Message-State: AOAM532ElZpMEMbEiGj9irDmTcCRRgMU8EpAFnq/PQNcaee8YkYYg/dN ELL1NKlE1n5SkrXXR7YF1Ks= X-Google-Smtp-Source: ABdhPJw57w29lMi1bXsHQXphELIp7RAj+B0G2uEnEJiSIu8gL11xX1KGtqzxe8QaRAEel7y6aFvScw== X-Received: by 2002:a63:ed15:: with SMTP id d21mr20655484pgi.371.1638867658297; Tue, 07 Dec 2021 01:00:58 -0800 (PST) Received: from [192.168.10.252] ([112.66.191.81]) by smtp.gmail.com with ESMTPSA id p15sm1961156pjh.1.2021.12.07.01.00.56 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Dec 2021 01:00:57 -0800 (PST) Content-Type: text/plain; charset=us-ascii List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\)) Subject: Re: if_vlan allow to set incorrect mtu From: Zhenlei Huang In-Reply-To: <0f2883d1-80a6-29e3-46df-ab2b3ea43eaf@plan-b.pwste.edu.pl> Date: Tue, 7 Dec 2021 17:00:52 +0800 Cc: freebsd-net@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <9AD983D7-51ED-4892-9D7F-9F9D60BED485@gmail.com> References: <20211107105130.2ccbb253@rimwks.local> <0f2883d1-80a6-29e3-46df-ab2b3ea43eaf@plan-b.pwste.edu.pl> To: Marek Zarychta , Rozhuk Ivan X-Mailer: Apple Mail (2.3608.120.23.2.7) X-Rspamd-Queue-Id: 4J7Z5l284fz3vTH X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; TAGGED_RCPT(0.00)[]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N > On Dec 7, 2021, at 5:39 AM, Marek Zarychta = wrote: >=20 > W dniu 8.11.2021 o 08:13, Zhenlei Huang pisze: >>> On Nov 7, 2021, at 3:51 PM, Rozhuk Ivan 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