#include <linux/bpf_trace.h>
#include <net/xdp_sock_drv.h>
#include "en/xdp.h"
#include "en/params.h"
#include <linux/bitfield.h>
#include <net/page_pool/helpers.h>
int mlx5e_xdp_max_mtu(struct mlx5e_params *params, struct mlx5e_xsk_param *xsk)
{ … }
static inline bool
mlx5e_xmit_xdp_buff(struct mlx5e_xdpsq *sq, struct mlx5e_rq *rq,
struct xdp_buff *xdp)
{ … }
static int mlx5e_xdp_rx_timestamp(const struct xdp_md *ctx, u64 *timestamp)
{ … }
#define RSS_TYPE_MAX_TABLE …
#define RSS_L4 …
#define RSS_L3 …
enum mlx5_rss_hash_type { … };
static const enum xdp_rss_hash_type mlx5_xdp_rss_type[RSS_TYPE_MAX_TABLE] = …;
static int mlx5e_xdp_rx_hash(const struct xdp_md *ctx, u32 *hash,
enum xdp_rss_hash_type *rss_type)
{ … }
static int mlx5e_xdp_rx_vlan_tag(const struct xdp_md *ctx, __be16 *vlan_proto,
u16 *vlan_tci)
{ … }
const struct xdp_metadata_ops mlx5e_xdp_metadata_ops = …;
struct mlx5e_xsk_tx_complete { … };
static u64 mlx5e_xsk_fill_timestamp(void *_priv)
{ … }
static void mlx5e_xsk_request_checksum(u16 csum_start, u16 csum_offset, void *priv)
{ … }
const struct xsk_tx_metadata_ops mlx5e_xsk_tx_metadata_ops = …;
bool mlx5e_xdp_handle(struct mlx5e_rq *rq,
struct bpf_prog *prog, struct mlx5e_xdp_buff *mxbuf)
{ … }
static u16 mlx5e_xdpsq_get_next_pi(struct mlx5e_xdpsq *sq, u16 size)
{ … }
static void mlx5e_xdp_mpwqe_session_start(struct mlx5e_xdpsq *sq)
{ … }
void mlx5e_xdp_mpwqe_complete(struct mlx5e_xdpsq *sq)
{ … }
enum { … };
INDIRECT_CALLABLE_SCOPE int mlx5e_xmit_xdp_frame_check_mpwqe(struct mlx5e_xdpsq *sq)
{ … }
INDIRECT_CALLABLE_SCOPE bool
mlx5e_xmit_xdp_frame(struct mlx5e_xdpsq *sq, struct mlx5e_xmit_data *xdptxd,
int check_result, struct xsk_tx_metadata *meta);
INDIRECT_CALLABLE_SCOPE bool
mlx5e_xmit_xdp_frame_mpwqe(struct mlx5e_xdpsq *sq, struct mlx5e_xmit_data *xdptxd,
int check_result, struct xsk_tx_metadata *meta)
{ … }
static int mlx5e_xmit_xdp_frame_check_stop_room(struct mlx5e_xdpsq *sq, int stop_room)
{ … }
INDIRECT_CALLABLE_SCOPE int mlx5e_xmit_xdp_frame_check(struct mlx5e_xdpsq *sq)
{ … }
INDIRECT_CALLABLE_SCOPE bool
mlx5e_xmit_xdp_frame(struct mlx5e_xdpsq *sq, struct mlx5e_xmit_data *xdptxd,
int check_result, struct xsk_tx_metadata *meta)
{ … }
static void mlx5e_free_xdpsq_desc(struct mlx5e_xdpsq *sq,
struct mlx5e_xdp_wqe_info *wi,
u32 *xsk_frames,
struct xdp_frame_bulk *bq,
struct mlx5e_cq *cq,
struct mlx5_cqe64 *cqe)
{ … }
bool mlx5e_poll_xdpsq_cq(struct mlx5e_cq *cq)
{ … }
void mlx5e_free_xdpsq_descs(struct mlx5e_xdpsq *sq)
{ … }
int mlx5e_xdp_xmit(struct net_device *dev, int n, struct xdp_frame **frames,
u32 flags)
{ … }
void mlx5e_xdp_rx_poll_complete(struct mlx5e_rq *rq)
{ … }
void mlx5e_set_xmit_fp(struct mlx5e_xdpsq *sq, bool is_mpw)
{ … }