In certain rare cases, it can be nice to be able to check if napi is enabled or not. Create an is_napi_enabled() call.
Signed-off-by: Linas Vepstas <[EMAIL PROTECTED]> ------- Actually, I'm confused about whether I'd mailed this previously. It might be a duplicate submission. include/linux/netdevice.h | 11 +++++++++++ 1 file changed, 11 insertions(+) Index: linux-2.6.23-rc8-mm1/include/linux/netdevice.h =================================================================== --- linux-2.6.23-rc8-mm1.orig/include/linux/netdevice.h 2007-11-09 17:36:51.000000000 -0600 +++ linux-2.6.23-rc8-mm1/include/linux/netdevice.h 2007-11-09 17:40:19.000000000 -0600 @@ -384,6 +384,17 @@ static inline void napi_enable(struct na clear_bit(NAPI_STATE_SCHED, &n->state); } +/** + * is_napi_enabled - return non-zero if napi enabled + * @n: napi context + * + * Return true if napi is enabled. + */ +static inline bool is_napi_enabled(struct napi_struct *n) +{ + return !test_bit(NAPI_STATE_SCHED, &n->state); +} + /* * The DEVICE structure. * Actually, this whole structure is a big mistake. It mixes I/O - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html