diff mbox series

[RFC,v5,1/5] net: introduce skb_rbtree_walk_safe()

Message ID 20220602041028.95124-2-xiyou.wangcong@gmail.com (mailing list archive)
State RFC
Headers show
Series net_sched: introduce eBPF based Qdisc | expand

Checks

Context Check Description
bpf/vmtest-bpf-next-VM_Test-1 fail Logs for Kernel LATEST on ubuntu-latest with gcc
bpf/vmtest-bpf-next-VM_Test-2 fail Logs for Kernel LATEST on ubuntu-latest with llvm-15
bpf/vmtest-bpf-next-PR fail PR summary
bpf/vmtest-bpf-next-VM_Test-3 fail Logs for Kernel LATEST on z15 with gcc
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cover_letter success Series has a cover letter
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 5746 this patch: 5746
netdev/cc_maintainers warning 12 maintainers not CCed: kafai@fb.com daniel@iogearbox.net songliubraving@fb.com ast@kernel.org yhs@fb.com edumazet@google.com davem@davemloft.net john.fastabend@gmail.com kuba@kernel.org imagedong@tencent.com andrii@kernel.org kpsingh@kernel.org
netdev/build_clang success Errors and warnings before: 1224 this patch: 1224
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 5894 this patch: 5894
netdev/checkpatch warning CHECK: Comparison to NULL could be written "skb" WARNING: Missing commit description - Add an appropriate one WARNING: line length of 81 exceeds 80 columns
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/tree_selection success Guessing tree name failed - patch did not apply, async

Commit Message

Cong Wang June 2, 2022, 4:10 a.m. UTC
From: Cong Wang <cong.wang@bytedance.com>

Signed-off-by: Cong Wang <cong.wang@bytedance.com>
---
 include/linux/skbuff.h | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index da96f0d3e753..857fd813c1bc 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -3929,6 +3929,11 @@  static inline int __skb_grow_rcsum(struct sk_buff *skb, unsigned int len)
 		for (skb = skb_rb_first(root); skb != NULL;			\
 		     skb = skb_rb_next(skb))
 
+#define skb_rbtree_walk_safe(skb, tmp, root)					\
+		for (skb = skb_rb_first(root);					\
+		     tmp = skb ? skb_rb_next(skb) : NULL, (skb != NULL);	\
+		     skb = tmp)
+
 #define skb_rbtree_walk_from(skb)						\
 		for (; skb != NULL;						\
 		     skb = skb_rb_next(skb))