[ofa-general] 4K MTU patch review
Shirley Ma
xma at us.ibm.com
Wed Feb 6 15:13:05 PST 2008
Hello Eli,
To optimize ipoib_ud_skb_put_frags(), the patch could be like this
since we know the first buf only has IPOIB_UD_HEAD_SIZE, how do you think?
static void ipoib_ud_skb_put_frags(struct sk_buff *skb, unsigned int
length)
{
skb_frag_t *frag = &skb_shinfo(skb)->frags[0];
if (skb_shinfo(skb)->nr_frags) {
/*
* we know only two buffers here, first buf size is
* IPOIB_UD_HEAD_SIZE
*/
skb->tail += IPOIB_UD_HEAD_SIZE;
frag->size = length - IPOIB_UD_HEAD_SIZE;
skb->data_len += frag->size;
skb->truesize += frag->size;
skb->len += length;
} else
skb_put(skb, length);
}
Thanks
Shirley
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20080206/b5da877c/attachment.html>
More information about the general
mailing list