2022-05-06 09:49:09

by Martinez, Ricardo

[permalink] [raw]
Subject: [PATCH net-next v7 02/14] net: skb: introduce skb_data_area_size()

Helper to calculate the linear data space in the skb.

Signed-off-by: Ricardo Martinez <[email protected]>
---
include/linux/skbuff.h | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 3270cb72e4d8..bd667c0129ad 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -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_alloc(struct sock *sk, size_t size);
struct ubuf_info *msg_zerocopy_realloc(struct sock *sk, size_t size,
struct ubuf_info *uarg);
--
2.25.1



2022-05-09 06:47:33

by Sergey Ryazanov

[permalink] [raw]
Subject: Re: [PATCH net-next v7 02/14] net: skb: introduce skb_data_area_size()

On Fri, May 6, 2022 at 4:16 AM Ricardo Martinez
<[email protected]> wrote:
>
> Helper to calculate the linear data space in the skb.
>
> Signed-off-by: Ricardo Martinez <[email protected]>

Please refresh the patch, it does not apply to the current net-next tree.

Reviewed-by: Sergey Ryazanov <[email protected]>