diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-09-19 16:20:45 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-09-19 16:20:45 +0200 |
commit | 7758071e94d08f613bb3072e2e94c54e8010c5e3 (patch) | |
tree | 1bade2a9fb7942080462a284410459626b293358 /src | |
parent | queueing: clean up worthless helper (diff) | |
download | wireguard-monolithic-historical-7758071e94d08f613bb3072e2e94c54e8010c5e3.tar.xz wireguard-monolithic-historical-7758071e94d08f613bb3072e2e94c54e8010c5e3.zip |
queueing: rename cpumask function
Diffstat (limited to 'src')
-rw-r--r-- | src/queueing.h | 2 | ||||
-rw-r--r-- | src/receive.c | 2 | ||||
-rw-r--r-- | src/send.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/queueing.h b/src/queueing.h index 385ca16..a07e965 100644 --- a/src/queueing.h +++ b/src/queueing.h @@ -100,7 +100,7 @@ static inline void skb_reset(struct sk_buff *skb) skb_reset_inner_headers(skb); } -static inline int choose_cpu(int *stored_cpu, unsigned int id) +static inline int cpumask_choose_online(int *stored_cpu, unsigned int id) { unsigned int cpu = *stored_cpu, cpu_index, i; if (unlikely(cpu == nr_cpumask_bits || !cpumask_test_cpu(cpu, cpu_online_mask))) { diff --git a/src/receive.c b/src/receive.c index 0f4545b..ee84b49 100644 --- a/src/receive.c +++ b/src/receive.c @@ -370,7 +370,7 @@ void packet_decrypt_worker(struct work_struct *work) * we take a reference here first. */ peer = peer_rcu_get(ctx->peer); atomic_set(&ctx->is_finished, true); - queue_work_on(choose_cpu(&peer->serial_work_cpu, peer->internal_id), peer->device->packet_crypt_wq, &peer->rx_queue.work); + queue_work_on(cpumask_choose_online(&peer->serial_work_cpu, peer->internal_id), peer->device->packet_crypt_wq, &peer->rx_queue.work); peer_put(peer); } } @@ -218,7 +218,7 @@ void packet_encrypt_worker(struct work_struct *work) * we grab an additional reference to peer. */ peer = peer_rcu_get(ctx->peer); atomic_set(&ctx->is_finished, true); - queue_work_on(choose_cpu(&peer->serial_work_cpu, peer->internal_id), peer->device->packet_crypt_wq, &peer->tx_queue.work); + queue_work_on(cpumask_choose_online(&peer->serial_work_cpu, peer->internal_id), peer->device->packet_crypt_wq, &peer->tx_queue.work); peer_put(peer); } chacha20poly1305_deinit_simd(have_simd); |