[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220506011616.1774805-3-ricardo.martinez@linux.intel.com>
Date: Thu, 5 May 2022 18:16:04 -0700
From: Ricardo Martinez <ricardo.martinez@...ux.intel.com>
To: netdev@...r.kernel.org, linux-wireless@...r.kernel.org
Cc: kuba@...nel.org, davem@...emloft.net, johannes@...solutions.net,
ryazanov.s.a@...il.com, loic.poulain@...aro.org,
m.chetan.kumar@...el.com, chandrashekar.devegowda@...el.com,
linuxwwan@...el.com, chiranjeevi.rapolu@...ux.intel.com,
haijun.liu@...iatek.com, amir.hanania@...el.com,
andriy.shevchenko@...ux.intel.com, dinesh.sharma@...el.com,
eliot.lee@...el.com, ilpo.johannes.jarvinen@...el.com,
moises.veleta@...el.com, pierre-louis.bossart@...el.com,
muralidharan.sethuraman@...el.com, Soumya.Prakash.Mishra@...el.com,
sreehari.kancharla@...el.com, madhusmita.sahu@...el.com,
Ricardo Martinez <ricardo.martinez@...ux.intel.com>
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 <ricardo.martinez@...ux.intel.com>
---
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
Powered by blists - more mailing lists