#ifndef _IAVF_H_
#define _IAVF_H_
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/netdevice.h>
#include <linux/vmalloc.h>
#include <linux/interrupt.h>
#include <linux/ethtool.h>
#include <linux/if_vlan.h>
#include <linux/ip.h>
#include <linux/tcp.h>
#include <linux/sctp.h>
#include <linux/ipv6.h>
#include <linux/kernel.h>
#include <linux/bitops.h>
#include <linux/timer.h>
#include <linux/workqueue.h>
#include <linux/wait.h>
#include <linux/delay.h>
#include <linux/gfp.h>
#include <linux/skbuff.h>
#include <linux/dma-mapping.h>
#include <linux/etherdevice.h>
#include <linux/socket.h>
#include <linux/jiffies.h>
#include <net/ip6_checksum.h>
#include <net/pkt_cls.h>
#include <net/pkt_sched.h>
#include <net/udp.h>
#include <net/tc_act/tc_gact.h>
#include <net/tc_act/tc_mirred.h>
#include <net/tc_act/tc_skbedit.h>
#include "iavf_type.h"
#include <linux/avf/virtchnl.h>
#include "iavf_txrx.h"
#include "iavf_fdir.h"
#include "iavf_adv_rss.h"
#include <linux/bitmap.h>
#define DEFAULT_DEBUG_LEVEL_SHIFT …
#define PFX …
int iavf_status_to_errno(enum iavf_status status);
int virtchnl_status_to_errno(enum virtchnl_status_code v_status);
enum iavf_vsi_state_t { … };
struct iavf_vsi { … };
#define IAVF_RX_BUFFER_WRITE …
#define IAVF_DEFAULT_TXD …
#define IAVF_DEFAULT_RXD …
#define IAVF_MAX_TXD …
#define IAVF_MIN_TXD …
#define IAVF_MAX_RXD …
#define IAVF_MIN_RXD …
#define IAVF_REQ_DESCRIPTOR_MULTIPLE …
#define IAVF_MAX_AQ_BUF_SIZE …
#define IAVF_AQ_LEN …
#define IAVF_AQ_MAX_ERR …
#define MAXIMUM_ETHERNET_VLAN_SIZE …
#define IAVF_RX_DESC(R, i) …
#define IAVF_TX_DESC(R, i) …
#define IAVF_TX_CTXTDESC(R, i) …
#define IAVF_MAX_REQ_QUEUES …
#define IAVF_HKEY_ARRAY_SIZE …
#define IAVF_HLUT_ARRAY_SIZE …
#define IAVF_MBPS_DIVISOR …
#define IAVF_MBPS_QUANTA …
#define IAVF_VIRTCHNL_VF_RESOURCE_SIZE …
struct iavf_q_vector { … };
#define EITR_INTS_PER_SEC_TO_REG(_eitr) …
#define EITR_REG_TO_INTS_PER_SEC …
#define IAVF_DESC_UNUSED(R) …
#define OTHER_VECTOR …
#define NONQ_VECS …
#define MIN_MSIX_Q_VECTORS …
#define MIN_MSIX_COUNT …
#define IAVF_QUEUE_END_OF_LIST …
#define IAVF_FREE_VECTOR …
struct iavf_mac_filter { … };
#define IAVF_VLAN(vid, tpid) …
struct iavf_vlan { … };
enum iavf_vlan_state_t { … };
struct iavf_vlan_filter { … };
#define IAVF_MAX_TRAFFIC_CLASS …
enum iavf_tc_state_t { … };
struct iavf_channel_config { … };
enum iavf_cloud_filter_state_t { … };
enum iavf_state_t { … };
enum iavf_critical_section_t { … };
#define IAVF_CLOUD_FIELD_OMAC …
#define IAVF_CLOUD_FIELD_IMAC …
#define IAVF_CLOUD_FIELD_IVLAN …
#define IAVF_CLOUD_FIELD_TEN_ID …
#define IAVF_CLOUD_FIELD_IIP …
#define IAVF_CF_FLAGS_OMAC …
#define IAVF_CF_FLAGS_IMAC …
#define IAVF_CF_FLAGS_IMAC_IVLAN …
#define IAVF_CF_FLAGS_IMAC_TEN_ID …
#define IAVF_CF_FLAGS_OMAC_TEN_ID_IMAC …
#define IAVF_CF_FLAGS_IMAC_IVLAN_TEN_ID …
#define IAVF_CF_FLAGS_IIP …
struct iavf_cloud_filter { … };
#define IAVF_RESET_WAIT_MS …
#define IAVF_RESET_WAIT_DETECTED_COUNT …
#define IAVF_RESET_WAIT_COMPLETE_COUNT …
struct iavf_adapter { … };
static inline bool iavf_fdir_max_reached(struct iavf_adapter *adapter)
{ … }
static inline void
iavf_inc_fdir_active_fltr(struct iavf_adapter *adapter,
struct iavf_fdir_fltr *fltr)
{ … }
static inline void
iavf_dec_fdir_active_fltr(struct iavf_adapter *adapter,
struct iavf_fdir_fltr *fltr)
{ … }
extern char iavf_driver_name[];
static inline const char *iavf_state_str(enum iavf_state_t state)
{ … }
static inline void iavf_change_state(struct iavf_adapter *adapter,
enum iavf_state_t state)
{ … }
int iavf_up(struct iavf_adapter *adapter);
void iavf_down(struct iavf_adapter *adapter);
int iavf_process_config(struct iavf_adapter *adapter);
int iavf_parse_vf_resource_msg(struct iavf_adapter *adapter);
void iavf_schedule_reset(struct iavf_adapter *adapter, u64 flags);
void iavf_schedule_aq_request(struct iavf_adapter *adapter, u64 flags);
void iavf_schedule_finish_config(struct iavf_adapter *adapter);
void iavf_reset(struct iavf_adapter *adapter);
void iavf_set_ethtool_ops(struct net_device *netdev);
void iavf_update_stats(struct iavf_adapter *adapter);
void iavf_free_all_tx_resources(struct iavf_adapter *adapter);
void iavf_free_all_rx_resources(struct iavf_adapter *adapter);
void iavf_napi_add_all(struct iavf_adapter *adapter);
void iavf_napi_del_all(struct iavf_adapter *adapter);
int iavf_send_api_ver(struct iavf_adapter *adapter);
int iavf_verify_api_ver(struct iavf_adapter *adapter);
int iavf_send_vf_config_msg(struct iavf_adapter *adapter);
int iavf_get_vf_config(struct iavf_adapter *adapter);
int iavf_get_vf_vlan_v2_caps(struct iavf_adapter *adapter);
int iavf_send_vf_offload_vlan_v2_msg(struct iavf_adapter *adapter);
void iavf_set_queue_vlan_tag_loc(struct iavf_adapter *adapter);
u16 iavf_get_num_vlans_added(struct iavf_adapter *adapter);
void iavf_irq_enable(struct iavf_adapter *adapter, bool flush);
void iavf_configure_queues(struct iavf_adapter *adapter);
void iavf_deconfigure_queues(struct iavf_adapter *adapter);
void iavf_enable_queues(struct iavf_adapter *adapter);
void iavf_disable_queues(struct iavf_adapter *adapter);
void iavf_map_queues(struct iavf_adapter *adapter);
int iavf_request_queues(struct iavf_adapter *adapter, int num);
void iavf_add_ether_addrs(struct iavf_adapter *adapter);
void iavf_del_ether_addrs(struct iavf_adapter *adapter);
void iavf_add_vlans(struct iavf_adapter *adapter);
void iavf_del_vlans(struct iavf_adapter *adapter);
void iavf_set_promiscuous(struct iavf_adapter *adapter);
bool iavf_promiscuous_mode_changed(struct iavf_adapter *adapter);
void iavf_request_stats(struct iavf_adapter *adapter);
int iavf_request_reset(struct iavf_adapter *adapter);
void iavf_get_hena(struct iavf_adapter *adapter);
void iavf_set_hena(struct iavf_adapter *adapter);
void iavf_set_rss_key(struct iavf_adapter *adapter);
void iavf_set_rss_lut(struct iavf_adapter *adapter);
void iavf_set_rss_hfunc(struct iavf_adapter *adapter);
void iavf_enable_vlan_stripping(struct iavf_adapter *adapter);
void iavf_disable_vlan_stripping(struct iavf_adapter *adapter);
void iavf_virtchnl_completion(struct iavf_adapter *adapter,
enum virtchnl_ops v_opcode,
enum iavf_status v_retval, u8 *msg, u16 msglen);
int iavf_config_rss(struct iavf_adapter *adapter);
int iavf_lan_add_device(struct iavf_adapter *adapter);
int iavf_lan_del_device(struct iavf_adapter *adapter);
void iavf_enable_channels(struct iavf_adapter *adapter);
void iavf_disable_channels(struct iavf_adapter *adapter);
void iavf_add_cloud_filter(struct iavf_adapter *adapter);
void iavf_del_cloud_filter(struct iavf_adapter *adapter);
void iavf_enable_vlan_stripping_v2(struct iavf_adapter *adapter, u16 tpid);
void iavf_disable_vlan_stripping_v2(struct iavf_adapter *adapter, u16 tpid);
void iavf_enable_vlan_insertion_v2(struct iavf_adapter *adapter, u16 tpid);
void iavf_disable_vlan_insertion_v2(struct iavf_adapter *adapter, u16 tpid);
void iavf_add_fdir_filter(struct iavf_adapter *adapter);
void iavf_del_fdir_filter(struct iavf_adapter *adapter);
void iavf_add_adv_rss_cfg(struct iavf_adapter *adapter);
void iavf_del_adv_rss_cfg(struct iavf_adapter *adapter);
struct iavf_mac_filter *iavf_add_filter(struct iavf_adapter *adapter,
const u8 *macaddr);
int iavf_wait_for_reset(struct iavf_adapter *adapter);
#endif