From nobody Mon Nov 8 07:34:47 2021 X-Original-To: freebsd-hackers@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 E9620183E9B6; Mon, 8 Nov 2021 07:35:01 +0000 (UTC) (envelope-from zlei.huang@gmail.com) Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) (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 4HnjYx5tvMz3lS7; Mon, 8 Nov 2021 07:35:01 +0000 (UTC) (envelope-from zlei.huang@gmail.com) Received: by mail-pj1-x102b.google.com with SMTP id nh10-20020a17090b364a00b001a69adad5ebso8122865pjb.2; Sun, 07 Nov 2021 23:35:01 -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=UBXwJwMsecxrAiXEx4s9t+LTZtWc++D7XOrvdElIoM8=; b=leEsUA3JgWpb09jwHajgW7R/TQxaYnUEklksYUfmauj9Z5LLhQxJQVSwMxY04bcsjA 2jEKhlJpi3GFQ8zTtOgZTDeXdByDya+QDKKKtCx+Vuwp/49hZ+12qdVaE2gEa+KKg+dj N1SHytcr2fR13zpNLAGX9oYqV36GHWLjrjUp+JgfOrafRdH6d3M64YEoz4RHRyVPYWzw G2h6v9E9o1padnrOPt/E5AU+v8sbzPfPtWRzSb55ZlE/+7iMe45cCc1A0RtXShZ30hiK p/zQNudyZDWuSpjIn68JKVWNbTdWs/SGwfkCdPsbAUDZjaev3ly6+rBKO/C9wLGeuZXo vFOQ== 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=UBXwJwMsecxrAiXEx4s9t+LTZtWc++D7XOrvdElIoM8=; b=fktx3jdCYwEQzpIwwVNCstMqoqjyB8hHIJrCSB+66POA0GFusLTauzXPGSkQsVfMIB kZ6PjWL3Jn2ktCiZiTdRGUCT4Z9m7hHgMclFT/A4rObe29+qs0Kj+E9BqBqXwOOanX0l Ykx2CrZ9i5W4nTWfWzOt2IAKAhemMHaxE+hlQYMADP0S/5S5kgUngXJhG7jhyq1wvIiD GAmUBRHWpDOtuEzWTre8qC973UNfV2Zrr5eiv/vPv4lJcgclZd5OCWXCbWCWGOA7Q+XQ vqvQ9pgHaIJ9s1YKXrYoDNidJQ6qCSm2NOAYT+ckaetv/oaPGymDnm9PABkHRwl665iz 6OMA== X-Gm-Message-State: AOAM531n3sNEeafczJ2l21A24K8N8KB4+DJsBVUNBKTEeTqV6aVgFF4I t+M5QDWm5C3I1MTYLQ27RsM= X-Google-Smtp-Source: ABdhPJxsTdnGb51dy88AIjF47ttX+ZCmNIovSCUYKa8Fe/BTweQZ2LSxzo57/IG4sjPa/3Cmap2fBw== X-Received: by 2002:a17:90b:4f85:: with SMTP id qe5mr15229748pjb.167.1636356894769; Sun, 07 Nov 2021 23:34:54 -0800 (PST) Received: from [172.17.252.129] (ns1.oxydns.net. [45.32.91.63]) by smtp.gmail.com with ESMTPSA id rm1sm14396089pjb.3.2021.11.07.23.34.53 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 07 Nov 2021 23:34:54 -0800 (PST) Content-Type: text/plain; charset=us-ascii List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@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: <20211107105130.2ccbb253@rimwks.local> Date: Mon, 8 Nov 2021 15:34:47 +0800 Cc: freebsd-net@freebsd.org, freebsd-hackers@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <057DF595-8CEF-4C33-A5B4-442929BBEF35@gmail.com> References: <20211107105130.2ccbb253@rimwks.local> To: Rozhuk Ivan X-Mailer: Apple Mail (2.3608.120.23.2.7) X-Rspamd-Queue-Id: 4HnjYx5tvMz3lS7 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 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