if_igb(4) VLAN(4) and [RT]XCSUM_IPV6, TSO6

Andrey V. Elsukov bu7cher at yandex.ru
Thu Apr 6 11:24:12 UTC 2017


On 16.03.2017 21:26, Harry Schmalzbauer wrote:
> So TSO6 is inherited, but RC/TXCSUM_IPV6 dropped?
> 
> In general, how is offloading implemented? If enabled, does the API
> simply generate packets lacking the checksum header and NIC (silicon)
> fills in the checksum if not adviesd not to do so (by the driver)?
> Or is the driver utilizing NIC registers for calculation, but ensures
> every packet will have a checksum?

Since IPv6 header doesn't have checksum, such offloading is related to
TCP/UDP/SCTP checksums.

When RXCSUM_IPV6 is enabled, the NIC calculates the checksum and saves
its value into the auxiliary packet's data. When the network stack
handles the packet, it checks the presence of this data, and it uses
stored checksum to reduce the needed calculation.

For outgoing packets the L4 protocol marks a packet that the checksum
calculation is needed before sending. And when TXCSUM_IPV6 is enabled,
IPv6 output routine sees this flag and skips checksum calculation. And
the NIC does this calculation.

-- 
WBR, Andrey V. Elsukov

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 553 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-net/attachments/20170406/4e1851bc/attachment.sig>


More information about the freebsd-net mailing list