Lines Matching refs:nfp_app
21 struct nfp_app;
90 int (*init)(struct nfp_app *app);
91 void (*clean)(struct nfp_app *app);
93 const char *(*extra_cap)(struct nfp_app *app, struct nfp_net *nn);
95 int (*ndo_init)(struct nfp_app *app, struct net_device *netdev);
96 void (*ndo_uninit)(struct nfp_app *app, struct net_device *netdev);
98 int (*vnic_alloc)(struct nfp_app *app, struct nfp_net *nn,
100 void (*vnic_free)(struct nfp_app *app, struct nfp_net *nn);
101 int (*vnic_init)(struct nfp_app *app, struct nfp_net *nn);
102 void (*vnic_clean)(struct nfp_app *app, struct nfp_net *nn);
104 int (*repr_init)(struct nfp_app *app, struct net_device *netdev);
105 void (*repr_preclean)(struct nfp_app *app, struct net_device *netdev);
106 void (*repr_clean)(struct nfp_app *app, struct net_device *netdev);
108 int (*repr_open)(struct nfp_app *app, struct nfp_repr *repr);
109 int (*repr_stop)(struct nfp_app *app, struct nfp_repr *repr);
111 int (*check_mtu)(struct nfp_app *app, struct net_device *netdev,
113 int (*repr_change_mtu)(struct nfp_app *app, struct net_device *netdev,
116 u64 *(*port_get_stats)(struct nfp_app *app,
118 int (*port_get_stats_count)(struct nfp_app *app, struct nfp_port *port);
119 u8 *(*port_get_stats_strings)(struct nfp_app *app,
122 int (*start)(struct nfp_app *app);
123 void (*stop)(struct nfp_app *app);
125 int (*netdev_event)(struct nfp_app *app, struct net_device *netdev,
128 void (*ctrl_msg_rx)(struct nfp_app *app, struct sk_buff *skb);
129 void (*ctrl_msg_rx_raw)(struct nfp_app *app, const void *data,
132 int (*setup_tc)(struct nfp_app *app, struct net_device *netdev,
134 int (*bpf)(struct nfp_app *app, struct nfp_net *nn,
136 int (*xdp_offload)(struct nfp_app *app, struct nfp_net *nn,
140 int (*sriov_enable)(struct nfp_app *app, int num_vfs);
141 void (*sriov_disable)(struct nfp_app *app);
143 enum devlink_eswitch_mode (*eswitch_mode_get)(struct nfp_app *app);
144 int (*eswitch_mode_set)(struct nfp_app *app, u16 mode);
145 struct net_device *(*dev_get)(struct nfp_app *app, u32 id,
161 struct nfp_app { struct
177 static inline void assert_nfp_app_locked(struct nfp_app *app) in assert_nfp_app_locked() argument
182 static inline bool nfp_app_is_locked(struct nfp_app *app) in nfp_app_is_locked()
191 static inline int nfp_app_init(struct nfp_app *app) in nfp_app_init()
198 static inline void nfp_app_clean(struct nfp_app *app) in nfp_app_clean()
207 static inline int nfp_app_vnic_alloc(struct nfp_app *app, struct nfp_net *nn, in nfp_app_vnic_alloc()
213 static inline void nfp_app_vnic_free(struct nfp_app *app, struct nfp_net *nn) in nfp_app_vnic_free()
219 static inline int nfp_app_vnic_init(struct nfp_app *app, struct nfp_net *nn) in nfp_app_vnic_init()
226 static inline void nfp_app_vnic_clean(struct nfp_app *app, struct nfp_net *nn) in nfp_app_vnic_clean()
232 static inline int nfp_app_repr_open(struct nfp_app *app, struct nfp_repr *repr) in nfp_app_repr_open()
239 static inline int nfp_app_repr_stop(struct nfp_app *app, struct nfp_repr *repr) in nfp_app_repr_stop()
247 nfp_app_repr_init(struct nfp_app *app, struct net_device *netdev) in nfp_app_repr_init()
255 nfp_app_repr_preclean(struct nfp_app *app, struct net_device *netdev) in nfp_app_repr_preclean()
262 nfp_app_repr_clean(struct nfp_app *app, struct net_device *netdev) in nfp_app_repr_clean()
269 nfp_app_check_mtu(struct nfp_app *app, struct net_device *netdev, int new_mtu) in nfp_app_check_mtu()
277 nfp_app_repr_change_mtu(struct nfp_app *app, struct net_device *netdev, in nfp_app_repr_change_mtu()
285 static inline const char *nfp_app_name(struct nfp_app *app) in nfp_app_name()
292 static inline bool nfp_app_needs_ctrl_vnic(struct nfp_app *app) in nfp_app_needs_ctrl_vnic()
297 static inline bool nfp_app_ctrl_has_meta(struct nfp_app *app) in nfp_app_ctrl_has_meta()
302 static inline bool nfp_app_ctrl_uses_data_vnics(struct nfp_app *app) in nfp_app_ctrl_uses_data_vnics()
307 static inline const char *nfp_app_extra_cap(struct nfp_app *app, in nfp_app_extra_cap()
315 static inline bool nfp_app_has_tc(struct nfp_app *app) in nfp_app_has_tc()
320 static inline int nfp_app_setup_tc(struct nfp_app *app, in nfp_app_setup_tc()
329 static inline int nfp_app_bpf(struct nfp_app *app, struct nfp_net *nn, in nfp_app_bpf()
337 static inline int nfp_app_xdp_offload(struct nfp_app *app, struct nfp_net *nn, in nfp_app_xdp_offload()
346 static inline bool __nfp_app_ctrl_tx(struct nfp_app *app, struct sk_buff *skb) in __nfp_app_ctrl_tx()
354 static inline bool nfp_app_ctrl_tx(struct nfp_app *app, struct sk_buff *skb) in nfp_app_ctrl_tx()
362 static inline void nfp_app_ctrl_rx(struct nfp_app *app, struct sk_buff *skb) in nfp_app_ctrl_rx()
371 nfp_app_ctrl_rx_raw(struct nfp_app *app, const void *data, unsigned int len) in nfp_app_ctrl_rx_raw()
380 static inline int nfp_app_eswitch_mode_get(struct nfp_app *app, u16 *mode) in nfp_app_eswitch_mode_get()
390 static inline int nfp_app_eswitch_mode_set(struct nfp_app *app, u16 mode) in nfp_app_eswitch_mode_set()
397 static inline int nfp_app_sriov_enable(struct nfp_app *app, int num_vfs) in nfp_app_sriov_enable()
404 static inline void nfp_app_sriov_disable(struct nfp_app *app) in nfp_app_sriov_disable()
411 struct net_device *nfp_app_dev_get(struct nfp_app *app, u32 id, in nfp_app_dev_get()
420 struct nfp_app *nfp_app_from_netdev(struct net_device *netdev);
427 nfp_reprs_get_locked(struct nfp_app *app, enum nfp_repr_type type);
429 nfp_app_reprs_set(struct nfp_app *app, enum nfp_repr_type type,
432 const char *nfp_app_mip_name(struct nfp_app *app);
434 nfp_app_ctrl_msg_alloc(struct nfp_app *app, unsigned int size, gfp_t priority);
436 struct nfp_app *nfp_app_alloc(struct nfp_pf *pf, enum nfp_app_id id);
437 void nfp_app_free(struct nfp_app *app);
438 int nfp_app_start(struct nfp_app *app, struct nfp_net *ctrl);
439 void nfp_app_stop(struct nfp_app *app);
443 int nfp_app_nic_vnic_alloc(struct nfp_app *app, struct nfp_net *nn,
445 int nfp_app_nic_vnic_init_phy_port(struct nfp_pf *pf, struct nfp_app *app,