/*******************************************************************************
Intel(R) Gigabit Ethernet Linux driver
Copyright(c) 2007-2013 Intel Corporation.
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
version 2, as published by the Free Software Foundation.
This program is distributed in the hope it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
the file called "COPYING".
Contact Information:
e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
*******************************************************************************/
#include <linux/module.h>
#include <linux/types.h>
#include <linux/init.h>
#include <linux/vmalloc.h>
#include <linux/pagemap.h>
#include <linux/netdevice.h>
#include <linux/tcp.h>
#ifdef NETIF_F_TSO
#include <net/checksum.h>
#ifdef NETIF_F_TSO6
#include <linux/ipv6.h>
#include <net/ip6_checksum.h>
#endif
#endif
#ifdef SIOCGMIIPHY
#include <linux/mii.h>
#endif
#ifdef SIOCETHTOOL
#include <linux/ethtool.h>
#endif
#include <linux/if_vlan.h>
#ifdef CONFIG_PM_RUNTIME
#include <linux/pm_runtime.h>
#endif /* CONFIG_PM_RUNTIME */
#include <linux/if_bridge.h>
#include "igb.h"
#include "igb_vmdq.h"
#include <linux/uio_driver.h>
#if defined(DEBUG) || defined (DEBUG_DUMP) || defined (DEBUG_ICR) || defined(DEBUG_ITR)
#define DRV_DEBUG "_debug"
#else
#define DRV_DEBUG
#endif
#define DRV_HW_PERF
#define VERSION_SUFFIX
#define MAJ 5
#define MIN 0
#define BUILD 6
#define DRV_VERSION __stringify(MAJ) "." __stringify(MIN) "." __stringify(BUILD) VERSION_SUFFIX DRV_DEBUG DRV_HW_PERF
char igb_driver_name[] = "igb";
char igb_driver_version[] = DRV_VERSION;
static const char igb_driver_string[] =
"Intel(R) Gigabit Ethernet Network Driver";
static const char igb_copyright[] =
"Copyright (c) 2007-2013 Intel Corporation.";
static DEFINE_PCI_DEVICE_TABLE(igb_pci_tbl) = {
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_I354_BACKPLANE_1GBPS) },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_I354_SGMII) },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_I354_BACKPLANE_2_5GBPS) },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_I210_COPPER) },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_I210_FIBER) },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_I210_SERDES) },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_I210_SGMII) },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_I210_COPPER_FLASHLESS) },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_I210_SERDES_FLASHLESS) },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_I211_COPPER) },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_I350_COPPER) },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_I350_FIBER) },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_I350_SERDES) },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_I350_SGMII) },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82580_COPPER) },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82580_FIBER) },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82580_QUAD_FIBER) },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82580_SERDES) },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82580_SGMII) },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82580_COPPER_DUAL) },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_DH89XXCC_SGMII) },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_DH89XXCC_SERDES) },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_DH89XXCC_BACKPLANE) },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_DH89XXCC_SFP) },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82576) },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82576_NS) },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82576_NS_SERDES) },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82576_FIBER) },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82576_SERDES) },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82576_SERDES_QUAD) },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82576_QUAD_COPPER_ET2) },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82576_QUAD_COPPER) },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82575EB_COPPER) },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82575EB_FIBER_SERDES) },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82575GB_QUAD_COPPER) },
/* required last entry */
{0, }
};
//MODULE_DEVICE_TABLE(pci, igb_pci_tbl);
static void igb_set_sriov_capability(struct igb_adapter *adapter) __attribute__((__unused__));
void igb_reset(struct igb_adapter *);
static int igb_setup_all_tx_resources(struct igb_adapter *);
static int igb_setup_all_rx_resources(struct igb_adapter *);
static void igb_free_all_tx_resources(struct igb_adapter *);
static void igb_free_all_rx_resources(struct igb_adapter *);
static void igb_setup_mrqc(struct igb_adapter *);
void igb_update_stats(struct igb_adapter *);
static int igb_probe(struct pci_dev *, const struct pci_device_id *);
static void __devexit igb_remove(struct pci_dev *pdev);
static int igb_sw_init(struct igb_adapter *);
static int igb_open(struct net_device *);
static int igb_close(struct net_device *);
static void igb_configure(struct igb_adapter *);
static void igb_configure_tx(struct igb_adapter *);
static void igb_configure_rx(struct igb_adapter *);
static void igb_clean_all_tx_rings(struct igb_adapter *);
static void igb_clean_all_rx_rings(struct igb_adapter *);
static void igb_clean_tx_ring(struct igb_ring *);
static void igb_set_rx_mode(struct net_device *);
static void igb_update_phy_info(unsigned long);
static void igb_watchdog(unsigned long);
static void igb_watchdog_task(struct work_struct *);
static void igb_dma_err_task(struct work_struct *);
static void igb_dma_err_timer(unsigned long data);
static netdev_tx_t igb_xmit_frame(struct sk_buff *skb, struct net_device *);
static struct net_device_stats *igb_get_stats(struct net_device *);
static int igb_change_mtu(struct net_device *, int);
void igb_full_sync_mac_table(struct igb_adapter *adapter);
static int igb_set_mac(struct net_device *, void *);
static void igb_set_uta(struct igb_adapter *adapter);
static irqreturn_t igb_intr(int irq, void *);
static irqreturn_t igb_intr_msi(int irq, void *);
static irqreturn_t igb_msix_other(int irq, void *);
static irqreturn_t igb_msix_ring(int irq, void *);
#ifdef IGB_DCA
static void igb_update_dca(struct igb_q_vector *);
static void igb_setup_dca(struct igb_adapter *);
#endif /* IGB_DCA */
static int igb_poll(struct napi_struct *, int);
static bool igb_clean_tx_irq(struct igb_q_vector *);
static bool igb_clean_rx_irq(struct igb_q_vector *, int);
static int igb_ioctl(struct net_device *, struct ifreq *, int cmd);
static void igb_tx_timeout(struct net_device *);
static void igb_reset_task(struct work_struct *);
#ifdef HAVE_VLAN_RX_REGISTER
static void igb_vlan_mode(struct net_device *, struct vlan_group *);
#endif
#ifdef HAVE_VLAN_PROTOCOL
static int igb_vlan_rx_add_vid(struct net_device *,
__be16 proto, u16);
static int igb_vlan_rx_kill_vid(struct net_device *,
__be16 proto, u16);
#elif defined HAVE_INT_NDO_VLAN_RX_ADD_VID
#ifdef NETIF_F_HW_VLAN_CTAG_RX
static int igb_vlan_rx_add_vid(struct net_device *,
__always_unused __be16 proto, u16);
static int igb_vlan_rx_kill_vid(struct net_device *,
__always_unused __be16 proto, u16);
#else
static int igb_vlan_rx_add_vid(struct net_device *, u16);
static int igb_vlan_rx_kill_vid(struct net_device *, u16);
#endif
#else
static void igb_vlan_rx_add_vid(struct net_device *, u16);
static void igb_vlan_rx_kill_vid(struct net_device *, u16);
#endif
static void igb_restore_vlan(struct igb_adapter *);
void igb_rar_set(struct igb_adapter *adapter, u32 index);
static void igb_ping_all_vfs(struct igb_adapter *);
static void igb_msg_task(struct igb_adapter *);
static void igb_vmm_control(struct igb_adapter *);
static int igb_set_vf_mac(struct igb_adapter *, int, unsigned
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
dpdk-1.7.0.tar.gz (881个子文件)
BSDmakefile 2KB
BSDmakefile 2KB
igb_main.c 279KB
cmdline.c 234KB
e1000_ich8lan.c 149KB
i40e_common.c 147KB
ixgbe_common.c 126KB
test_link_bonding.c 119KB
e1000_phy.c 117KB
ixgbe_rxtx.c 116KB
ixgbe_ethdev.c 113KB
ixgbe_common.c 112KB
i40e_ethdev.c 109KB
e1000_82575.c 99KB
e1000_82575.c 98KB
e1000_phy.c 92KB
main.c 89KB
igb_ethdev.c 86KB
ixgbe_ethtool.c 84KB
ixgbe_main.c 83KB
igb_ethtool.c 77KB
rte_ethdev.c 75KB
ixgbe_82599.c 74KB
ixgbe_82599.c 69KB
main.c 68KB
igb_rxtx.c 67KB
e1000_mac.c 67KB
e1000_mac.c 63KB
i40e_rxtx.c 61KB
rte_sched.c 61KB
e1000_82571.c 56KB
config.c 55KB
main.c 55KB
ixgbe_phy.c 54KB
cmdline.c 53KB
testpmd.c 52KB
em_rxtx.c 52KB
test_red.c 50KB
test_lpm6.c 49KB
ixgbe_phy.c 48KB
i40e_lan_hmc.c 47KB
acl_bld.c 47KB
main.c 44KB
main.c 44KB
e1000_82543.c 44KB
em_ethdev.c 42KB
e1000_80003es2lan.c 42KB
eal_memory.c 42KB
ixgbe_82598.c 41KB
i40e_ethdev_vf.c 40KB
test_hash.c 37KB
rte_table_hash_key8.c 37KB
e1000_api.c 37KB
ixgbe_82598.c 36KB
test_eal_flags.c 36KB
e1000_nvm.c 35KB
main.c 35KB
kcompat.c 35KB
e1000_82541.c 35KB
ixgbe_api.c 35KB
virtio-net.c 34KB
test_hash_perf.c 34KB
test_lpm.c 34KB
test_ring.c 34KB
ixgbe_api.c 34KB
test_cmdline_cirbuf.c 33KB
rte_pipeline.c 33KB
rte_eth_bond_pmd.c 32KB
eal.c 32KB
parameters.c 32KB
i40e_dcb.c 32KB
e1000_api.c 31KB
rte_table_hash_ext.c 31KB
i40e_adminq.c 31KB
rte_table_hash_key32.c 31KB
main.c 30KB
rte_table_hash_key16.c 30KB
test_memzone.c 29KB
virtio_ethdev.c 29KB
kcompat.c 29KB
kcompat_ethtool.c 29KB
rte_table_hash_lru.c 29KB
crypto.c 29KB
main.c 28KB
ixgbe_x540.c 28KB
ixgbe_fdir.c 28KB
i40e_nvm.c 27KB
e1000_i210.c 27KB
vmxnet3_rxtx.c 27KB
igb_ptp.c 27KB
acl_run.c 27KB
i40e_pf.c 26KB
main.c 26KB
test_malloc.c 26KB
main.c 26KB
host.c 26KB
eal.c 26KB
ixgbe_x540.c 25KB
main.c 25KB
config.c 25KB
共 881 条
- 1
- 2
- 3
- 4
- 5
- 6
- 9
morre
- 粉丝: 187
- 资源: 2337
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
前往页