Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sk_buff: track dst status in slow_gro

Similar to the previous patch, but covering the dst field:
the slow_gro flag is additionally set when a dst is attached
to the skb

RFC -> v1:
- use the existing flag instead of adding a new one

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Paolo Abeni and committed by
David S. Miller
8a886b14 5fc88f93

+4
+2
include/linux/skbuff.h
··· 992 992 */ 993 993 static inline void skb_dst_set(struct sk_buff *skb, struct dst_entry *dst) 994 994 { 995 + skb->slow_gro |= !!dst; 995 996 skb->_skb_refdst = (unsigned long)dst; 996 997 } 997 998 ··· 1009 1008 static inline void skb_dst_set_noref(struct sk_buff *skb, struct dst_entry *dst) 1010 1009 { 1011 1010 WARN_ON(!rcu_read_lock_held() && !rcu_read_lock_bh_held()); 1011 + skb->slow_gro = !!dst; 1012 1012 skb->_skb_refdst = (unsigned long)dst | SKB_DST_NOREF; 1013 1013 } 1014 1014
+2
include/net/dst.h
··· 277 277 278 278 static inline void __skb_dst_copy(struct sk_buff *nskb, unsigned long refdst) 279 279 { 280 + nskb->slow_gro |= !!refdst; 280 281 nskb->_skb_refdst = refdst; 281 282 if (!(nskb->_skb_refdst & SKB_DST_NOREF)) 282 283 dst_clone(skb_dst(nskb)); ··· 317 316 dst = NULL; 318 317 319 318 skb->_skb_refdst = (unsigned long)dst; 319 + skb->slow_gro |= !!dst; 320 320 } 321 321 322 322 return skb->_skb_refdst != 0UL;