From f3acd33d840d3ea3e1233d234605c85cbbf26054 Mon Sep 17 00:00:00 2001 From: xiaolinkui <xiaolinkui@kylinos.cn> Date: Thu, 22 Aug 2019 14:58:16 +0800 Subject: net: use unlikely for dql_avail case This is an unlikely case, use unlikely() on it seems logical. Signed-off-by: xiaolinkui <xiaolinkui@kylinos.cn> Signed-off-by: David S. Miller <davem@davemloft.net> --- include/linux/netdevice.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 55ac223553f8..b5d28dadf964 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -3272,7 +3272,7 @@ static inline void netdev_tx_completed_queue(struct netdev_queue *dev_queue, */ smp_mb(); - if (dql_avail(&dev_queue->dql) < 0) + if (unlikely(dql_avail(&dev_queue->dql) < 0)) return; if (test_and_clear_bit(__QUEUE_STATE_STACK_XOFF, &dev_queue->state)) -- cgit v1.2.3-70-g09d2