netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] net: remove a dubious unlikely() clause
@ 2016-03-20 18:27 Eric Dumazet
  2016-03-20 20:32 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Dumazet @ 2016-03-20 18:27 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, Jesper Dangaard Brouer

From: Eric Dumazet <edumazet@google.com>

TCP protocol is still used these days, and TCP uses
clones in its transmit path. We can not optimize linux
stack assuming it is mostly used in routers, or that TCP
is dead.

Fixes: 795bb1c00d ("net: bulk free infrastructure for NAPI context, use napi_consume_skb")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Jesper Dangaard Brouer <brouer@redhat.com>
---
 net/core/skbuff.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index f044f97..d04c2d1 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -815,7 +815,7 @@ void napi_consume_skb(struct sk_buff *skb, int budget)
 	trace_consume_skb(skb);
 
 	/* if SKB is a clone, don't handle this case */
-	if (unlikely(skb->fclone != SKB_FCLONE_UNAVAILABLE)) {
+	if (skb->fclone != SKB_FCLONE_UNAVAILABLE) {
 		__kfree_skb(skb);
 		return;
 	}

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net] net: remove a dubious unlikely() clause
  2016-03-20 18:27 [PATCH net] net: remove a dubious unlikely() clause Eric Dumazet
@ 2016-03-20 20:32 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-03-20 20:32 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev, brouer

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Sun, 20 Mar 2016 11:27:47 -0700

> From: Eric Dumazet <edumazet@google.com>
> 
> TCP protocol is still used these days, and TCP uses
> clones in its transmit path. We can not optimize linux
> stack assuming it is mostly used in routers, or that TCP
> is dead.
> 
> Fixes: 795bb1c00d ("net: bulk free infrastructure for NAPI context, use napi_consume_skb")
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Cc: Jesper Dangaard Brouer <brouer@redhat.com>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-03-20 20:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-20 18:27 [PATCH net] net: remove a dubious unlikely() clause Eric Dumazet
2016-03-20 20:32 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).