#ifndef ENA_XDP_H
#define ENA_XDP_H
#include "ena_netdev.h"
#include <linux/bpf_trace.h>
#define ENA_XDP_MAX_MTU …
#define ENA_IS_XDP_INDEX(adapter, index) …
enum ENA_XDP_ACTIONS { … };
#define ENA_XDP_FORWARDED …
int ena_setup_and_create_all_xdp_queues(struct ena_adapter *adapter);
void ena_xdp_exchange_program_rx_in_range(struct ena_adapter *adapter,
struct bpf_prog *prog,
int first, int count);
int ena_xdp_io_poll(struct napi_struct *napi, int budget);
int ena_xdp_xmit_frame(struct ena_ring *tx_ring,
struct ena_adapter *adapter,
struct xdp_frame *xdpf,
int flags);
int ena_xdp_xmit(struct net_device *dev, int n,
struct xdp_frame **frames, u32 flags);
int ena_xdp(struct net_device *netdev, struct netdev_bpf *bpf);
int ena_xdp_register_rxq_info(struct ena_ring *rx_ring);
void ena_xdp_unregister_rxq_info(struct ena_ring *rx_ring);
enum ena_xdp_errors_t { … };
static inline bool ena_xdp_present(struct ena_adapter *adapter)
{ … }
static inline bool ena_xdp_present_ring(struct ena_ring *ring)
{ … }
static inline bool ena_xdp_legal_queue_count(struct ena_adapter *adapter,
u32 queues)
{ … }
static inline enum ena_xdp_errors_t ena_xdp_allowed(struct ena_adapter *adapter)
{ … }
static inline int ena_xdp_execute(struct ena_ring *rx_ring, struct xdp_buff *xdp)
{ … }
#endif