[ofa-general] [PATCHv2] IB/ipoib: S/G and HW checksum support
Jason Gunthorpe
jgunthorpe at obsidianresearch.com
Tue Sep 4 10:27:25 PDT 2007
On Tue, Sep 04, 2007 at 08:04:19PM +0300, Michael S. Tsirkin wrote:
> > This would be alot better in my mind of the option was negotiated as
> > part of the CM setup process.
>
> Unfortunately, HW_CSUM device->features flag is a per-netdevice one.
> We could do an extra pass over the packet, but this would mean a
> performance hit for such paths. Your suggestion also does
> not address multicast addresses.
Why is there a big difference in performance if the stack does the
csum update or if the netdevice does the csum update?
Aren't you already summing all UD packets (inclusing multicast) in the
driver before sending? Though, to be honest, I don't see this in your
patch, so maybe not..
> > What if the RXing Linux IB side is acting as a forwarder to ethernet?
> > It will forward corrupt packets if this option is set, right?
>
> No. The checksum will be calculated by the gateway before being sent on the
> ethernet interface.
I thought linux only recomputed the checksum on the forwarding path if
the skb was marked as needing checksum. Since you set the skb as
already summed, there should be cases where invalid packets will be
forwarded..
I'd be surprised if a real, hardware, IPoIB to XX device recomputed
the checksum unconditionally. The typical approach is to do an
incremental update of the checksum if you are changing the packet
headers. This preserves the end-to-end-ness and also does not require
buffering the entire packet before updating it.
Jason
More information about the general
mailing list