[SK_BUFF]: Introduce skb_copy_to_linear_data{_offset}
To clearly state the intent of copying to 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@ghostprotocols.net>
This commit is contained in:
committed by
David S. Miller
parent
3dbad80ac7
commit
27d7ff46a3
@ -1521,6 +1521,21 @@ static inline void skb_copy_from_linear_data_offset(const struct sk_buff *skb,
|
||||
memcpy(to, skb->data + offset, len);
|
||||
}
|
||||
|
||||
static inline void skb_copy_to_linear_data(struct sk_buff *skb,
|
||||
const void *from,
|
||||
const unsigned int len)
|
||||
{
|
||||
memcpy(skb->data, from, len);
|
||||
}
|
||||
|
||||
static inline void skb_copy_to_linear_data_offset(struct sk_buff *skb,
|
||||
const int offset,
|
||||
const void *from,
|
||||
const unsigned int len)
|
||||
{
|
||||
memcpy(skb->data + offset, from, len);
|
||||
}
|
||||
|
||||
extern void skb_init(void);
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user