#include <linux/types.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/netdevice.h>
#include <linux/vmalloc.h>
#include <linux/string.h>
#include <linux/in.h>
#include <linux/interrupt.h>
#include <linux/ip.h>
#include <linux/tcp.h>
#include <linux/sctp.h>
#include <linux/pkt_sched.h>
#include <linux/ipv6.h>
#include <linux/slab.h>
#include <net/checksum.h>
#include <net/ip6_checksum.h>
#include <linux/etherdevice.h>
#include <linux/ethtool.h>
#include <linux/if.h>
#include <linux/if_vlan.h>
#include <linux/if_macvlan.h>
#include <linux/if_bridge.h>
#include <linux/prefetch.h>
#include <linux/bpf.h>
#include <linux/bpf_trace.h>
#include <linux/atomic.h>
#include <linux/numa.h>
#include <generated/utsrelease.h>
#include <scsi/fc/fc_fcoe.h>
#include <net/udp_tunnel.h>
#include <net/pkt_cls.h>
#include <net/tc_act/tc_gact.h>
#include <net/tc_act/tc_mirred.h>
#include <net/vxlan.h>
#include <net/mpls.h>
#include <net/netdev_queues.h>
#include <net/xdp_sock_drv.h>
#include <net/xfrm.h>
#include "ixgbe.h"
#include "ixgbe_common.h"
#include "ixgbe_dcb_82599.h"
#include "ixgbe_phy.h"
#include "ixgbe_sriov.h"
#include "ixgbe_model.h"
#include "ixgbe_txrx_common.h"
char ixgbe_driver_name[] = …;
static const char ixgbe_driver_string[] = …;
#ifdef IXGBE_FCOE
char ixgbe_default_device_descr[] = …;
#else
static char ixgbe_default_device_descr[] =
"Intel(R) 10 Gigabit Network Connection";
#endif
static const char ixgbe_copyright[] = …;
static const char ixgbe_overheat_msg[] = …;
static const struct ixgbe_info *ixgbe_info_tbl[] = …;
static const struct pci_device_id ixgbe_pci_tbl[] = …;
MODULE_DEVICE_TABLE(pci, ixgbe_pci_tbl);
#ifdef CONFIG_IXGBE_DCA
static int ixgbe_notify_dca(struct notifier_block *, unsigned long event,
void *p);
static struct notifier_block dca_notifier = …;
#endif
#ifdef CONFIG_PCI_IOV
static unsigned int max_vfs;
module_param(max_vfs, uint, 0);
MODULE_PARM_DESC(…) …;
#endif
static bool allow_unsupported_sfp;
module_param(allow_unsupported_sfp, bool, 0444);
MODULE_PARM_DESC(…) …;
#define DEFAULT_MSG_ENABLE …
static int debug = …;
module_param(debug, int, 0);
MODULE_PARM_DESC(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
DEFINE_STATIC_KEY_FALSE(ixgbe_xdp_locking_key);
EXPORT_SYMBOL(…);
static struct workqueue_struct *ixgbe_wq;
static bool ixgbe_check_cfg_remove(struct ixgbe_hw *hw, struct pci_dev *pdev);
static void ixgbe_watchdog_link_is_down(struct ixgbe_adapter *);
static const struct net_device_ops ixgbe_netdev_ops;
static bool netif_is_ixgbe(struct net_device *dev)
{ … }
static int ixgbe_read_pci_cfg_word_parent(struct ixgbe_adapter *adapter,
u32 reg, u16 *value)
{ … }
static int ixgbe_get_parent_bus_info(struct ixgbe_adapter *adapter)
{ … }
static inline bool ixgbe_pcie_from_parent(struct ixgbe_hw *hw)
{ … }
static void ixgbe_check_minimum_link(struct ixgbe_adapter *adapter,
int expected_gts)
{ … }
static void ixgbe_service_event_schedule(struct ixgbe_adapter *adapter)
{ … }
static void ixgbe_remove_adapter(struct ixgbe_hw *hw)
{ … }
static u32 ixgbe_check_remove(struct ixgbe_hw *hw, u32 reg)
{ … }
u32 ixgbe_read_reg(struct ixgbe_hw *hw, u32 reg)
{ … }
static bool ixgbe_check_cfg_remove(struct ixgbe_hw *hw, struct pci_dev *pdev)
{ … }
u16 ixgbe_read_pci_cfg_word(struct ixgbe_hw *hw, u32 reg)
{ … }
#ifdef CONFIG_PCI_IOV
static u32 ixgbe_read_pci_cfg_dword(struct ixgbe_hw *hw, u32 reg)
{ … }
#endif
void ixgbe_write_pci_cfg_word(struct ixgbe_hw *hw, u32 reg, u16 value)
{ … }
static void ixgbe_service_event_complete(struct ixgbe_adapter *adapter)
{ … }
struct ixgbe_reg_info { … };
static const struct ixgbe_reg_info ixgbe_reg_info_tbl[] = …;
static void ixgbe_regdump(struct ixgbe_hw *hw, struct ixgbe_reg_info *reginfo)
{ … }
static void ixgbe_print_buffer(struct ixgbe_ring *ring, int n)
{ … }
static void ixgbe_dump(struct ixgbe_adapter *adapter)
{ … }
static void ixgbe_release_hw_control(struct ixgbe_adapter *adapter)
{ … }
static void ixgbe_get_hw_control(struct ixgbe_adapter *adapter)
{ … }
static void ixgbe_set_ivar(struct ixgbe_adapter *adapter, s8 direction,
u8 queue, u8 msix_vector)
{ … }
void ixgbe_irq_rearm_queues(struct ixgbe_adapter *adapter,
u64 qmask)
{ … }
static void ixgbe_update_xoff_rx_lfc(struct ixgbe_adapter *adapter)
{ … }
static void ixgbe_update_xoff_received(struct ixgbe_adapter *adapter)
{ … }
static u64 ixgbe_get_tx_completed(struct ixgbe_ring *ring)
{ … }
static u64 ixgbe_get_tx_pending(struct ixgbe_ring *ring)
{ … }
static inline bool ixgbe_check_tx_hang(struct ixgbe_ring *tx_ring)
{ … }
static void ixgbe_tx_timeout_reset(struct ixgbe_adapter *adapter)
{ … }
static int ixgbe_tx_maxrate(struct net_device *netdev,
int queue_index, u32 maxrate)
{ … }
void ixgbe_update_tx_ring_stats(struct ixgbe_ring *tx_ring,
struct ixgbe_q_vector *q_vector, u64 pkts,
u64 bytes)
{ … }
void ixgbe_update_rx_ring_stats(struct ixgbe_ring *rx_ring,
struct ixgbe_q_vector *q_vector, u64 pkts,
u64 bytes)
{ … }
static bool ixgbe_clean_tx_irq(struct ixgbe_q_vector *q_vector,
struct ixgbe_ring *tx_ring, int napi_budget)
{ … }
#ifdef CONFIG_IXGBE_DCA
static void ixgbe_update_tx_dca(struct ixgbe_adapter *adapter,
struct ixgbe_ring *tx_ring,
int cpu)
{ … }
static void ixgbe_update_rx_dca(struct ixgbe_adapter *adapter,
struct ixgbe_ring *rx_ring,
int cpu)
{ … }
static void ixgbe_update_dca(struct ixgbe_q_vector *q_vector)
{ … }
static void ixgbe_setup_dca(struct ixgbe_adapter *adapter)
{ … }
static int __ixgbe_notify_dca(struct device *dev, void *data)
{ … }
#endif
#define IXGBE_RSS_L4_TYPES_MASK …
static inline void ixgbe_rx_hash(struct ixgbe_ring *ring,
union ixgbe_adv_rx_desc *rx_desc,
struct sk_buff *skb)
{ … }
#ifdef IXGBE_FCOE
static inline bool ixgbe_rx_is_fcoe(struct ixgbe_ring *ring,
union ixgbe_adv_rx_desc *rx_desc)
{ … }
#endif
static inline void ixgbe_rx_checksum(struct ixgbe_ring *ring,
union ixgbe_adv_rx_desc *rx_desc,
struct sk_buff *skb)
{ … }
static unsigned int ixgbe_rx_offset(struct ixgbe_ring *rx_ring)
{ … }
static bool ixgbe_alloc_mapped_page(struct ixgbe_ring *rx_ring,
struct ixgbe_rx_buffer *bi)
{ … }
void ixgbe_alloc_rx_buffers(struct ixgbe_ring *rx_ring, u16 cleaned_count)
{ … }
static void ixgbe_set_rsc_gso_size(struct ixgbe_ring *ring,
struct sk_buff *skb)
{ … }
static void ixgbe_update_rsc_stats(struct ixgbe_ring *rx_ring,
struct sk_buff *skb)
{ … }
void ixgbe_process_skb_fields(struct ixgbe_ring *rx_ring,
union ixgbe_adv_rx_desc *rx_desc,
struct sk_buff *skb)
{ … }
void ixgbe_rx_skb(struct ixgbe_q_vector *q_vector,
struct sk_buff *skb)
{ … }
static bool ixgbe_is_non_eop(struct ixgbe_ring *rx_ring,
union ixgbe_adv_rx_desc *rx_desc,
struct sk_buff *skb)
{ … }
static void ixgbe_pull_tail(struct ixgbe_ring *rx_ring,
struct sk_buff *skb)
{ … }
static void ixgbe_dma_sync_frag(struct ixgbe_ring *rx_ring,
struct sk_buff *skb)
{ … }
bool ixgbe_cleanup_headers(struct ixgbe_ring *rx_ring,
union ixgbe_adv_rx_desc *rx_desc,
struct sk_buff *skb)
{ … }
static void ixgbe_reuse_rx_page(struct ixgbe_ring *rx_ring,
struct ixgbe_rx_buffer *old_buff)
{ … }
static bool ixgbe_can_reuse_rx_page(struct ixgbe_rx_buffer *rx_buffer,
int rx_buffer_pgcnt)
{ … }
static void ixgbe_add_rx_frag(struct ixgbe_ring *rx_ring,
struct ixgbe_rx_buffer *rx_buffer,
struct sk_buff *skb,
unsigned int size)
{ … }
static struct ixgbe_rx_buffer *ixgbe_get_rx_buffer(struct ixgbe_ring *rx_ring,
union ixgbe_adv_rx_desc *rx_desc,
struct sk_buff **skb,
const unsigned int size,
int *rx_buffer_pgcnt)
{ … }
static void ixgbe_put_rx_buffer(struct ixgbe_ring *rx_ring,
struct ixgbe_rx_buffer *rx_buffer,
struct sk_buff *skb,
int rx_buffer_pgcnt)
{ … }
static struct sk_buff *ixgbe_construct_skb(struct ixgbe_ring *rx_ring,
struct ixgbe_rx_buffer *rx_buffer,
struct xdp_buff *xdp,
union ixgbe_adv_rx_desc *rx_desc)
{ … }
static struct sk_buff *ixgbe_build_skb(struct ixgbe_ring *rx_ring,
struct ixgbe_rx_buffer *rx_buffer,
struct xdp_buff *xdp,
union ixgbe_adv_rx_desc *rx_desc)
{ … }
static struct sk_buff *ixgbe_run_xdp(struct ixgbe_adapter *adapter,
struct ixgbe_ring *rx_ring,
struct xdp_buff *xdp)
{ … }
static unsigned int ixgbe_rx_frame_truesize(struct ixgbe_ring *rx_ring,
unsigned int size)
{ … }
static void ixgbe_rx_buffer_flip(struct ixgbe_ring *rx_ring,
struct ixgbe_rx_buffer *rx_buffer,
unsigned int size)
{ … }
static int ixgbe_clean_rx_irq(struct ixgbe_q_vector *q_vector,
struct ixgbe_ring *rx_ring,
const int budget)
{ … }
static void ixgbe_configure_msix(struct ixgbe_adapter *adapter)
{ … }
static void ixgbe_update_itr(struct ixgbe_q_vector *q_vector,
struct ixgbe_ring_container *ring_container)
{ … }
void ixgbe_write_eitr(struct ixgbe_q_vector *q_vector)
{ … }
static void ixgbe_set_itr(struct ixgbe_q_vector *q_vector)
{ … }
static void ixgbe_check_overtemp_subtask(struct ixgbe_adapter *adapter)
{ … }
static void ixgbe_check_fan_failure(struct ixgbe_adapter *adapter, u32 eicr)
{ … }
static void ixgbe_check_overtemp_event(struct ixgbe_adapter *adapter, u32 eicr)
{ … }
static inline bool ixgbe_is_sfp(struct ixgbe_hw *hw)
{ … }
static void ixgbe_check_sfp_event(struct ixgbe_adapter *adapter, u32 eicr)
{ … }
static void ixgbe_check_lsc(struct ixgbe_adapter *adapter)
{ … }
static inline void ixgbe_irq_enable_queues(struct ixgbe_adapter *adapter,
u64 qmask)
{ … }
static inline void ixgbe_irq_enable(struct ixgbe_adapter *adapter, bool queues,
bool flush)
{ … }
static irqreturn_t ixgbe_msix_other(int irq, void *data)
{ … }
static irqreturn_t ixgbe_msix_clean_rings(int irq, void *data)
{ … }
int ixgbe_poll(struct napi_struct *napi, int budget)
{ … }
static int ixgbe_request_msix_irqs(struct ixgbe_adapter *adapter)
{ … }
static irqreturn_t ixgbe_intr(int irq, void *data)
{ … }
static int ixgbe_request_irq(struct ixgbe_adapter *adapter)
{ … }
static void ixgbe_free_irq(struct ixgbe_adapter *adapter)
{ … }
static inline void ixgbe_irq_disable(struct ixgbe_adapter *adapter)
{ … }
static void ixgbe_configure_msi_and_legacy(struct ixgbe_adapter *adapter)
{ … }
void ixgbe_configure_tx_ring(struct ixgbe_adapter *adapter,
struct ixgbe_ring *ring)
{ … }
static void ixgbe_setup_mtqc(struct ixgbe_adapter *adapter)
{ … }
static void ixgbe_configure_tx(struct ixgbe_adapter *adapter)
{ … }
static void ixgbe_enable_rx_drop(struct ixgbe_adapter *adapter,
struct ixgbe_ring *ring)
{ … }
static void ixgbe_disable_rx_drop(struct ixgbe_adapter *adapter,
struct ixgbe_ring *ring)
{ … }
#ifdef CONFIG_IXGBE_DCB
void ixgbe_set_rx_drop_en(struct ixgbe_adapter *adapter)
#else
static void ixgbe_set_rx_drop_en(struct ixgbe_adapter *adapter)
#endif
{ … }
#define IXGBE_SRRCTL_BSIZEHDRSIZE_SHIFT …
static void ixgbe_configure_srrctl(struct ixgbe_adapter *adapter,
struct ixgbe_ring *rx_ring)
{ … }
u32 ixgbe_rss_indir_tbl_entries(struct ixgbe_adapter *adapter)
{ … }
void ixgbe_store_key(struct ixgbe_adapter *adapter)
{ … }
static inline int ixgbe_init_rss_key(struct ixgbe_adapter *adapter)
{ … }
void ixgbe_store_reta(struct ixgbe_adapter *adapter)
{ … }
static void ixgbe_store_vfreta(struct ixgbe_adapter *adapter)
{ … }
static void ixgbe_setup_reta(struct ixgbe_adapter *adapter)
{ … }
static void ixgbe_setup_vfreta(struct ixgbe_adapter *adapter)
{ … }
static void ixgbe_setup_mrqc(struct ixgbe_adapter *adapter)
{ … }
static void ixgbe_configure_rscctl(struct ixgbe_adapter *adapter,
struct ixgbe_ring *ring)
{ … }
#define IXGBE_MAX_RX_DESC_POLL …
static void ixgbe_rx_desc_queue_enable(struct ixgbe_adapter *adapter,
struct ixgbe_ring *ring)
{ … }
void ixgbe_configure_rx_ring(struct ixgbe_adapter *adapter,
struct ixgbe_ring *ring)
{ … }
static void ixgbe_setup_psrtype(struct ixgbe_adapter *adapter)
{ … }
static void ixgbe_configure_virtualization(struct ixgbe_adapter *adapter)
{ … }
static void ixgbe_set_rx_buffer_len(struct ixgbe_adapter *adapter)
{ … }
static void ixgbe_setup_rdrxctl(struct ixgbe_adapter *adapter)
{ … }
static void ixgbe_configure_rx(struct ixgbe_adapter *adapter)
{ … }
static int ixgbe_vlan_rx_add_vid(struct net_device *netdev,
__be16 proto, u16 vid)
{ … }
static int ixgbe_find_vlvf_entry(struct ixgbe_hw *hw, u32 vlan)
{ … }
void ixgbe_update_pf_promisc_vlvf(struct ixgbe_adapter *adapter, u32 vid)
{ … }
static int ixgbe_vlan_rx_kill_vid(struct net_device *netdev,
__be16 proto, u16 vid)
{ … }
static void ixgbe_vlan_strip_disable(struct ixgbe_adapter *adapter)
{ … }
static void ixgbe_vlan_strip_enable(struct ixgbe_adapter *adapter)
{ … }
static void ixgbe_vlan_promisc_enable(struct ixgbe_adapter *adapter)
{ … }
#define VFTA_BLOCK_SIZE …
static void ixgbe_scrub_vfta(struct ixgbe_adapter *adapter, u32 vfta_offset)
{ … }
static void ixgbe_vlan_promisc_disable(struct ixgbe_adapter *adapter)
{ … }
static void ixgbe_restore_vlan(struct ixgbe_adapter *adapter)
{ … }
static int ixgbe_write_mc_addr_list(struct net_device *netdev)
{ … }
#ifdef CONFIG_PCI_IOV
void ixgbe_full_sync_mac_table(struct ixgbe_adapter *adapter)
{ … }
#endif
static void ixgbe_sync_mac_table(struct ixgbe_adapter *adapter)
{ … }
static void ixgbe_flush_sw_mac_table(struct ixgbe_adapter *adapter)
{ … }
static int ixgbe_available_rars(struct ixgbe_adapter *adapter, u16 pool)
{ … }
static void ixgbe_mac_set_default_filter(struct ixgbe_adapter *adapter)
{ … }
int ixgbe_add_mac_filter(struct ixgbe_adapter *adapter,
const u8 *addr, u16 pool)
{ … }
int ixgbe_del_mac_filter(struct ixgbe_adapter *adapter,
const u8 *addr, u16 pool)
{ … }
static int ixgbe_uc_sync(struct net_device *netdev, const unsigned char *addr)
{ … }
static int ixgbe_uc_unsync(struct net_device *netdev, const unsigned char *addr)
{ … }
void ixgbe_set_rx_mode(struct net_device *netdev)
{ … }
static void ixgbe_napi_enable_all(struct ixgbe_adapter *adapter)
{ … }
static void ixgbe_napi_disable_all(struct ixgbe_adapter *adapter)
{ … }
static int ixgbe_udp_tunnel_sync(struct net_device *dev, unsigned int table)
{ … }
static const struct udp_tunnel_nic_info ixgbe_udp_tunnels_x550 = …;
static const struct udp_tunnel_nic_info ixgbe_udp_tunnels_x550em_a = …;
#ifdef CONFIG_IXGBE_DCB
static void ixgbe_configure_dcb(struct ixgbe_adapter *adapter)
{ … }
#endif
#define IXGBE_ETH_FRAMING …
static int ixgbe_hpbthresh(struct ixgbe_adapter *adapter, int pb)
{ … }
static int ixgbe_lpbthresh(struct ixgbe_adapter *adapter, int pb)
{ … }
static void ixgbe_pbthresh_setup(struct ixgbe_adapter *adapter)
{ … }
static void ixgbe_configure_pb(struct ixgbe_adapter *adapter)
{ … }
static void ixgbe_fdir_filter_restore(struct ixgbe_adapter *adapter)
{ … }
static void ixgbe_clean_rx_ring(struct ixgbe_ring *rx_ring)
{ … }
static int ixgbe_fwd_ring_up(struct ixgbe_adapter *adapter,
struct ixgbe_fwd_adapter *accel)
{ … }
static int ixgbe_macvlan_up(struct net_device *vdev,
struct netdev_nested_priv *priv)
{ … }
static void ixgbe_configure_dfwd(struct ixgbe_adapter *adapter)
{ … }
static void ixgbe_configure(struct ixgbe_adapter *adapter)
{ … }
static void ixgbe_sfp_link_config(struct ixgbe_adapter *adapter)
{ … }
static int ixgbe_non_sfp_link_config(struct ixgbe_hw *hw)
{ … }
static void ixgbe_clear_vf_stats_counters(struct ixgbe_adapter *adapter)
{ … }
static void ixgbe_setup_gpie(struct ixgbe_adapter *adapter)
{ … }
static void ixgbe_up_complete(struct ixgbe_adapter *adapter)
{ … }
void ixgbe_reinit_locked(struct ixgbe_adapter *adapter)
{ … }
void ixgbe_up(struct ixgbe_adapter *adapter)
{ … }
static unsigned long ixgbe_get_completion_timeout(struct ixgbe_adapter *adapter)
{ … }
void ixgbe_disable_rx(struct ixgbe_adapter *adapter)
{ … }
void ixgbe_disable_tx(struct ixgbe_adapter *adapter)
{ … }
void ixgbe_reset(struct ixgbe_adapter *adapter)
{ … }
static void ixgbe_clean_tx_ring(struct ixgbe_ring *tx_ring)
{ … }
static void ixgbe_clean_all_rx_rings(struct ixgbe_adapter *adapter)
{ … }
static void ixgbe_clean_all_tx_rings(struct ixgbe_adapter *adapter)
{ … }
static void ixgbe_fdir_filter_exit(struct ixgbe_adapter *adapter)
{ … }
void ixgbe_down(struct ixgbe_adapter *adapter)
{ … }
static void ixgbe_set_eee_capable(struct ixgbe_adapter *adapter)
{ … }
static void ixgbe_tx_timeout(struct net_device *netdev, unsigned int __always_unused txqueue)
{ … }
#ifdef CONFIG_IXGBE_DCB
static void ixgbe_init_dcb(struct ixgbe_adapter *adapter)
{ … }
#endif
static int ixgbe_sw_init(struct ixgbe_adapter *adapter,
const struct ixgbe_info *ii)
{ … }
int ixgbe_setup_tx_resources(struct ixgbe_ring *tx_ring)
{ … }
static int ixgbe_setup_all_tx_resources(struct ixgbe_adapter *adapter)
{ … }
static int ixgbe_rx_napi_id(struct ixgbe_ring *rx_ring)
{ … }
int ixgbe_setup_rx_resources(struct ixgbe_adapter *adapter,
struct ixgbe_ring *rx_ring)
{ … }
static int ixgbe_setup_all_rx_resources(struct ixgbe_adapter *adapter)
{ … }
void ixgbe_free_tx_resources(struct ixgbe_ring *tx_ring)
{ … }
static void ixgbe_free_all_tx_resources(struct ixgbe_adapter *adapter)
{ … }
void ixgbe_free_rx_resources(struct ixgbe_ring *rx_ring)
{ … }
static void ixgbe_free_all_rx_resources(struct ixgbe_adapter *adapter)
{ … }
static int ixgbe_max_xdp_frame_size(struct ixgbe_adapter *adapter)
{ … }
static int ixgbe_change_mtu(struct net_device *netdev, int new_mtu)
{ … }
int ixgbe_open(struct net_device *netdev)
{ … }
static void ixgbe_close_suspend(struct ixgbe_adapter *adapter)
{ … }
int ixgbe_close(struct net_device *netdev)
{ … }
static int ixgbe_resume(struct device *dev_d)
{ … }
static int __ixgbe_shutdown(struct pci_dev *pdev, bool *enable_wake)
{ … }
static int ixgbe_suspend(struct device *dev_d)
{ … }
static void ixgbe_shutdown(struct pci_dev *pdev)
{ … }
void ixgbe_update_stats(struct ixgbe_adapter *adapter)
{ … }
static void ixgbe_fdir_reinit_subtask(struct ixgbe_adapter *adapter)
{ … }
static void ixgbe_check_hang_subtask(struct ixgbe_adapter *adapter)
{ … }
static void ixgbe_watchdog_update_link(struct ixgbe_adapter *adapter)
{ … }
static void ixgbe_update_default_up(struct ixgbe_adapter *adapter)
{ … }
static void ixgbe_watchdog_link_is_up(struct ixgbe_adapter *adapter)
{ … }
static void ixgbe_watchdog_link_is_down(struct ixgbe_adapter *adapter)
{ … }
static bool ixgbe_ring_tx_pending(struct ixgbe_adapter *adapter)
{ … }
static bool ixgbe_vf_tx_pending(struct ixgbe_adapter *adapter)
{ … }
static void ixgbe_watchdog_flush_tx(struct ixgbe_adapter *adapter)
{ … }
#ifdef CONFIG_PCI_IOV
static void ixgbe_bad_vf_abort(struct ixgbe_adapter *adapter, u32 vf)
{ … }
static void ixgbe_check_for_bad_vf(struct ixgbe_adapter *adapter)
{ … }
static void ixgbe_spoof_check(struct ixgbe_adapter *adapter)
{ … }
#else
static void ixgbe_spoof_check(struct ixgbe_adapter __always_unused *adapter)
{
}
static void
ixgbe_check_for_bad_vf(struct ixgbe_adapter __always_unused *adapter)
{
}
#endif
static void ixgbe_watchdog_subtask(struct ixgbe_adapter *adapter)
{ … }
static void ixgbe_sfp_detection_subtask(struct ixgbe_adapter *adapter)
{ … }
static void ixgbe_sfp_link_config_subtask(struct ixgbe_adapter *adapter)
{ … }
static void ixgbe_service_timer(struct timer_list *t)
{ … }
static void ixgbe_phy_interrupt_subtask(struct ixgbe_adapter *adapter)
{ … }
static void ixgbe_reset_subtask(struct ixgbe_adapter *adapter)
{ … }
static bool ixgbe_check_fw_error(struct ixgbe_adapter *adapter)
{ … }
static void ixgbe_service_task(struct work_struct *work)
{ … }
static int ixgbe_tso(struct ixgbe_ring *tx_ring,
struct ixgbe_tx_buffer *first,
u8 *hdr_len,
struct ixgbe_ipsec_tx_data *itd)
{ … }
static void ixgbe_tx_csum(struct ixgbe_ring *tx_ring,
struct ixgbe_tx_buffer *first,
struct ixgbe_ipsec_tx_data *itd)
{ … }
#define IXGBE_SET_FLAG(_input, _flag, _result) …
static u32 ixgbe_tx_cmd_type(struct sk_buff *skb, u32 tx_flags)
{ … }
static void ixgbe_tx_olinfo_status(union ixgbe_adv_tx_desc *tx_desc,
u32 tx_flags, unsigned int paylen)
{ … }
static int __ixgbe_maybe_stop_tx(struct ixgbe_ring *tx_ring, u16 size)
{ … }
static inline int ixgbe_maybe_stop_tx(struct ixgbe_ring *tx_ring, u16 size)
{ … }
static int ixgbe_tx_map(struct ixgbe_ring *tx_ring,
struct ixgbe_tx_buffer *first,
const u8 hdr_len)
{ … }
static void ixgbe_atr(struct ixgbe_ring *ring,
struct ixgbe_tx_buffer *first)
{ … }
#ifdef IXGBE_FCOE
static u16 ixgbe_select_queue(struct net_device *dev, struct sk_buff *skb,
struct net_device *sb_dev)
{ … }
#endif
int ixgbe_xmit_xdp_ring(struct ixgbe_ring *ring,
struct xdp_frame *xdpf)
{ … }
netdev_tx_t ixgbe_xmit_frame_ring(struct sk_buff *skb,
struct ixgbe_adapter *adapter,
struct ixgbe_ring *tx_ring)
{ … }
static netdev_tx_t __ixgbe_xmit_frame(struct sk_buff *skb,
struct net_device *netdev,
struct ixgbe_ring *ring)
{ … }
static netdev_tx_t ixgbe_xmit_frame(struct sk_buff *skb,
struct net_device *netdev)
{ … }
static int ixgbe_set_mac(struct net_device *netdev, void *p)
{ … }
static int
ixgbe_mdio_read(struct net_device *netdev, int prtad, int devad, u16 addr)
{ … }
static int ixgbe_mdio_write(struct net_device *netdev, int prtad, int devad,
u16 addr, u16 value)
{ … }
static int ixgbe_ioctl(struct net_device *netdev, struct ifreq *req, int cmd)
{ … }
static int ixgbe_add_sanmac_netdev(struct net_device *dev)
{ … }
static int ixgbe_del_sanmac_netdev(struct net_device *dev)
{ … }
static void ixgbe_get_ring_stats64(struct rtnl_link_stats64 *stats,
struct ixgbe_ring *ring)
{ … }
static void ixgbe_get_stats64(struct net_device *netdev,
struct rtnl_link_stats64 *stats)
{ … }
static int ixgbe_ndo_get_vf_stats(struct net_device *netdev, int vf,
struct ifla_vf_stats *vf_stats)
{ … }
#ifdef CONFIG_IXGBE_DCB
static void ixgbe_validate_rtr(struct ixgbe_adapter *adapter, u8 tc)
{ … }
static void ixgbe_set_prio_tc_map(struct ixgbe_adapter *adapter)
{ … }
#endif
static int ixgbe_reassign_macvlan_pool(struct net_device *vdev,
struct netdev_nested_priv *priv)
{ … }
static void ixgbe_defrag_macvlan_pools(struct net_device *dev)
{ … }
int ixgbe_setup_tc(struct net_device *dev, u8 tc)
{ … }
static int ixgbe_delete_clsu32(struct ixgbe_adapter *adapter,
struct tc_cls_u32_offload *cls)
{ … }
static int ixgbe_configure_clsu32_add_hnode(struct ixgbe_adapter *adapter,
struct tc_cls_u32_offload *cls)
{ … }
static int ixgbe_configure_clsu32_del_hnode(struct ixgbe_adapter *adapter,
struct tc_cls_u32_offload *cls)
{ … }
#ifdef CONFIG_NET_CLS_ACT
struct upper_walk_data { … };
static int get_macvlan_queue(struct net_device *upper,
struct netdev_nested_priv *priv)
{ … }
static int handle_redirect_action(struct ixgbe_adapter *adapter, int ifindex,
u8 *queue, u64 *action)
{ … }
static int parse_tc_actions(struct ixgbe_adapter *adapter,
struct tcf_exts *exts, u64 *action, u8 *queue)
{ … }
#else
static int parse_tc_actions(struct ixgbe_adapter *adapter,
struct tcf_exts *exts, u64 *action, u8 *queue)
{
return -EINVAL;
}
#endif
static int ixgbe_clsu32_build_input(struct ixgbe_fdir_filter *input,
union ixgbe_atr_input *mask,
struct tc_cls_u32_offload *cls,
struct ixgbe_mat_field *field_ptr,
struct ixgbe_nexthdr *nexthdr)
{ … }
static int ixgbe_configure_clsu32(struct ixgbe_adapter *adapter,
struct tc_cls_u32_offload *cls)
{ … }
static int ixgbe_setup_tc_cls_u32(struct ixgbe_adapter *adapter,
struct tc_cls_u32_offload *cls_u32)
{ … }
static int ixgbe_setup_tc_block_cb(enum tc_setup_type type, void *type_data,
void *cb_priv)
{ … }
static int ixgbe_setup_tc_mqprio(struct net_device *dev,
struct tc_mqprio_qopt *mqprio)
{ … }
static LIST_HEAD(ixgbe_block_cb_list);
static int __ixgbe_setup_tc(struct net_device *dev, enum tc_setup_type type,
void *type_data)
{ … }
#ifdef CONFIG_PCI_IOV
void ixgbe_sriov_reinit(struct ixgbe_adapter *adapter)
{ … }
#endif
void ixgbe_do_reset(struct net_device *netdev)
{ … }
static netdev_features_t ixgbe_fix_features(struct net_device *netdev,
netdev_features_t features)
{ … }
static void ixgbe_reset_l2fw_offload(struct ixgbe_adapter *adapter)
{ … }
static int ixgbe_set_features(struct net_device *netdev,
netdev_features_t features)
{ … }
static int ixgbe_ndo_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
struct net_device *dev,
const unsigned char *addr, u16 vid,
u16 flags,
struct netlink_ext_ack *extack)
{ … }
static int ixgbe_configure_bridge_mode(struct ixgbe_adapter *adapter,
__u16 mode)
{ … }
static int ixgbe_ndo_bridge_setlink(struct net_device *dev,
struct nlmsghdr *nlh, u16 flags,
struct netlink_ext_ack *extack)
{ … }
static int ixgbe_ndo_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq,
struct net_device *dev,
u32 filter_mask, int nlflags)
{ … }
static void *ixgbe_fwd_add(struct net_device *pdev, struct net_device *vdev)
{ … }
static void ixgbe_fwd_del(struct net_device *pdev, void *priv)
{ … }
#define IXGBE_MAX_MAC_HDR_LEN …
#define IXGBE_MAX_NETWORK_HDR_LEN …
static netdev_features_t
ixgbe_features_check(struct sk_buff *skb, struct net_device *dev,
netdev_features_t features)
{ … }
static int ixgbe_xdp_setup(struct net_device *dev, struct bpf_prog *prog)
{ … }
static int ixgbe_xdp(struct net_device *dev, struct netdev_bpf *xdp)
{ … }
void ixgbe_xdp_ring_update_tail(struct ixgbe_ring *ring)
{ … }
void ixgbe_xdp_ring_update_tail_locked(struct ixgbe_ring *ring)
{ … }
static int ixgbe_xdp_xmit(struct net_device *dev, int n,
struct xdp_frame **frames, u32 flags)
{ … }
static const struct net_device_ops ixgbe_netdev_ops = …;
static void ixgbe_disable_txr_hw(struct ixgbe_adapter *adapter,
struct ixgbe_ring *tx_ring)
{ … }
static void ixgbe_disable_txr(struct ixgbe_adapter *adapter,
struct ixgbe_ring *tx_ring)
{ … }
static void ixgbe_disable_rxr_hw(struct ixgbe_adapter *adapter,
struct ixgbe_ring *rx_ring)
{ … }
static void ixgbe_reset_txr_stats(struct ixgbe_ring *tx_ring)
{ … }
static void ixgbe_reset_rxr_stats(struct ixgbe_ring *rx_ring)
{ … }
static void ixgbe_irq_disable_single(struct ixgbe_adapter *adapter, u32 ring)
{ … }
void ixgbe_txrx_ring_disable(struct ixgbe_adapter *adapter, int ring)
{ … }
void ixgbe_txrx_ring_enable(struct ixgbe_adapter *adapter, int ring)
{ … }
static inline int ixgbe_enumerate_functions(struct ixgbe_adapter *adapter)
{ … }
bool ixgbe_wol_supported(struct ixgbe_adapter *adapter, u16 device_id,
u16 subdevice_id)
{ … }
static void ixgbe_set_fw_version(struct ixgbe_adapter *adapter)
{ … }
static int ixgbe_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{ … }
static void ixgbe_remove(struct pci_dev *pdev)
{ … }
static pci_ers_result_t ixgbe_io_error_detected(struct pci_dev *pdev,
pci_channel_state_t state)
{ … }
static pci_ers_result_t ixgbe_io_slot_reset(struct pci_dev *pdev)
{ … }
static void ixgbe_io_resume(struct pci_dev *pdev)
{ … }
static const struct pci_error_handlers ixgbe_err_handler = …;
static DEFINE_SIMPLE_DEV_PM_OPS(ixgbe_pm_ops, ixgbe_suspend, ixgbe_resume);
static struct pci_driver ixgbe_driver = …;
static int __init ixgbe_init_module(void)
{ … }
module_init(…) …;
static void __exit ixgbe_exit_module(void)
{ … }
#ifdef CONFIG_IXGBE_DCA
static int ixgbe_notify_dca(struct notifier_block *nb, unsigned long event,
void *p)
{ … }
#endif
module_exit(ixgbe_exit_module);