Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Sep 2016 10:49:56 +0900
From:      YongHyeon PYUN <pyunyh@gmail.com>
To:        Emeric POUPON <emeric.poupon@stormshield.eu>
Cc:        freebsd-net@FreeBSD.org
Subject:   Re: Vlan offloaded checksums
Message-ID:  <20160913014956.GA1199@michelle.fasterthan.co.kr>
In-Reply-To: <1628370702.4125956.1473696542873.JavaMail.zimbra@stormshield.eu>
References:  <1628370702.4125956.1473696542873.JavaMail.zimbra@stormshield.eu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Sep 12, 2016 at 06:09:02PM +0200, Emeric POUPON wrote:
> Hello,
> 
> I have a network driver that supports hardware checksums.
> Thanks to offset parameters, it also supports VLAN checksums.
> However, it does not handle hardware tagging (not sure the underlying network adapter can actually do it)
> 
> Unfortunately, the VLAN hardware checksums seem to be done only if IFCAP_VLAN_HWTAGGING is set [1]
> I do not understand this assertion: if I force the propagation of the hardware checksuming only based on the IFCAP_VLAN_HWCSUM, it works fine with my driver.
> 
> What do you think?
> 

As you said some NICs do not rely on VLAN H/W tagging to make VLAN
checksum offloading work.  But current vlan(4) assumes VLAN H/W
tagging is prerequisite condition to support VLAN checksum
offloading. The same is true for TSO support over VLAN.

I don't know what NIC you're referring to but it's rare to see
controllers that don't support VLAN H/W tagging on PC/Servers.  But
it might be common NIC feature found on SoCs.

If H/W requires offset parameters for checksum offloading you may
already have to parse mbufs in the driver to extract that
information and it would add additional overheads.  If you really
want to enable VLAN H/W checksum offloading in your driver you may
be able to add VLAN tag handling in the parser and announce VLAN
H/W tagging capability to network stack.  You may not notice
performance differences with VLAN H/W checksum offloading though.



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