summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/google/gve/gve_utils.h
diff options
context:
space:
mode:
authorShailend Chand <shailend@google.com>2024-01-22 19:26:28 +0100
committerJakub Kicinski <kuba@kernel.org>2024-01-24 02:41:31 +0100
commit1dfc2e46117e5c41037e27e859e75a7518881ee6 (patch)
tree6a01f7ad5b92c5a0f00403d88479ed801cea2c63 /drivers/net/ethernet/google/gve/gve_utils.h
parentgve: Define config structs for queue allocation (diff)
downloadlinux-1dfc2e46117e5c41037e27e859e75a7518881ee6.tar.xz
linux-1dfc2e46117e5c41037e27e859e75a7518881ee6.zip
gve: Refactor napi add and remove functions
This change makes the napi poll functions non-static and moves the gve_(add|remove)_napi functions to gve_utils.c, to make possible future "start queue" hooks in the datapath files. Signed-off-by: Shailend Chand <shailend@google.com> Reviewed-by: Willem de Bruijn <willemb@google.com> Reviewed-by: Jeroen de Borst <jeroendb@google.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://lore.kernel.org/r/20240122182632.1102721-3-shailend@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/google/gve/gve_utils.h')
-rw-r--r--drivers/net/ethernet/google/gve/gve_utils.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/google/gve/gve_utils.h b/drivers/net/ethernet/google/gve/gve_utils.h
index 324fd98a6112..924516e9eaae 100644
--- a/drivers/net/ethernet/google/gve/gve_utils.h
+++ b/drivers/net/ethernet/google/gve/gve_utils.h
@@ -23,5 +23,8 @@ struct sk_buff *gve_rx_copy(struct net_device *dev, struct napi_struct *napi,
/* Decrement pagecnt_bias. Set it back to INT_MAX if it reached zero. */
void gve_dec_pagecnt_bias(struct gve_rx_slot_page_info *page_info);
+void gve_add_napi(struct gve_priv *priv, int ntfy_idx,
+ int (*gve_poll)(struct napi_struct *, int));
+void gve_remove_napi(struct gve_priv *priv, int ntfy_idx);
#endif /* _GVE_UTILS_H */