Message ID | 20220301075839.4156-6-xiam0nd.tong@gmail.com (mailing list archive) |
---|---|
State | Not Applicable |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | list_for_each_entry*: make iterator invisiable outside the loop | expand |
I'm sorry for have created the confusion. I made this patch to remove the use of iterator (in this patch is "skp", "p") outside the list_for_each_entry* loop, using the new *_inside macros instead which are introduced in PATCH 2/6, and to prove the effectiveness of the new macros. Best regards, -- Xiaomeng Tong
diff --git a/net/core/gro.c b/net/core/gro.c index a11b286d1..4d4f1f2fb 100644 --- a/net/core/gro.c +++ b/net/core/gro.c @@ -286,9 +286,8 @@ static void __napi_gro_flush_chain(struct napi_struct *napi, u32 index, bool flush_old) { struct list_head *head = &napi->gro_hash[index].list; - struct sk_buff *skb, *p; - list_for_each_entry_safe_reverse(skb, p, head, list) { + list_for_each_entry_safe_reverse_inside(skb, p, struct sk_buff, head, list) { if (flush_old && NAPI_GRO_CB(skb)->age == jiffies) return; skb_list_del_init(skb);
Demonstrations for: - list_for_each_entry_safe_reverse_inside Signed-off-by: Xiaomeng Tong <xiam0nd.tong@gmail.com> --- net/core/gro.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)