#ifndef __MLX5_EN_XDP_H__
#define __MLX5_EN_XDP_H__
#include <linux/indirect_call_wrapper.h>
#include <net/xdp_sock.h>
#include "en.h"
#include "en/txrx.h"
#define MLX5E_XDP_MIN_INLINE …
#define MLX5E_XDP_INLINE_WQE_MAX_DS_CNT …
#define MLX5E_XDP_INLINE_WQE_SZ_THRSD …
struct mlx5e_xdp_buff { … };
enum mlx5e_xdp_xmit_mode { … };
#define MLX5E_XDP_FIFO_ENTRIES2DS_MAX_RATIO …
mlx5e_xdp_info;
struct mlx5e_xsk_param;
int mlx5e_xdp_max_mtu(struct mlx5e_params *params, struct mlx5e_xsk_param *xsk);
bool mlx5e_xdp_handle(struct mlx5e_rq *rq,
struct bpf_prog *prog, struct mlx5e_xdp_buff *mlctx);
void mlx5e_xdp_mpwqe_complete(struct mlx5e_xdpsq *sq);
bool mlx5e_poll_xdpsq_cq(struct mlx5e_cq *cq);
void mlx5e_free_xdpsq_descs(struct mlx5e_xdpsq *sq);
void mlx5e_set_xmit_fp(struct mlx5e_xdpsq *sq, bool is_mpw);
void mlx5e_xdp_rx_poll_complete(struct mlx5e_rq *rq);
int mlx5e_xdp_xmit(struct net_device *dev, int n, struct xdp_frame **frames,
u32 flags);
extern const struct xdp_metadata_ops mlx5e_xdp_metadata_ops;
extern const struct xsk_tx_metadata_ops mlx5e_xsk_tx_metadata_ops;
INDIRECT_CALLABLE_DECLARE(…);
INDIRECT_CALLABLE_DECLARE(…);
INDIRECT_CALLABLE_DECLARE(…);
INDIRECT_CALLABLE_DECLARE(…);
static inline void mlx5e_xdp_tx_enable(struct mlx5e_priv *priv)
{ … }
static inline void mlx5e_xdp_tx_disable(struct mlx5e_priv *priv)
{ … }
static inline bool mlx5e_xdp_tx_is_enabled(struct mlx5e_priv *priv)
{ … }
static inline bool mlx5e_xdp_is_active(struct mlx5e_priv *priv)
{ … }
static inline void mlx5e_xmit_xdp_doorbell(struct mlx5e_xdpsq *sq)
{ … }
static inline bool mlx5e_xdp_get_inline_state(struct mlx5e_xdpsq *sq, bool cur)
{ … }
static inline bool mlx5e_xdp_mpwqe_is_full(struct mlx5e_tx_mpwqe *session, u8 max_sq_mpw_wqebbs)
{ … }
struct mlx5e_xdp_wqe_info { … };
static inline void
mlx5e_xdp_mpwqe_add_dseg(struct mlx5e_xdpsq *sq,
struct mlx5e_xmit_data *xdptxd,
struct mlx5e_xdpsq_stats *stats)
{ … }
static inline void
mlx5e_xdpi_fifo_push(struct mlx5e_xdp_info_fifo *fifo,
union mlx5e_xdp_info xi)
{ … }
static inline union mlx5e_xdp_info
mlx5e_xdpi_fifo_pop(struct mlx5e_xdp_info_fifo *fifo)
{ … }
#endif