From nobody Mon Nov 8 07:13:52 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 C861618326AE; Mon, 8 Nov 2021 07:14:00 +0000 (UTC) (envelope-from zlei.huang@gmail.com) Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) (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 4Hnj5h3C5Yz3N64; Mon, 8 Nov 2021 07:14:00 +0000 (UTC) (envelope-from zlei.huang@gmail.com) Received: by mail-pf1-x42b.google.com with SMTP id g18so10337057pfk.5; Sun, 07 Nov 2021 23:14:00 -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=RyMe8qmLlRIOEgL5tvUNjbrcG7QJRaj73vkH7Z36cbGZjUtgLWS5w+OiB4QE9/YJpc ec9/7YDssZKU4FV70WgzU5xoN/zj96zEw9Otekm4NtiRLslX+Jr1WUtcL4MmXSoLLPcK bI0Cpv+XV0/8GbcEZOXENJy6F0kHj1YozMEFLzqK+OSvetP/998ZN4HXeVBXKHJKhNI+ F28q1CNfpap2853r8/qktsxKI0d4ownMqlQGcpK2UpFc9/sYfUUl3f4MjZDCCav+dLyz bVG5f4ApZBAOymhdqjeEC55RR1S155mbKXcxhtrqnyu2YDeS0pZU60imUM6JHVhLwAlz jwQw== 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=XMCyWyCHxuPnPNPL2I76KT3IMsOwM9E5U7nRcJgevoJXlIvi7VduWDpSU6EMDshxa/ YMkSmp3RQdFIDkQ4SE8lpBXBEruWNPd8+F3Tlb3LY57Ds9Pk7EIx4grGigNyptWBeiPE 7Obyrk0gRYTADDQy5DbC7k5pQkV2yDnE0PtYm090FZbnX1cFkFndgCaX7ioOejefLtOR bQ0KFUtGoW6gpwK72zOkMmOgSP1vMjgkCJjH1hyX8V0+BXz7P6qJRVRfrhW2dxIIELdb ut5KHR77qD2wNRMW81IjJ7irN758bKMfznA0iHSc4qZYQ1nQrbiXRaTnvTcN+EZlzNKX yKSg== X-Gm-Message-State: AOAM530oQcW6c+eIwoPPmdGTAWkZ7q9HHd2J9fIxMB5dI1wBI9Z8s8TY JoAni+F7JFj4M7If59dyMzs= X-Google-Smtp-Source: ABdhPJzcjdIN7ajAONOH0vHuRq3elgAzwfF5O/dKaA6xirPdvcNoLzPFpAOqmfUoGAxruH8jELnegA== X-Received: by 2002:a63:3d8f:: with SMTP id k137mr59339547pga.21.1636355639256; Sun, 07 Nov 2021 23:13:59 -0800 (PST) Received: from [192.168.10.252] ([112.66.188.79]) by smtp.gmail.com with ESMTPSA id b19sm1045986pfv.63.2021.11.07.23.13.56 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 07 Nov 2021 23:13:58 -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:13:52 +0800 Cc: freebsd-net@freebsd.org, freebsd-hackers@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <20211107105130.2ccbb253@rimwks.local> To: Rozhuk Ivan X-Mailer: Apple Mail (2.3608.120.23.2.7) X-Rspamd-Queue-Id: 4Hnj5h3C5Yz3N64 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