Lines Matching refs:nfp_app
22 struct nfp_app;
91 int (*init)(struct nfp_app *app);
92 void (*clean)(struct nfp_app *app);
94 const char *(*extra_cap)(struct nfp_app *app, struct nfp_net *nn);
96 int (*ndo_init)(struct nfp_app *app, struct net_device *netdev);
97 void (*ndo_uninit)(struct nfp_app *app, struct net_device *netdev);
99 int (*vnic_alloc)(struct nfp_app *app, struct nfp_net *nn,
101 void (*vnic_free)(struct nfp_app *app, struct nfp_net *nn);
102 int (*vnic_init)(struct nfp_app *app, struct nfp_net *nn);
103 void (*vnic_clean)(struct nfp_app *app, struct nfp_net *nn);
105 int (*repr_init)(struct nfp_app *app, struct net_device *netdev);
106 void (*repr_preclean)(struct nfp_app *app, struct net_device *netdev);
107 void (*repr_clean)(struct nfp_app *app, struct net_device *netdev);
109 int (*repr_open)(struct nfp_app *app, struct nfp_repr *repr);
110 int (*repr_stop)(struct nfp_app *app, struct nfp_repr *repr);
112 int (*check_mtu)(struct nfp_app *app, struct net_device *netdev,
114 int (*repr_change_mtu)(struct nfp_app *app, struct net_device *netdev,
117 u64 *(*port_get_stats)(struct nfp_app *app,
119 int (*port_get_stats_count)(struct nfp_app *app, struct nfp_port *port);
120 u8 *(*port_get_stats_strings)(struct nfp_app *app,
123 int (*start)(struct nfp_app *app);
124 void (*stop)(struct nfp_app *app);
126 int (*netdev_event)(struct nfp_app *app, struct net_device *netdev,
129 void (*ctrl_msg_rx)(struct nfp_app *app, struct sk_buff *skb);
130 void (*ctrl_msg_rx_raw)(struct nfp_app *app, const void *data,
133 int (*setup_tc)(struct nfp_app *app, struct net_device *netdev,
135 int (*bpf)(struct nfp_app *app, struct nfp_net *nn,
137 int (*xdp_offload)(struct nfp_app *app, struct nfp_net *nn,
141 int (*sriov_enable)(struct nfp_app *app, int num_vfs);
142 void (*sriov_disable)(struct nfp_app *app);
144 enum devlink_eswitch_mode (*eswitch_mode_get)(struct nfp_app *app);
145 int (*eswitch_mode_set)(struct nfp_app *app, u16 mode);
146 struct net_device *(*dev_get)(struct nfp_app *app, u32 id,
162 struct nfp_app { struct
182 static inline int nfp_app_init(struct nfp_app *app) in nfp_app_init() argument
189 static inline void nfp_app_clean(struct nfp_app *app) in nfp_app_clean()
198 static inline int nfp_app_vnic_alloc(struct nfp_app *app, struct nfp_net *nn, in nfp_app_vnic_alloc()
204 static inline void nfp_app_vnic_free(struct nfp_app *app, struct nfp_net *nn) in nfp_app_vnic_free()
210 static inline int nfp_app_vnic_init(struct nfp_app *app, struct nfp_net *nn) in nfp_app_vnic_init()
217 static inline void nfp_app_vnic_clean(struct nfp_app *app, struct nfp_net *nn) in nfp_app_vnic_clean()
223 static inline int nfp_app_repr_open(struct nfp_app *app, struct nfp_repr *repr) in nfp_app_repr_open()
230 static inline int nfp_app_repr_stop(struct nfp_app *app, struct nfp_repr *repr) in nfp_app_repr_stop()
238 nfp_app_repr_init(struct nfp_app *app, struct net_device *netdev) in nfp_app_repr_init()
246 nfp_app_repr_preclean(struct nfp_app *app, struct net_device *netdev) in nfp_app_repr_preclean()
253 nfp_app_repr_clean(struct nfp_app *app, struct net_device *netdev) in nfp_app_repr_clean()
260 nfp_app_check_mtu(struct nfp_app *app, struct net_device *netdev, int new_mtu) in nfp_app_check_mtu()
268 nfp_app_repr_change_mtu(struct nfp_app *app, struct net_device *netdev, in nfp_app_repr_change_mtu()
276 static inline const char *nfp_app_name(struct nfp_app *app) in nfp_app_name()
283 static inline bool nfp_app_needs_ctrl_vnic(struct nfp_app *app) in nfp_app_needs_ctrl_vnic()
288 static inline bool nfp_app_ctrl_has_meta(struct nfp_app *app) in nfp_app_ctrl_has_meta()
293 static inline bool nfp_app_ctrl_uses_data_vnics(struct nfp_app *app) in nfp_app_ctrl_uses_data_vnics()
298 static inline const char *nfp_app_extra_cap(struct nfp_app *app, in nfp_app_extra_cap()
306 static inline bool nfp_app_has_tc(struct nfp_app *app) in nfp_app_has_tc()
311 static inline int nfp_app_setup_tc(struct nfp_app *app, in nfp_app_setup_tc()
320 static inline int nfp_app_bpf(struct nfp_app *app, struct nfp_net *nn, in nfp_app_bpf()
328 static inline int nfp_app_xdp_offload(struct nfp_app *app, struct nfp_net *nn, in nfp_app_xdp_offload()
337 static inline bool __nfp_app_ctrl_tx(struct nfp_app *app, struct sk_buff *skb) in __nfp_app_ctrl_tx()
345 static inline bool nfp_app_ctrl_tx(struct nfp_app *app, struct sk_buff *skb) in nfp_app_ctrl_tx()
353 static inline void nfp_app_ctrl_rx(struct nfp_app *app, struct sk_buff *skb) in nfp_app_ctrl_rx()
362 nfp_app_ctrl_rx_raw(struct nfp_app *app, const void *data, unsigned int len) in nfp_app_ctrl_rx_raw()
371 static inline int nfp_app_eswitch_mode_get(struct nfp_app *app, u16 *mode) in nfp_app_eswitch_mode_get()
381 static inline int nfp_app_eswitch_mode_set(struct nfp_app *app, u16 mode) in nfp_app_eswitch_mode_set()
388 static inline int nfp_app_sriov_enable(struct nfp_app *app, int num_vfs) in nfp_app_sriov_enable()
395 static inline void nfp_app_sriov_disable(struct nfp_app *app) in nfp_app_sriov_disable()
402 struct net_device *nfp_app_dev_get(struct nfp_app *app, u32 id, in nfp_app_dev_get()
411 struct nfp_app *nfp_app_from_netdev(struct net_device *netdev);
418 nfp_reprs_get_locked(struct nfp_app *app, enum nfp_repr_type type);
420 nfp_app_reprs_set(struct nfp_app *app, enum nfp_repr_type type,
423 const char *nfp_app_mip_name(struct nfp_app *app);
425 nfp_app_ctrl_msg_alloc(struct nfp_app *app, unsigned int size, gfp_t priority);
427 struct nfp_app *nfp_app_alloc(struct nfp_pf *pf, enum nfp_app_id id);
428 void nfp_app_free(struct nfp_app *app);
429 int nfp_app_start(struct nfp_app *app, struct nfp_net *ctrl);
430 void nfp_app_stop(struct nfp_app *app);
434 int nfp_app_nic_vnic_alloc(struct nfp_app *app, struct nfp_net *nn,
436 int nfp_app_nic_vnic_init_phy_port(struct nfp_pf *pf, struct nfp_app *app,