tom60 wrote:
Darren,
Thank you.
I also think of modifying the tcp checksum, but that means the Solaris
OS would re-calculate each TCP packet's check sum.
Why would it do that?
I guess there is a way to announce that the checksum of the received
TCP packets have been verified by HW so re-calculation by the OS is
not necessary. But setting HCK_FULLCKSUM_OK alone is not enough somehow.
See Rao's email - the driver needs to be advertising the capability too.
Darren
Tom
--------------------------------------------------
From: "Darren Reed" <darren.r...@oracle.com>
Sent: Tuesday, October 05, 2010 7:25 PM
To: <networking-discuss@opensolaris.org>
Subject: Re: [networking-discuss] LRO implementation
On 4/10/10 07:13 PM, Tom Chen wrote:
Hello,
I am implementing LRO on a 10G nic. I encountered a lot of "packet
out of order" issues.
Here is how I process LRO rx interrupt which follows our Linux driver:
1. From rx descriptors, we know how many extra bytes appended behind
the current tcp packet and the last appended packet's sequence number.
2. Read the tcp packet and extended payload
3. Modify the IP header's total_length field to reflect those extra
payloads
4. Since IP header has been changed, calculate new IP checksum and
update it in IP header
5. Update TCP header sequence field with new sequence number
6. Indicate to the OS that this LRO packet has good checksum by
"mac_hcksum_set(mp, 0, 0, 0, 0, HCK_FULLCKSUM_OK);"
7. send to OS.
However, it looks like the packet is rejected by OS and netstat
shows large number of "tcpInErrs". I am not sure how does the OS
know that the packet is corrupted? Probably I changed tcp header's
sequence number but did not re-calculate the TCP checksum? I did not
do because it is too time-consuming. Does the OS redo whole TCP
segments' checksum and verify even if the packet has
HCK_FULLCKSUM_OK flag set?
If you changed the tcp header sequence number by x then you need to
adjust the checksum by -x.
Darren
_______________________________________________
networking-discuss mailing list
networking-discuss@opensolaris.org
_______________________________________________
networking-discuss mailing list
networking-discuss@opensolaris.org