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

Michael S. Tsirkin mst at dev.mellanox.co.il
Tue Sep 4 12:49:40 PDT 2007


> Quoting James Lentini <jlentini at netapp.com>:
> Subject: Re: [PATCHv2] IB/ipoib: S/G and HW checksum support
> 
> 
> 
> On Tue, 4 Sep 2007, Michael S. Tsirkin wrote:
> 
> > Add module option hw_csum: when set, IPoIB will report S/G
> > support, and rely on hardware end-to-end transport checksum (ICRC)
> > instead of software-level protocol checksums.
> 
> The purpose of this option would be clearer if the parameter name were 
> "omit_csum". Calling this "HW checksum" support is misleading because 
> the term is already used to describe network adapters that calculate 
> TCP/IP checksums in hardware. I realize that you are using the HW 
> checksum infrastructure to implement this, but it is really not the 
> same thing.

Another reason is that I declare HW_CSUM in the netdev
feature list. Yea, someone might get confused,
but "omit checksum" is misleading, too, and is likely to
scare users away from the feature: the need for end-to-end checksum
is a widely recognised requirement. So I don't have a better name.
Hopefully modinfo documents the option well enough.

> > Since this will not inter-operate with older IPoIB modules, this 
> > option is off by default.
> > 
> > Signed-off-by: Michael S. Tsirkin <mst at mellanox.co.il>
> 
> Does the S/G support need to be tied to the checksum changes?
> 
> Will the proposed IPoIB wire format changes be standardized in the 
> IETF?

I don't know.

> Can you describe what will happened when an IETF compliant IPoIB node 
> and a "csum omitted" IPoIB node attempt to communicate? How would the 
> interoperability errors be indicated to the user?

old ipoib sends all packets with hw csum bit off, new ipoib handles them ok.
new ipoib might send a packet with hw csum bit clear (e.g.
packet that comes from external gateway), this one
gets handled by old ipoib fine.

OTOH typical packets sent from new ipoib have hw csum bit set.
old ipoib ignores this bit and passes the packets up the stack.
You'll get checksum failure errors which result in transport errors.
These can be observed with standard linux tools.

-- 
MST



More information about the general mailing list