Skip to contentSkip to conversation

net/core: fix comment in skb_try_coalesce

PATCH Applied [email protected] 3 participants 3 messages Sep 19, 2012

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

PATCH 1/1 net/core: fix comment in skb_try_coalesce

From: Li RongQing <[email protected]>

It should be the skb which is not cloned

---
 net/core/skbuff.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
net/core/skbuff.c +3 -1
index fe00d12..354a4e4 100644
@@ -3502,7 +3502,9 @@ bool skb_try_coalesce(struct sk_buff *to, struct sk_buff *from,
 	if (!skb_cloned(from))
 		skb_shinfo(from)->nr_frags = 0;
 
-	/* if the skb is cloned this does nothing since we set nr_frags to 0 */
+	/* if the skb is not cloned this does nothing
+	 * since we set nr_frags to 0.
+	 */
 	for (i = 0; i < skb_shinfo(from)->nr_frags; i++)
 		skb_frag_ref(from, i);
 
Signature · 1 line
1.7.4.1
Acked-by on v1 1/1
#1 lore raw
Quoted 14 lines · On Wed, 2012-09-19 at 10:53 +0800, [email protected] wrote:

From: Li RongQing <[email protected]>

It should be the skb which is not cloned

---
 net/core/skbuff.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
net/core/skbuff.c +0 -0
index fe00d12..354a4e4 100644

net/core/skbuff.c bool skb_try_coalesce(struct sk_buff *to, struct sk_buff *from, · line 3510

Quoted 10 lines
net/core/skbuff.c +3 -1
@@ -3502,7 +3502,9 @@ bool skb_try_coalesce(struct sk_buff *to, struct sk_buff *from,
 	if (!skb_cloned(from))
 		skb_shinfo(from)->nr_frags = 0;
 
-	/* if the skb is cloned this does nothing since we set nr_frags to 0 */
+	/* if the skb is not cloned this does nothing
+	 * since we set nr_frags to 0.
+	 */
 	for (i = 0; i < skb_shinfo(from)->nr_frags; i++)
 		skb_frag_ref(from, i);
 

Yes I saw that yesterday and was about to submit the same change (more or less)