Bug 231474 - "ifconfig igbX txcsum" doesn't include "txcsum6".
Summary: "ifconfig igbX txcsum" doesn't include "txcsum6".
Status: Closed Works As Intended
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-net (Nobody)
URL:
Keywords: IntelNetworking
Depends on:
Blocks:
 
Reported: 2018-09-19 12:19 UTC by Lev A. Serebryakov
Modified: 2019-01-26 09:17 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lev A. Serebryakov freebsd_committer freebsd_triage 2018-09-19 12:19:46 UTC
man ifconfig says that "rxcsum" and "txcsum" includes both IPv4 and IPv6 options. But in case of igb driver "rxcsum" includes both, but "txcsum" inccludes only IPv4 option and IPv6 option should be tuened on/off separately.

Here is how it looks:

# ifconfig igb0 | grep options
        options=e505bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,LRO,VLAN_HWFILTER,VLAN_HWTSO,RXCSUM_IPV6,TXCSUM_IPV6>
        nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
# ifconfig igb0 -rxcsum -txcsum
# ifconfig igb0 | grep options
        options=c505b8<VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,LRO,VLAN_HWFILTER,VLAN_HWTSO,TXCSUM_IPV6>
        nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
#

As you can see, RXCSUM_IPV6 is OFF, but TXCSUM_IPV6 is still ON. It could be turned off separately:

# ifconfig igb0 -txcsum6
# ifconfig igb0 | grep options
        options=8505b8<VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,LRO,VLAN_HWFILTER,VLAN_HWTSO>
        nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
#

And turning it ON again:


# ifconfig igb0 rxcsum txcsum
# ifconfig igb0 | grep options
        options=a505bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,LRO,VLAN_HWFILTER,VLAN_HWTSO,RXCSUM_IPV6>
        nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
# ifconfig igb0 txcsum6
# ifconfig igb0 | grep options
        options=e505bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,LRO,VLAN_HWFILTER,VLAN_HWTSO,RXCSUM_IPV6,TXCSUM_IPV6>
        nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
#
Comment 1 Stephen Hurd freebsd_committer freebsd_triage 2018-09-19 16:00:37 UTC
Can you post the output of:

ifconfig -m igb0 | grep capabilities

> man ifconfig says that "rxcsum" and "txcsum" includes both IPv4 and IPv6 options.

I don't see that in the man page...

>      rxcsum, txcsum, rxcsum6, txcsum6
>              If the driver supports user-configurable checksum offloading,
>              enable receive (or transmit) checksum offloading on the inter-
>              face.  The feature can be turned on selectively per protocol fam-
>              ily.  Use rxcsum6, txcsum6 for ip6(4) or rxcsum, txcsum other-
>              wise.  Some drivers may not be able to enable these flags inde-
>              pendently of each other, so setting one may also set the other.
>              The driver will offload as much checksum work as it can reliably
>              support, the exact level of offloading varies between drivers.

There's a patch in PR 231151 which fixes the rxcsum behaviour (though for some reason, you're not seeing the issue) https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=231151
Comment 2 Lev A. Serebryakov freebsd_committer freebsd_triage 2018-09-19 16:14:06 UTC
(In reply to Stephen Hurd from comment #1)
Ок, I've mixed "tso" (which is "tso = tso4|tso6") and "[rt]xcsum[6]". But even so, then there is other bug: rxcsum INCLUDES rxcsum6 :-)

IMHO, it is inconsistent, that we have "tso", "tso4", "tso6" but only "[rt]xcsum" and "[rt]xcsum6"
Comment 3 Lev A. Serebryakov freebsd_committer freebsd_triage 2018-09-19 16:15:43 UTC
(In reply to Stephen Hurd from comment #1)
And here are capabilities:

% ifconfig -m igb0 | grep capabilities
        capabilities=e53dbb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,LRO,WOL_UCAST,WOL_MCAST,WOL_MAGIC,VLAN_HWFILTER,VLAN_HWTSO,RXCSUM_IPV6,TXCSUM_IPV6>
%
Comment 4 Stephen Hurd freebsd_committer freebsd_triage 2018-09-19 19:32:19 UTC
(In reply to Lev A. Serebryakov from comment #2)

> But even so, then there is other bug: rxcsum INCLUDES rxcsum6 :-)

Yes, but this is documented as being possible so isn't a bug so much as a clumsy feature... which means we can't clean it up until after the branch.

> IMHO, it is inconsistent, that we have "tso", "tso4", "tso6" but only "[rt]xcsum" and "[rt]xcsum6"

Consistency is not one of ifconfig's strong suits and unfortunately it's one of those things where breaking backward compatibility isn't trivial.
Comment 5 Lev A. Serebryakov freebsd_committer freebsd_triage 2018-09-19 20:16:46 UTC
(In reply to Stephen Hurd from comment #4)
In any case, I'm surprised that rxcsum an txcsum behaves differently, but, Ok, I think it is not a bug, really.
Comment 6 Andriy Voskoboinyk freebsd_committer freebsd_triage 2019-01-26 09:17:31 UTC
Looks like the issue was resolved