#include <linux/socket.h>
#include <linux/in.h>
#include <linux/slab.h>
#include <linux/ip.h>
#include <linux/ipv6.h>
#include <linux/tcp.h>
#include <linux/udp.h>
#include <linux/prefetch.h>
#include <linux/moduleparam.h>
#include <linux/iommu.h>
#include <net/ip.h>
#include <net/checksum.h>
#include "net_driver.h"
#include "efx.h"
#include "filter.h"
#include "nic.h"
#include "selftest.h"
#include "workarounds.h"
#define EF4_RX_PREFERRED_BATCH …
#define EF4_RECYCLE_RING_SIZE_IOMMU …
#define EF4_RECYCLE_RING_SIZE_NOIOMMU …
#define EF4_SKB_HEADERS …
static unsigned int rx_refill_threshold;
#define EF4_RX_MAX_FRAGS …
#define EF4_RXD_HEAD_ROOM …
static inline u8 *ef4_rx_buf_va(struct ef4_rx_buffer *buf)
{ … }
static inline u32 ef4_rx_buf_hash(struct ef4_nic *efx, const u8 *eh)
{ … }
static inline struct ef4_rx_buffer *
ef4_rx_buf_next(struct ef4_rx_queue *rx_queue, struct ef4_rx_buffer *rx_buf)
{ … }
static inline void ef4_sync_rx_buffer(struct ef4_nic *efx,
struct ef4_rx_buffer *rx_buf,
unsigned int len)
{ … }
void ef4_rx_config_page_split(struct ef4_nic *efx)
{ … }
static struct page *ef4_reuse_page(struct ef4_rx_queue *rx_queue)
{ … }
static int ef4_init_rx_buffers(struct ef4_rx_queue *rx_queue, bool atomic)
{ … }
static void ef4_unmap_rx_buffer(struct ef4_nic *efx,
struct ef4_rx_buffer *rx_buf)
{ … }
static void ef4_free_rx_buffers(struct ef4_rx_queue *rx_queue,
struct ef4_rx_buffer *rx_buf,
unsigned int num_bufs)
{ … }
static void ef4_recycle_rx_page(struct ef4_channel *channel,
struct ef4_rx_buffer *rx_buf)
{ … }
static void ef4_fini_rx_buffer(struct ef4_rx_queue *rx_queue,
struct ef4_rx_buffer *rx_buf)
{ … }
static void ef4_recycle_rx_pages(struct ef4_channel *channel,
struct ef4_rx_buffer *rx_buf,
unsigned int n_frags)
{ … }
static void ef4_discard_rx_packet(struct ef4_channel *channel,
struct ef4_rx_buffer *rx_buf,
unsigned int n_frags)
{ … }
void ef4_fast_push_rx_descriptors(struct ef4_rx_queue *rx_queue, bool atomic)
{ … }
void ef4_rx_slow_fill(struct timer_list *t)
{ … }
static void ef4_rx_packet__check_len(struct ef4_rx_queue *rx_queue,
struct ef4_rx_buffer *rx_buf,
int len)
{ … }
static void
ef4_rx_packet_gro(struct ef4_channel *channel, struct ef4_rx_buffer *rx_buf,
unsigned int n_frags, u8 *eh)
{ … }
static struct sk_buff *ef4_rx_mk_skb(struct ef4_channel *channel,
struct ef4_rx_buffer *rx_buf,
unsigned int n_frags,
u8 *eh, int hdr_len)
{ … }
void ef4_rx_packet(struct ef4_rx_queue *rx_queue, unsigned int index,
unsigned int n_frags, unsigned int len, u16 flags)
{ … }
static void ef4_rx_deliver(struct ef4_channel *channel, u8 *eh,
struct ef4_rx_buffer *rx_buf,
unsigned int n_frags)
{ … }
void __ef4_rx_packet(struct ef4_channel *channel)
{ … }
int ef4_probe_rx_queue(struct ef4_rx_queue *rx_queue)
{ … }
static void ef4_init_rx_recycle_ring(struct ef4_nic *efx,
struct ef4_rx_queue *rx_queue)
{ … }
void ef4_init_rx_queue(struct ef4_rx_queue *rx_queue)
{ … }
void ef4_fini_rx_queue(struct ef4_rx_queue *rx_queue)
{ … }
void ef4_remove_rx_queue(struct ef4_rx_queue *rx_queue)
{ … }
module_param(rx_refill_threshold, uint, 0444);
MODULE_PARM_DESC(…) …;
#ifdef CONFIG_RFS_ACCEL
int ef4_filter_rfs(struct net_device *net_dev, const struct sk_buff *skb,
u16 rxq_index, u32 flow_id)
{ … }
bool __ef4_filter_rfs_expire(struct ef4_nic *efx, unsigned int quota)
{ … }
#endif
bool ef4_filter_is_mc_recipient(const struct ef4_filter_spec *spec)
{ … }