OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d4ed746
)
net: use unlikely for dql_avail case
author
xiaolinkui
<xiaolinkui@kylinos.cn>
Thu, 22 Aug 2019 06:58:16 +0000
(14:58 +0800)
committer
David S. Miller
<davem@davemloft.net>
Sat, 24 Aug 2019 21:23:35 +0000
(14:23 -0700)
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
patch
|
blob
|
history
diff --git
a/include/linux/netdevice.h
b/include/linux/netdevice.h
index
55ac223
..
b5d28da
100644
(file)
--- 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))