diff mbox series

[net-next,2/2] net: skb: Remove skb_data_area_size()

Message ID 20220513173400.3848271-3-ricardo.martinez@linux.intel.com
State New
Headers show
Series net: skb: Remove skb_data_area_size() | expand

Commit Message

Ricardo Martinez May 13, 2022, 5:34 p.m. UTC
skb_data_area_size() is not needed. As Jakub pointed out [1]:
For Rx, drivers can use the size passed during skb allocation or
use skb_tailroom().
For Tx, drivers should use skb_headlen().

[1] https://lore.kernel.org/netdev/CAHNKnsTmH-rGgWi3jtyC=ktM1DW2W1VJkYoTMJV2Z_Bt498bsg@mail.gmail.com/

Signed-off-by: Ricardo Martinez <ricardo.martinez@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 include/linux/skbuff.h | 5 -----
 1 file changed, 5 deletions(-)
diff mbox series

Patch

diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 9d82a8b6c8f1..2810a3abe81a 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1764,11 +1764,6 @@  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);