瀏覽代碼

net: remove a dubious unlikely() clause

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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet 9 年之前
父節點
當前提交
abbdb5a74c
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      net/core/skbuff.c

+ 1 - 1
net/core/skbuff.c

@@ -815,7 +815,7 @@ void napi_consume_skb(struct sk_buff *skb, int budget)
 	trace_consume_skb(skb);
 	trace_consume_skb(skb);
 
 
 	/* if SKB is a clone, don't handle this case */
 	/* 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);
 		__kfree_skb(skb);
 		return;
 		return;
 	}
 	}