aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/net/ethernet/netronome/nfp/nfp_net.h
diff options
context:
space:
mode:
authorJakub Kicinski <jakub.kicinski@netronome.com>2022-03-21 11:42:02 +0100
committerDavid S. Miller <davem@davemloft.net>2022-03-21 13:21:16 +0000
commit6fd86efa630effbfbc7bd276609d11cb5e18d487 (patch)
tree89f479b2d90b9f59da6861fd68bfec31960b42dc /drivers/net/ethernet/netronome/nfp/nfp_net.h
parentnfp: move the fast path code to separate files (diff)
downloadwireguard-linux-6fd86efa630effbfbc7bd276609d11cb5e18d487.tar.xz
wireguard-linux-6fd86efa630effbfbc7bd276609d11cb5e18d487.zip
nfp: use callbacks for slow path ring related functions
To reduce the coupling of slow path ring implementations and their callers, use callbacks instead. Changes to Jakub's work: * Also use callbacks for xmit functions Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: Yinjun Zhang <yinjun.zhang@corigine.com> Signed-off-by: Simon Horman <simon.horman@corigine.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/netronome/nfp/nfp_net.h')
-rw-r--r--drivers/net/ethernet/netronome/nfp/nfp_net.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net.h b/drivers/net/ethernet/netronome/nfp/nfp_net.h
index bffe53f4c2d3..13a9e6731d0d 100644
--- a/drivers/net/ethernet/netronome/nfp/nfp_net.h
+++ b/drivers/net/ethernet/netronome/nfp/nfp_net.h
@@ -98,6 +98,7 @@
/* Forward declarations */
struct nfp_cpp;
struct nfp_dev_info;
+struct nfp_dp_ops;
struct nfp_eth_table_port;
struct nfp_net;
struct nfp_net_r_vector;
@@ -439,6 +440,7 @@ struct nfp_stat_pair {
* @rx_rings: Array of pre-allocated RX ring structures
* @ctrl_bar: Pointer to mapped control BAR
*
+ * @ops: Callbacks and parameters for this vNIC's NFD version
* @txd_cnt: Size of the TX ring in number of descriptors
* @rxd_cnt: Size of the RX ring in number of descriptors
* @num_r_vecs: Number of used ring vectors
@@ -473,6 +475,8 @@ struct nfp_net_dp {
/* Cold data follows */
+ const struct nfp_dp_ops *ops;
+
unsigned int txd_cnt;
unsigned int rxd_cnt;