Feature #13554


vnics should advertise IPv6 checksums

Added by Robert Mustacchi over 2 years ago. Updated over 2 years ago.

driver - device drivers
Start date:
Due date:
% Done:


Estimated time:
Gerrit CR:
External Bug:


The vnic driver today doesn't blindly pass through all of the checksum features that the underlying device supports, it happens to have an explicit list that it allows. For reasons that have been unfortunately lost to time, it appears that when this was originally implemented, it didn't pass through the IPv6 checksum support. Given that we have support for this in the mac emulation layer, it seems prudent to allow this to be used by devices, especially if we want IPv6 TSO support.

Actions #1

Updated by Electric Monk over 2 years ago

  • Gerrit CR set to 1267
Actions #2

Updated by Ryan Zezeski over 2 years ago

I did some testing on Robert's behalf using this patch combined with #13449. I used my lso tests to generate IPv6 traffic in various scenarios (primary interface, VLAN, VNIC, tagged VNIC) and then used a specific dtrace script to verify that IPv6 ULP checksum flag was being set.

Keep in mind that we don't expect to see LSO for IPv6 because it's gated behind missing IPv6 TSO emulation logic in mac-loopback (see #12731).

rpz@thunderhead:~/rpz-misc/illumos/net-tests$ pfexec ./lso-tests cxgbe0 cxgbe1
PASS [test_lso_ip4_primary<cxgbe0>]
PASS [test_lso_ip4_primary_vlan<cxgbe0>]
PASS [test_lso_ip4_vnic<cxgbe0>]
PASS [test_lso_ip4_vnic_vlan<cxgbe0>]
PASS [test_lso_ip4_mac_loopback<cxgbe0>]
PASS [test_lso_ip4_mac_loopback_vlan<cxgbe0>]

% The following tests will elide the LSO check until the   %
% mac sw LSO is updated to handle IPv6 -- for now these    %
% tests only verify that traffic is sent, not LSO.         %
PASS [test_lso_ip6_primary<cxgbe0>]
PASS [test_lso_ip6_primary_vlan<cxgbe0>]
PASS [test_lso_ip6_vnic<cxgbe0>]
PASS [test_lso_ip6_vnic_vlan<cxgbe0>]
PASS [test_lso_ip6_mac_loopback<cxgbe0>]
PASS [test_lso_ip6_mac_loopback_vlan<cxgbe0>]

rpz@thunderhead:~$ pfexec dtrace -Cqs /data/d/cxgbe-tx-cksum.d
=== COUNTS ===
TYPE     VLAN     HW FLAGS                 PKT COUNT       
IPv4     --       --                       13
IPv4     9        --                       18
OTH      --       --                       38
OTH      9        --                       39
IPv6     9        --                       100
IPv6     --       --                       103
IPv4     --       HDR + FULL ULP           11389
IPv4     9        HDR + FULL ULP           11488
IPv4     --       LSO + HDR + FULL ULP     18502
IPv4     9        LSO + HDR + FULL ULP     19469
IPv6     --       FULL ULP                 87520
IPv6     9        FULL ULP                 87529

Finally, just to be sure we were exercising the IPv6 hardware emulation on mac-loopback I used the following DTrace one-liner.

rpz@thunderhead:~$ pfexec dtrace -qn 'mac_sw_cksum_ipv6:entry { this->ip6 = (ip6_t *)(args[0]->b_rptr + arg1); @[inet_ntoa6(&this->ip6->ip6_src), inet_ntoa6(&this->ip6->ip6_dst)] = count(); }'

  fd00:0:1:4d::5                                      fd00:0:1:4d::4                                                19519
  fd00:0:1:4d::4                                      fd00:0:1:4d::5                                                75844
Actions #3

Updated by Robert Mustacchi over 2 years ago

In addition to Ryan's testing, I verified that the ill_t properly advertised checksum support over a T6 which has support for the gated feature. I also used this as part of testing with #13449 and without this I was getting corruption because VLAN tagged traffic over a VNIC wasn't getting IPv6 checksums with TSO.

Actions #4

Updated by Electric Monk over 2 years ago

  • Status changed from New to Closed
  • % Done changed from 50 to 100

git commit 67ba9ac97cfcbc2368432da6d6d5cc1eb888fda3

commit  67ba9ac97cfcbc2368432da6d6d5cc1eb888fda3
Author: Robert Mustacchi <>
Date:   2021-02-24T17:03:19.000Z

    13554 vnics should advertise IPv6 checksums
    Reviewed by: Jorge Schrauwen <>
    Reviewed by: Ryan Zezeski <>
    Approved by: Gordon Ross <>


Also available in: Atom PDF