<html><body>
<p>Hello Eli,<br>
<br>
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?<br>
<br>
static void ipoib_ud_skb_put_frags(struct sk_buff *skb, unsigned int length)<br>
{<br>
skb_frag_t *frag = &skb_shinfo(skb)->frags[0];<br>
if (skb_shinfo(skb)->nr_frags) {<br>
/*<br>
* we know only two buffers here, first buf size is<br>
* IPOIB_UD_HEAD_SIZE<br>
*/<br>
skb->tail += IPOIB_UD_HEAD_SIZE;<br>
frag->size = length - IPOIB_UD_HEAD_SIZE;<br>
skb->data_len += frag->size;<br>
skb->truesize += frag->size;<br>
skb->len += length;<br>
} else<br>
skb_put(skb, length);<br>
}<br>
<br>
Thanks<br>
Shirley </body></html>