Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Jul 2010 16:07:46 -0700
From:      Pyun YongHyeon <pyunyh@gmail.com>
To:        Michael Monashev <softsearch@gmail.com>
Cc:        FreeBSD Net <freebsd-net@freebsd.org>
Subject:   Re: can't disable VLAN_MTU and VLAN_HWCSUM
Message-ID:  <20100701230745.GH7090@michelle.cdnetworks.com>
In-Reply-To: <1476665685.20100623023003@gmail.com>
References:  <1476665685.20100623023003@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jun 23, 2010 at 02:30:03AM +0400, Michael Monashev wrote:
> Hi
> 
> FreeBSD 8.0-RELEASE-p3
> 
> $ ifconfig
> em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 9216
>         options=18b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWCSUM,TSO4>
>         ether 00:15:17:35:1c:76
>         media: Ethernet autoselect (1000baseT <full-duplex>)
>         status: active
> em1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 9216
>         options=18b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWCSUM,TSO4>
>         ether 00:15:17:35:1c:76
>         media: Ethernet autoselect (1000baseT <full-duplex>)
>         status: active
> lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
>         options=3<RXCSUM,TXCSUM>
>         inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
>         inet6 ::1 prefixlen 128
>         inet 127.0.0.1 netmask 0xff000000
> lagg0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 9216
>         options=18b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWCSUM,TSO4>
>         ether 00:15:17:35:1c:76
>         inet 89.208.146.215 netmask 0xffffff00 broadcast 89.208.146.255
>         inet 192.168.2.5 netmask 0xffffff00 broadcast 192.168.2.255
>         inet 89.208.145.139 netmask 0xffffff00 broadcast 89.208.145.255
>         media: Ethernet autoselect
>         status: active
>         laggproto lacp
>         laggport: em1 flags=1c<ACTIVE,COLLECTING,DISTRIBUTING>
>         laggport: em0 flags=1c<ACTIVE,COLLECTING,DISTRIBUTING>
> vlan2: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 9216
>         ether 00:15:17:35:1c:76
>         inet 10.0.143.5 netmask 0xffffff00 broadcast 10.0.143.255
>         media: Ethernet autoselect
>         status: active
>         vlan: 2 parent interface: lagg0
> lo1: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
>         options=3<RXCSUM,TXCSUM>
>         inet 127.0.1.1 netmask 0xffffff00
>         inet 127.0.1.2 netmask 0xffffffff
>         inet 127.0.1.3 netmask 0xffffffff
>         inet 127.0.1.4 netmask 0xffffffff
>         inet 127.0.1.5 netmask 0xffffffff
>         inet 127.0.1.6 netmask 0xffffffff
>         inet 127.0.1.7 netmask 0xffffffff
>         inet 127.0.1.8 netmask 0xffffffff
>         inet 127.0.1.9 netmask 0xffffffff
>         inet 127.0.1.10 netmask 0xffffffff
>         inet 127.0.1.11 netmask 0xffffffff
>         inet 127.0.1.12 netmask 0xffffffff
>         inet 127.0.1.13 netmask 0xffffffff
>         inet 127.0.1.14 netmask 0xffffffff
>         inet 127.0.1.15 netmask 0xffffffff
>         inet 127.0.1.16 netmask 0xffffffff
>         inet 127.0.1.17 netmask 0xffffffff
>         inet 127.0.1.18 netmask 0xffffffff
>         inet 127.0.1.19 netmask 0xffffffff
>         inet 127.0.1.20 netmask 0xffffffff
> 
> $ sudo ifconfig em0 -vlanmtu
> $ sudo ifconfig em1 -vlanmtu
> $ sudo ifconfig em0 -vlanhwfilter
> $ sudo ifconfig em1 -vlanhwfilter
> 
> $ ifconfig
> em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 9216
>         options=18b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWCSUM,TSO4>
>         ether 00:15:17:35:1c:76
>         media: Ethernet autoselect (1000baseT <full-duplex>)
>         status: active
> em1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 9216
>         options=18b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWCSUM,TSO4>
>         ether 00:15:17:35:1c:76
>         media: Ethernet autoselect (1000baseT <full-duplex>)
>         status: active
> lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
>         options=3<RXCSUM,TXCSUM>
>         inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
>         inet6 ::1 prefixlen 128
>         inet 127.0.0.1 netmask 0xff000000
> lagg0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 9216
>         options=18b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWCSUM,TSO4>
>         ether 00:15:17:35:1c:76
>         inet 89.208.146.215 netmask 0xffffff00 broadcast 89.208.146.255
>         inet 192.168.2.5 netmask 0xffffff00 broadcast 192.168.2.255
>         inet 89.208.145.139 netmask 0xffffff00 broadcast 89.208.145.255
>         media: Ethernet autoselect
>         status: active
>         laggproto lacp
>         laggport: em1 flags=1c<ACTIVE,COLLECTING,DISTRIBUTING>
>         laggport: em0 flags=1c<ACTIVE,COLLECTING,DISTRIBUTING>
> vlan2: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 9216
>         ether 00:15:17:35:1c:76
>         inet 10.0.143.5 netmask 0xffffff00 broadcast 10.0.143.255
>         media: Ethernet autoselect
>         status: active
>         vlan: 2 parent interface: lagg0
> lo1: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
>         options=3<RXCSUM,TXCSUM>
>         inet 127.0.1.1 netmask 0xffffff00
>         inet 127.0.1.2 netmask 0xffffffff
>         inet 127.0.1.3 netmask 0xffffffff
>         inet 127.0.1.4 netmask 0xffffffff
>         inet 127.0.1.5 netmask 0xffffffff
>         inet 127.0.1.6 netmask 0xffffffff
>         inet 127.0.1.7 netmask 0xffffffff
>         inet 127.0.1.8 netmask 0xffffffff
>         inet 127.0.1.9 netmask 0xffffffff
>         inet 127.0.1.10 netmask 0xffffffff
>         inet 127.0.1.11 netmask 0xffffffff
>         inet 127.0.1.12 netmask 0xffffffff
>         inet 127.0.1.13 netmask 0xffffffff
>         inet 127.0.1.14 netmask 0xffffffff
>         inet 127.0.1.15 netmask 0xffffffff
>         inet 127.0.1.16 netmask 0xffffffff
>         inet 127.0.1.17 netmask 0xffffffff
>         inet 127.0.1.18 netmask 0xffffffff
>         inet 127.0.1.19 netmask 0xffffffff
>         inet 127.0.1.20 netmask 0xffffffff
>         
> As you can see, ifconfig didn`t change anything.
> How to disable VLAN_MTU and VLAN_HWCSUM flags?
>         

Why you need to disable VLAN_MTU/VLAN_HWCSUM?
Unlike other capabilities, VLAN_MTU capability is just an indicator
for oversized frame capability. If hardware supports VLAN oversized
frame there is no reason to disable it. Of course, some drivers
(e.g. fxp(4)) allow enabling/disabling VLAN_MTU but it's for
enabling software workaround for old controller that lacks
receiving VLAN oversized frames.

Many controllers can't selectively disable checksum offloading on
VLAN frames while still allowing checksum offloading on non-VLAN
frames. And vlan(4) requires VLAN hardware tagging to make checksum
offloading for VLAN frames work. So disabling VLAN hardware tagging
will disable checksum offloading on VLAN frames.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100701230745.GH7090>