Jialin, very lame to bcc multiple developers, that's bad form and please
don't do that.  I've already responded offlist.

Thanks Jeff for forwarding.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Kirsher,
Jeffrey T
Sent: Monday, July 07, 2008 2:40 PM
To: [email protected]
Subject: [E1000-devel] FW: Question about TCP TX checksum offloading
onIntel 82575 Giga NIC (igb) on Supermicro platform

-----Original Message-----
From: Jialin Song [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 07, 2008 2:24 PM

Jeff,

My name is Jialin Song. I work on network device virtualization via
Infiniband. Our V8000 IO server (IOS) forwards network traffic from our
application servers through infiniband connection to the networks,
(running REHL5.1 2.6.18-53 Linux X86-64 kernel). 

When our IOS forwards the packet from Infiniband connection, we set
skb->ip_summed=CHECKSUM_HW flag and skb->csum=10 (TCP checksum offset in
TCP header) in our forwarding packet to request the PNIC on the IOS to
checksum the TX path TCP packet by hardware. 

This used to work fine with e1000 NIC driver. However, recently, when we
test on an Intel 82575 Giga NIC (igb) built on the SuperMicro hardware
platform, we found the TCP TX checksum was not updated by the igb NIC
hardware. After inspecting the Linux igb driver, we found the igb driver
set E1000_ADVTXD_TUCMD_L4T_TCP TCP checksum offload flag by testing
skb->sk->sk_protocol==IPPROTO_TCP in igb_tx_csum_adv() of
drivers/net/igb_main.c, which is different from e1000 driver. In our
case, since we don't have a socket attached to the non-locally-generated
forwarding skbs (skb->sk = NULL), the TCP checksum is not updated by igb
hardware since the above check fails.

I modified the igb driver to check the TCP protocol based on the
skb->nh.iph->protocol IP header field instead of looking at the
skb->sk->sk_protocol field. This time, the igb NIC updates the TCP
checksum field in the packet, but the checksum is still wrong (tcpdump
-vvv reports TCP checksum error on the receiver side). 

When we turn off the TCP TX checksum offload feature for the igb NIC via
"ethtool -K eth2 tx off", the TCP traffic received by the receiver side
becomes correct since the Linux kernel is doing the checksum instead of
offloading to the igb hardware this time.

My questions are:
1. In the future, is that possible to modify the igb driver to look at
the IP header field for the transport protocol type instead of looking
at the kernel socket skb->sk->sk_protocol data field?

2. Does the igb hardware look at the skb->sk field as well? Since even
after we modified the igb driver to get TCP protocol ID from IP header,
the checksum calculated by the hardware is still not right.

2. Does the igb driver or the NIC hardware require other sk_buff
checksum-related fields to be set in addition to skb->ip_summed and
skb->csum?


Thanks very much in advance!

Jialin
3leaf Systems.


------------------------------------------------------------------------
-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
E1000-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/e1000-devel

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
E1000-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/e1000-devel

Reply via email to