summaryrefslogtreecommitdiff
path: root/include/linux/skbuff.h
diff options
context:
space:
mode:
authorPaolo Abeni <pabeni@redhat.com>2021-07-28 18:24:00 +0200
committerDavid S. Miller <davem@davemloft.net>2021-07-29 12:18:11 +0100
commit8a886b142bd03d36612747e9aefdf0282c8b02dd (patch)
treeecf17a0c88d7ab93ef2bda79603fc8928c6654d7 /include/linux/skbuff.h
parent5fc88f93edf2f797f1aa63334cc6c86f9c15d585 (diff)
downloadlwn-8a886b142bd03d36612747e9aefdf0282c8b02dd.tar.gz
lwn-8a886b142bd03d36612747e9aefdf0282c8b02dd.zip
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>
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r--include/linux/skbuff.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 3ff18300d210..b1e5bbfcc926 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -992,6 +992,7 @@ static inline struct dst_entry *skb_dst(const struct sk_buff *skb)
*/
static inline void skb_dst_set(struct sk_buff *skb, struct dst_entry *dst)
{
+ skb->slow_gro |= !!dst;
skb->_skb_refdst = (unsigned long)dst;
}
@@ -1008,6 +1009,7 @@ static inline void skb_dst_set(struct sk_buff *skb, struct dst_entry *dst)
static inline void skb_dst_set_noref(struct sk_buff *skb, struct dst_entry *dst)
{
WARN_ON(!rcu_read_lock_held() && !rcu_read_lock_bh_held());
+ skb->slow_gro = !!dst;
skb->_skb_refdst = (unsigned long)dst | SKB_DST_NOREF;
}