diff options
author | xiaolinkui <xiaolinkui@kylinos.cn> | 2019-08-22 14:58:16 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-08-24 14:23:35 -0700 |
commit | f3acd33d840d3ea3e1233d234605c85cbbf26054 (patch) | |
tree | 3d8cef5b1da5ab291de9c4aa73c240dc1ed55f28 /include | |
parent | d4ed7463d02aef4b2270ec2a680813cd8b17def7 (diff) |
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/netdevice.h | 2 |
1 files changed, 1 insertions, 1 deletions
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)) |