diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-05-06 15:33:06 -0600 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-05-06 20:03:47 -0700 |
commit | 243f2148937adc72bcaaa590d482d599c936efde (patch) | |
tree | 6313edda1c8e183fe94a4a6832c4129568baa659 /LICENSES | |
parent | 4fed818ef54b08d4b29200e416cce65546ad5312 (diff) |
wireguard: send/receive: use explicit unlikely branch instead of implicit coalescing
It's very unlikely that send will become true. It's nearly always false
between 0 and 120 seconds of a session, and in most cases becomes true
only between 120 and 121 seconds before becoming false again. So,
unlikely(send) is clearly the right option here.
What happened before was that we had this complex boolean expression
with multiple likely and unlikely clauses nested. Since this is
evaluated left-to-right anyway, the whole thing got converted to
unlikely. So, we can clean this up to better represent what's going on.
The generated code is the same.
Suggested-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'LICENSES')
0 files changed, 0 insertions, 0 deletions