OS-6812: implement RFD 118 interpretation of HCKSUM_INET_FULL_V4/6

Details

Issue Type:Bug
Priority:4 - Normal
Status:Resolved
Created at:2018-03-23T12:43:11.339Z
Updated at:2018-04-04T17:39:35.892Z

People

Created by:Former user
Reported by:Former user
Assigned to:Former user

Resolution

Fixed: A fix for this issue is checked into the tree and tested.
(Resolution Date: 2018-04-04T17:39:35.881Z)

Fix Versions

2018-04-12 Promised Land (Release Date: 2018-04-12)

Related Issues

Description

As described in RFD 118, we will narrow the interpretation of HCKSUM_INET_FULL_V4/6 so that it only applies to UDP or TCP. In particular, this means that upstack consumers of this capability must calculate a software checksum for ICMP.

Future work can add upstack support for the new HCKSUM_INET_FULL_ICMPV4/6 for hardware offload of this checksum when the driver advertises that capability.

Comments

Comment by Former user
Created at 2018-03-30T19:53:02.304Z
Updated at 2018-03-30T21:01:50.763Z

Testing notes:
I've been running a platform with these changes on my SmartOS VM for several days.

I can use dtrace to verify that in ip_output_cksum_v4, when the proto is 1 (IPPROTO_ICMP), we continue to call ip_output_sw_cksum_v4, as we always have here.

viona: I have confirmed networking to a bhyve VM still functions. Using DTrace I have confirmed we're pulling out the right proto (either UDP or TCP) with the viona_mb_get_uint8 function. Again with DTrace, I can see the l_cap_csum coming in to viona_tx_csum is 0x12 (HCKSUM_IPHDRCKSUM | HCKSUM_INET_PARTIAL) which are the capabilities e1000g advertises. I see no ICMP protocol activity in this function when I'm ping-ing the GZ, so that might be a different thing, but the ping does work as expected.

IPv6 testing: I plumbed up IPv6 on my SmartOS VM and with some help from Cody, I setup the MacOS side so I could use ping6 fe80::20c:29ff:fe57:54fb%vmnet8 to send IPv6 ICMP packets to SmartOS. I used DTrace on SmartOS to confirm we're entering ip_output_cksum_v6 with protocol 58 (IPPROTO_ICMPV6) and then calling ip_output_sw_cksum_v6. The pings work as expected.

qede testing: TBD


Comment by Former user
Created at 2018-04-04T17:08:52.179Z

I did basic testing of TCP, UDP, and ICMP on IPv4 and IPv6 and verified the checksum flags when transmitting by using the following DTrace one liner:

# dtrace -n 'fbt::qede_ring_tx:entry{ print(args[1]->b_datap->db_struioun.cksum.flags); }'

Comment by Jira Bot
Created at 2018-04-04T17:38:43.555Z

illumos-joyent commit 84636c8082b9aee9413dca55149c8d17a373523e (branch master, by Jerry Jelinek)

OS-6812 implement RFD 118 interpretation of HCKSUM_INET_FULL_V4/6