diff options
author | Martin Karsten <mkarsten@uwaterloo.ca> | 2024-11-09 05:02:32 +0000 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-11-11 18:45:06 -0800 |
commit | 3fcbecbdeb048dfd1bea824f4276717fed02d10e (patch) | |
tree | 245b673f4943209241dcdfe44603cd0aadf96596 /include/net | |
parent | 5dc51ec86df6e2214d8398079c1e31736593ab53 (diff) | |
download | lwn-3fcbecbdeb048dfd1bea824f4276717fed02d10e.tar.gz lwn-3fcbecbdeb048dfd1bea824f4276717fed02d10e.zip |
net: Add control functions for irq suspension
The napi_suspend_irqs routine bootstraps irq suspension by elongating
the defer timeout to irq_suspend_timeout.
The napi_resume_irqs routine effectively cancels irq suspension by
forcing the napi to be scheduled immediately.
Signed-off-by: Martin Karsten <mkarsten@uwaterloo.ca>
Co-developed-by: Joe Damato <jdamato@fastly.com>
Signed-off-by: Joe Damato <jdamato@fastly.com>
Tested-by: Joe Damato <jdamato@fastly.com>
Tested-by: Martin Karsten <mkarsten@uwaterloo.ca>
Acked-by: Stanislav Fomichev <sdf@fomichev.me>
Reviewed-by: Sridhar Samudrala <sridhar.samudrala@intel.com>
Link: https://patch.msgid.link/20241109050245.191288-3-jdamato@fastly.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/busy_poll.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/busy_poll.h b/include/net/busy_poll.h index f03040baaefd..c858270141bc 100644 --- a/include/net/busy_poll.h +++ b/include/net/busy_poll.h @@ -52,6 +52,9 @@ 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); +void napi_suspend_irqs(unsigned int napi_id); +void napi_resume_irqs(unsigned int napi_id); + #else /* CONFIG_NET_RX_BUSY_POLL */ static inline unsigned long net_busy_loop_on(void) { |