svn commit: r357553 - head/sys/dev/cxgbe

Navdeep Parhar np at FreeBSD.org
Wed Feb 5 23:00:36 UTC 2020


On 2/5/20 3:19 AM, Slawa Olhovchenkov wrote:
> On Wed, Feb 05, 2020 at 12:13:15AM +0000, Navdeep Parhar wrote:
> 
>> Author: np
>> Date: Wed Feb  5 00:13:15 2020
>> New Revision: 357553
>> URL: https://svnweb.freebsd.org/changeset/base/357553
>>
>> Log:
>>   cxgbe(4): Add a knob to allow netmap tx traffic to be checksummed by
>>   the hardware.
>>   
>>   hw.cxgbe.nm_txcsum=1
> 
> Very interesting.
> Please, describe some more detail about using this feture (for
> example, set this before driver loading? first netmap open? any netmap
> open? on the fly?)
> 

If you set this to 1 then all netmap Tx traffic that is recognized as
valid TCP/UDP on IP/IPv6 by the chip will get L3 and L4 checksums
inserted in proper places automatically.  This means a netmap
application trying to send legitimate traffic doesn't have to calculate
checksums in software.

It is safe to change this at any time and it will take effect immediately.

netmap(4) says that hw checksum should be disabled on the interface but
cxgbe has always had a way to bypass this.  It used to be via the normal
csum capabilities of the interface but those sometimes caused confusion
because they aren't supposed to be set with netmap so r355673 removed
netmap tx checksumming.  This rev brought it back with a driver-specific
knob.

Regards,
Navdeep


More information about the svn-src-head mailing list