Skip to content

Commit a4ff365

Browse files
Ricardo Martinezdavem330
authored andcommitted
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>
1 parent 2fbdf45 commit a4ff365

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

include/linux/skbuff.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1665,6 +1665,11 @@ static inline void skb_set_end_offset(struct sk_buff *skb, unsigned int offset)
16651665
}
16661666
#endif
16671667

1668+
static inline unsigned int skb_data_area_size(struct sk_buff *skb)
1669+
{
1670+
return skb_end_pointer(skb) - skb->data;
1671+
}
1672+
16681673
struct ubuf_info *msg_zerocopy_realloc(struct sock *sk, size_t size,
16691674
struct ubuf_info *uarg);
16701675

0 commit comments

Comments
 (0)