[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
@@ -34,7 +34,7 @@ int nr_loopback_queue(struct sk_buff *skb)
|
||||
struct sk_buff *skbn;
|
||||
|
||||
if ((skbn = alloc_skb(skb->len, GFP_ATOMIC)) != NULL) {
|
||||
memcpy(skb_put(skbn, skb->len), skb->data, skb->len);
|
||||
skb_copy_from_linear_data(skb, skb_put(skbn, skb->len), skb->len);
|
||||
skb_reset_transport_header(skbn);
|
||||
|
||||
skb_queue_tail(&loopback_queue, skbn);
|
||||
|
||||
Reference in New Issue
Block a user