Hi, Roland!

ipoib_ib.c has this:
        /*
         * IB will leave a 40 byte gap for a GRH and IPoIB adds a 4 byte
         * header.  So we need 4 more bytes to get to 48 and align the
         * IP header to a multiple of 16.
         */
        skb_reserve(skb, 4);

Some questions on this:
- Why do we try to align the IP header to a multiple of 16?
- This works if skb start is 16 byte aligned.
  What guarantees that skb data is 16 byte aligned?
- Would the following code be better than the comment:
        skb_reserve(skb, ALIGN(IB_GRH_BYTES + IPOIB_ENCAP_LEN, 16) -
                    IB_GRH_BYTES - IPOIB_ENCAP_LEN);

  comments have a bigger tenency to bitrot ...

-- 
MST

_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to