diff options
author | Hannes Frederic Sowa <hannes@stressinduktion.org> | 2013-10-23 06:44:50 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-10-23 20:26:46 (GMT) |
commit | 34d92d5315b64a3e5292b7e9511c1bb617227fb6 (patch) | |
tree | 337c4b307bac5d7f126998712bd33b249049e938 /net/core/secure_seq.c | |
parent | 35b87f6c135b7ded8ab1a44e46d792f7688f3608 (diff) | |
download | linux-34d92d5315b64a3e5292b7e9511c1bb617227fb6.tar.xz |
net: always inline net_secret_init
Currently net_secret_init does not get inlined, so we always have a call
to net_secret_init even in the fast path.
Let's specify net_secret_init as __always_inline so we have the nop in
the fast-path without the call to net_secret_init and the unlikely path
at the epilogue of the function.
jump_labels handle the inlining correctly.
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/secure_seq.c')
-rw-r--r-- | net/core/secure_seq.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/secure_seq.c b/net/core/secure_seq.c index b02fd16..90e8a82 100644 --- a/net/core/secure_seq.c +++ b/net/core/secure_seq.c @@ -15,7 +15,7 @@ static u32 net_secret[NET_SECRET_SIZE] ____cacheline_aligned; -static void net_secret_init(void) +static __always_inline void net_secret_init(void) { net_get_random_once(net_secret, sizeof(net_secret)); } |