#ifndef AQ_RING_H
#define AQ_RING_H
#include "aq_common.h"
#include "aq_vec.h"
#define AQ_XDP_HEADROOM …
#define AQ_XDP_TAILROOM …
struct page;
struct aq_nic_cfg_s;
struct aq_rxpage { … };
struct __packed aq_ring_buff_s { … };
struct aq_ring_stats_rx_s { … };
struct aq_ring_stats_tx_s { … };
aq_ring_stats_s;
enum atl_ring_type { … };
struct aq_ring_s { … };
struct aq_ring_param_s { … };
static inline void *aq_buf_vaddr(struct aq_rxpage *rxpage)
{ … }
static inline dma_addr_t aq_buf_daddr(struct aq_rxpage *rxpage)
{ … }
static inline unsigned int aq_ring_next_dx(struct aq_ring_s *self,
unsigned int dx)
{ … }
static inline unsigned int aq_ring_avail_dx(struct aq_ring_s *self)
{ … }
int aq_ring_tx_alloc(struct aq_ring_s *self,
struct aq_nic_s *aq_nic,
unsigned int idx,
struct aq_nic_cfg_s *aq_nic_cfg);
int aq_ring_rx_alloc(struct aq_ring_s *self,
struct aq_nic_s *aq_nic,
unsigned int idx,
struct aq_nic_cfg_s *aq_nic_cfg);
int aq_ring_init(struct aq_ring_s *self, const enum atl_ring_type ring_type);
void aq_ring_rx_deinit(struct aq_ring_s *self);
void aq_ring_free(struct aq_ring_s *self);
void aq_ring_update_queue_state(struct aq_ring_s *ring);
void aq_ring_queue_wake(struct aq_ring_s *ring);
void aq_ring_queue_stop(struct aq_ring_s *ring);
bool aq_ring_tx_clean(struct aq_ring_s *self);
int aq_xdp_xmit(struct net_device *dev, int num_frames,
struct xdp_frame **frames, u32 flags);
int aq_ring_rx_clean(struct aq_ring_s *self,
struct napi_struct *napi,
int *work_done,
int budget);
int aq_ring_rx_fill(struct aq_ring_s *self);
int aq_ring_hwts_rx_alloc(struct aq_ring_s *self,
struct aq_nic_s *aq_nic, unsigned int idx,
unsigned int size, unsigned int dx_size);
void aq_ring_hwts_rx_free(struct aq_ring_s *self);
void aq_ring_hwts_rx_clean(struct aq_ring_s *self, struct aq_nic_s *aq_nic);
unsigned int aq_ring_fill_stats_data(struct aq_ring_s *self, u64 *data);
#endif