[ofa-general] RE: [UPDATE] [V3] [PATCH 3/3] ib/ipoib: IPoIB-UD RX S/G supportfor 4K MTU

Shirley Ma xma at us.ibm.com
Sun Feb 3 09:36:45 PST 2008






Does your recommendation is the same as Roland's before? I hope it's not,
otherwise, it doesn't work. Since  the first buffer is GRH + IPoIB HEAD =
44 bytes not 40 bytes. If we put all skb data in the first frag, then the
IP header is not aligned to 16 bytes. I am copying Roland's comments
regarding this approach:
---------
However, I now realize that my earlier idea of allocating a scratch
buffer for the GRH and just allocating a 4096 byte skb doesn't work,
because the skb_shinfo ends up being allocated along with the buffer,
so trying to allocate a 4096-byte skb will bloat the data past a
single page, which is what we're trying to avoid.

So how about the following?  When using a UD MTU of 4096 with a page
size of 4096, allocate an skb of size 44 for the GRH and ethertype,
and then allocate a single page for the fragment list.  This means
that the IP packet will start nicely 16-byte aligned for free, and all
the bookkeeping is very simple.
-------

thanks
Shirley
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20080203/97282dc3/attachment.html>


More information about the general mailing list