Skip to contentSkip to conversation

net: factor out skb_mac_gso_segment() from skb_gso_segment()

PATCH In review Pravin B Shelar 2 participants 2 messages Feb 15, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/3 net: factor out skb_mac_gso_segment() from skb_gso_segment()

This function will be used in next GRE_GSO patch. This patch does not change any functionality. It only exports skb_mac_gso_segment() function.

---
 include/linux/netdevice.h |    2 +
 net/core/dev.c            |   79 +++++++++++++++++++++++++++-----------------
 2 files changed, 50 insertions(+), 31 deletions(-)
include/linux/netdevice.h +2 -0
index 9deb672..920361b 100644
@@ -2671,6 +2671,8 @@ extern void netdev_upper_dev_unlink(struct net_device *dev,
 extern int skb_checksum_help(struct sk_buff *skb);
 extern struct sk_buff *__skb_gso_segment(struct sk_buff *skb,
 	netdev_features_t features, bool tx_path);
+extern struct sk_buff *skb_mac_gso_segment(struct sk_buff *skb,
+					  netdev_features_t features);
 
 static inline
 struct sk_buff *skb_gso_segment(struct sk_buff *skb, netdev_features_t features)
net/core/dev.c +48 -31

113 lines not on this page · raw message

Signature · 1 line
1.7.1
Acked-by on v1 2/3
#1 lore raw
Quoted 5 lines · Pravin B Shelar

This function will be used in next GRE_GSO patch. This patch does not change any functionality. It only exports skb_mac_gso_segment() function.

...

Quoted 4 lines
net/core/dev.c +4 -0
+struct sk_buff *__skb_gso_segment(struct sk_buff *skb,
+				  netdev_features_t features, bool tx_path)
+{
+

...

net/core/dev.c struct sk_buff *__skb_gso_segment(struct sk_buff *skb, · line 2417

Quoted 3 lines
net/core/dev.c +3 -0
+
+	skb_reset_mac_header(skb);
+	skb->mac_len = skb->network_header - skb->mac_header;

This could use skb_reset_mac_len() helper, but thats a minor point.