X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_pmd_e1000%2Figb_ethdev.c;h=4415155c02ea02208282b7e40dd975f03c8e76c9;hb=48262b5a8b91ae41be13b9ed3c7a952d4becabfa;hp=fc31e11eb4750559a939ed3f6cce07f4739d9b13;hpb=fdaa76971a738c51fa3cb82111e92c259e1013d0;p=dpdk.git diff --git a/lib/librte_pmd_e1000/igb_ethdev.c b/lib/librte_pmd_e1000/igb_ethdev.c index fc31e11eb4..4415155c02 100644 --- a/lib/librte_pmd_e1000/igb_ethdev.c +++ b/lib/librte_pmd_e1000/igb_ethdev.c @@ -47,7 +47,6 @@ #include #include #include -#include #include #include #include @@ -217,26 +216,26 @@ static enum e1000_fc_mode igb_fc_setting = e1000_fc_full; /* * The set of PCI devices this driver supports */ -static struct rte_pci_id pci_id_igb_map[] = { +static const struct rte_pci_id pci_id_igb_map[] = { #define RTE_PCI_DEV_ID_DECL_IGB(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, #include "rte_pci_dev_ids.h" -{.device_id = 0}, +{0}, }; /* * The set of PCI devices this driver supports (for 82576&I350 VF) */ -static struct rte_pci_id pci_id_igbvf_map[] = { +static const struct rte_pci_id pci_id_igbvf_map[] = { #define RTE_PCI_DEV_ID_DECL_IGBVF(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, #include "rte_pci_dev_ids.h" -{.device_id = 0}, +{0}, }; -static struct eth_dev_ops eth_igb_ops = { +static const struct eth_dev_ops eth_igb_ops = { .dev_configure = eth_igb_configure, .dev_start = eth_igb_start, .dev_stop = eth_igb_stop, @@ -276,7 +275,7 @@ static struct eth_dev_ops eth_igb_ops = { * dev_ops for virtual function, bare necessities for basic vf * operation have been implemented */ -static struct eth_dev_ops igbvf_eth_dev_ops = { +static const struct eth_dev_ops igbvf_eth_dev_ops = { .dev_configure = igbvf_dev_configure, .dev_start = igbvf_dev_start, .dev_stop = igbvf_dev_stop, @@ -453,8 +452,7 @@ igb_reset_swfw_lock(struct e1000_hw *hw) } static int -eth_igb_dev_init(__attribute__((unused)) struct eth_driver *eth_drv, - struct rte_eth_dev *eth_dev) +eth_igb_dev_init(struct rte_eth_dev *eth_dev) { int error = 0; struct rte_pci_device *pci_dev; @@ -614,8 +612,7 @@ err_late: * Virtual Function device init */ static int -eth_igbvf_dev_init(__attribute__((unused)) struct eth_driver *eth_drv, - struct rte_eth_dev *eth_dev) +eth_igbvf_dev_init(struct rte_eth_dev *eth_dev) { struct rte_pci_device *pci_dev; struct e1000_hw *hw = @@ -948,7 +945,10 @@ eth_igb_stop(struct rte_eth_dev *dev) } /* Power down the phy. Needed to make the link go Down */ - e1000_power_down_phy(hw); + if (hw->phy.media_type == e1000_media_type_copper) + e1000_power_down_phy(hw); + else + e1000_shutdown_fiber_serdes_link(hw); igb_dev_clear_queues(dev); @@ -1378,6 +1378,7 @@ eth_igb_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) break; } dev_info->reta_size = ETH_RSS_RETA_SIZE_128; + dev_info->flow_type_rss_offloads = IGB_RSS_OFFLOAD_ALL; dev_info->default_rxconf = (struct rte_eth_rxconf) { .rx_thresh = { @@ -2910,7 +2911,7 @@ eth_igb_flex_filter_handle(struct rte_eth_dev *dev, struct rte_eth_flex_filter *filter; int ret = 0; - MAC_TYPE_FILTER_SUP(hw->mac.type); + MAC_TYPE_FILTER_SUP_EXT(hw->mac.type); if (filter_op == RTE_ETH_FILTER_NOP) return ret;