[SK_BUFF]: Introduce skb_copy_from_linear_data{_offset}
To clearly state the intent of copying from linear sk_buffs, _offset being a overly long variant but interesting for the sake of saving some bytes. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
committed by
David S. Miller
parent
2a123b86e2
commit
d626f62b11
@ -221,7 +221,7 @@ static int atmtcp_v_send(struct atm_vcc *vcc,struct sk_buff *skb)
|
||||
hdr->vpi = htons(vcc->vpi);
|
||||
hdr->vci = htons(vcc->vci);
|
||||
hdr->length = htonl(skb->len);
|
||||
memcpy(skb_put(new_skb,skb->len),skb->data,skb->len);
|
||||
skb_copy_from_linear_data(skb, skb_put(new_skb, skb->len), skb->len);
|
||||
if (vcc->pop) vcc->pop(vcc,skb);
|
||||
else dev_kfree_skb(skb);
|
||||
out_vcc->push(out_vcc,new_skb);
|
||||
@ -310,7 +310,7 @@ static int atmtcp_c_send(struct atm_vcc *vcc,struct sk_buff *skb)
|
||||
goto done;
|
||||
}
|
||||
__net_timestamp(new_skb);
|
||||
memcpy(skb_put(new_skb,skb->len),skb->data,skb->len);
|
||||
skb_copy_from_linear_data(skb, skb_put(new_skb, skb->len), skb->len);
|
||||
out_vcc->push(out_vcc,new_skb);
|
||||
atomic_inc(&vcc->stats->tx);
|
||||
atomic_inc(&out_vcc->stats->rx);
|
||||
|
Reference in New Issue
Block a user