diff options
author | Stefan Roesch <shr@devkernel.io> | 2024-02-06 17:30:04 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-02-09 19:01:09 +0100 |
commit | b4e8ae5c8c41355791a99fdf2fcac16deace1e79 (patch) | |
tree | 55ed513ebda7694ab10ee3cf3475e944b725fb52 /include/net/busy_poll.h | |
parent | net: split off __napi_busy_poll from napi_busy_poll (diff) | |
download | linux-b4e8ae5c8c41355791a99fdf2fcac16deace1e79.tar.xz linux-b4e8ae5c8c41355791a99fdf2fcac16deace1e79.zip |
net: add napi_busy_loop_rcu()
This adds the napi_busy_loop_rcu() function. This function assumes that
the calling function is already holding the rcu read lock and
napi_busy_loop() does not need to take the rcu read lock. Add a
NAPI_F_NO_SCHED flag, which tells __napi_busy_loop() to abort if we
need to reschedule rather than drop the RCU read lock and reschedule.
Signed-off-by: Stefan Roesch <shr@devkernel.io>
Link: https://lore.kernel.org/r/20230608163839.2891748-3-shr@devkernel.io
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/net/busy_poll.h')
-rw-r--r-- | include/net/busy_poll.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/net/busy_poll.h b/include/net/busy_poll.h index 4dabeb6c76d3..9b09acac538e 100644 --- a/include/net/busy_poll.h +++ b/include/net/busy_poll.h @@ -48,6 +48,10 @@ void napi_busy_loop(unsigned int napi_id, bool (*loop_end)(void *, unsigned long), void *loop_end_arg, bool prefer_busy_poll, u16 budget); +void napi_busy_loop_rcu(unsigned int napi_id, + bool (*loop_end)(void *, unsigned long), + void *loop_end_arg, bool prefer_busy_poll, u16 budget); + #else /* CONFIG_NET_RX_BUSY_POLL */ static inline unsigned long net_busy_loop_on(void) { |