net: skb: introduce skb_data_area_size()
Helper to calculate the linear data space in the skb. Signed-off-by: Ricardo Martinez <ricardo.martinez@linux.intel.com> Reviewed-by: Sergey Ryazanov <ryazanov.s.a@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
2fbdf45d7d
commit
a4ff365346
@ -1665,6 +1665,11 @@ static inline void skb_set_end_offset(struct sk_buff *skb, unsigned int offset)
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline unsigned int skb_data_area_size(struct sk_buff *skb)
|
||||
{
|
||||
return skb_end_pointer(skb) - skb->data;
|
||||
}
|
||||
|
||||
struct ubuf_info *msg_zerocopy_realloc(struct sock *sk, size_t size,
|
||||
struct ubuf_info *uarg);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user