[ofa-general] [PATCHv2] IB/ipoib: S/G and HW checksum support

Or Gerlitz ogerlitz at voltaire.com
Wed Sep 5 02:37:51 PDT 2007


Michael S. Tsirkin wrote:
>> Quoting Or Gerlitz <ogerlitz at voltaire.com>:

>> looking on slide 18 of Dror's Sonoma presentation (*) which states -
>> Checksum Offload
>> TCP/UDP/IP Checksum Offloading - Query device for checksum offload support
>> QP Creation - Mark QP for IPoIB checksum support
>> TX - ibv_send_flags indicate checksum offload request
>> RX - ibv_wc_flags indicate checksum status (good, bad, unverified)


> All this is only supported by connectx and only for datagram (not ipoib cm).

I see. Reading the slide I thought that the chip does TCP/UDP/IP 
checksum offloading, now you say its only for connected mode and through 
the discussion I see the below comment of Jason saying that the chip 
"does" only L4 TCP/UDP checksum offloading since Linux always computes 
the L3 IP checksum:

> To summarize for clarity, both TCP and UDP have a checksum at the top
> of the data payload, and IPv4 also has a header checksum. This
> discussion, and your optimization, is all about the L4 TCP/UDP
> checksum.. Linux does not offload computation of the header
> checksum. 

Am I correct?

Unlike what you were writing over and over this thread, the reality is:

A) gateways need --not-- compute the L4 TCP/UDP checksum

B) there --are-- IB/Ethernet non Linux gateways around, specifically, 
all the three system companies involved here (Cisco, Qlogic & Voltaire) 
have HW based gateways, so as Jason wrote
> If you TX a packet with ip_summed == CHECKSUM_PARTIAL
> without doing the hardware csum offload procedure then on-the-wire the
> L3 (OrG - should be L4) TCP/UDP checksum bytes are garbage. The stack 
> no longer conforms to the various current RFCs -> the packet is malformed.

this patch allows malformed packets to be forwarded

> Your question is moot. I'll just quote the commit message here:
> 	rely on hardware end-to-end transport checksum (ICRC)
> 	instead of software-level protocol checksums
> 
> While this does not inter-operate with standard ipoib RFC,
> all TCP/IP suite protocols work as usual, so I think that
> this is at least as useful as SDP is.

no its not useful when there is forwarding around. No SDP packet can be 
received by the gateway unless it supports SDP, and to further forward 
this packet the gw needs to create TCP/IP headers for it, where with 
ipoib the gw gets the packet, take off the ipoib header and put mac 
header (among other things it does such as L3 IP checksum validation and 
more, but not L4 csum computation).

Or.




More information about the general mailing list