svn commit: r284049 - in head/sys: dev/ixl modules/ixl modules/ixlv
Author: jfv Date: Fri Jun 5 22:52:42 2015 New Revision: 284049 URL: https://svnweb.freebsd.org/changeset/base/284049 Log: Update SW4 to the Intel ixl/ixlv drivers. This is primarily a shared code update, with supporting changes in the CORE. Changes for the extended media types, VF driver has virtual channel protocol changes, and some register use corrections. This software change should be coordinated with Firmware updates to your hardware, contact your support channels for that. MFC after:1 week Added: head/sys/dev/ixl/i40e_devids.h (contents, props changed) Modified: head/sys/dev/ixl/i40e_adminq.c head/sys/dev/ixl/i40e_adminq.h head/sys/dev/ixl/i40e_adminq_cmd.h head/sys/dev/ixl/i40e_common.c head/sys/dev/ixl/i40e_hmc.c head/sys/dev/ixl/i40e_hmc.h head/sys/dev/ixl/i40e_lan_hmc.c head/sys/dev/ixl/i40e_nvm.c head/sys/dev/ixl/i40e_osdep.h head/sys/dev/ixl/i40e_prototype.h head/sys/dev/ixl/i40e_register.h head/sys/dev/ixl/i40e_type.h head/sys/dev/ixl/i40e_virtchnl.h head/sys/dev/ixl/if_ixl.c head/sys/dev/ixl/if_ixlv.c head/sys/dev/ixl/ixlv.h head/sys/dev/ixl/ixlvc.c head/sys/modules/ixl/Makefile head/sys/modules/ixlv/Makefile Modified: head/sys/dev/ixl/i40e_adminq.c == --- head/sys/dev/ixl/i40e_adminq.c Fri Jun 5 21:45:35 2015 (r284048) +++ head/sys/dev/ixl/i40e_adminq.c Fri Jun 5 22:52:42 2015 (r284049) @@ -315,8 +315,12 @@ static enum i40e_status_code i40e_config wr32(hw, hw->aq.asq.tail, 0); /* set starting point */ - wr32(hw, hw->aq.asq.len, (hw->aq.num_asq_entries | - I40E_PF_ATQLEN_ATQENABLE_MASK)); + if (!i40e_is_vf(hw)) + wr32(hw, hw->aq.asq.len, (hw->aq.num_asq_entries | + I40E_PF_ATQLEN_ATQENABLE_MASK)); + if (i40e_is_vf(hw)) + wr32(hw, hw->aq.asq.len, (hw->aq.num_asq_entries | + I40E_VF_ATQLEN1_ATQENABLE_MASK)); wr32(hw, hw->aq.asq.bal, I40E_LO_DWORD(hw->aq.asq.desc_buf.pa)); wr32(hw, hw->aq.asq.bah, I40E_HI_DWORD(hw->aq.asq.desc_buf.pa)); @@ -344,8 +348,12 @@ static enum i40e_status_code i40e_config wr32(hw, hw->aq.arq.tail, 0); /* set starting point */ - wr32(hw, hw->aq.arq.len, (hw->aq.num_arq_entries | - I40E_PF_ARQLEN_ARQENABLE_MASK)); + if (!i40e_is_vf(hw)) + wr32(hw, hw->aq.arq.len, (hw->aq.num_arq_entries | + I40E_PF_ARQLEN_ARQENABLE_MASK)); + if (i40e_is_vf(hw)) + wr32(hw, hw->aq.arq.len, (hw->aq.num_arq_entries | + I40E_VF_ARQLEN1_ARQENABLE_MASK)); wr32(hw, hw->aq.arq.bal, I40E_LO_DWORD(hw->aq.arq.desc_buf.pa)); wr32(hw, hw->aq.arq.bah, I40E_HI_DWORD(hw->aq.arq.desc_buf.pa)); @@ -559,6 +567,7 @@ enum i40e_status_code i40e_init_adminq(s { enum i40e_status_code ret_code; u16 eetrack_lo, eetrack_hi; + u16 cfg_ptr, oem_hi, oem_lo; int retry = 0; /* verify input for valid configuration */ if ((hw->aq.num_arq_entries == 0) || @@ -619,6 +628,12 @@ enum i40e_status_code i40e_init_adminq(s i40e_read_nvm_word(hw, I40E_SR_NVM_EETRACK_LO, &eetrack_lo); i40e_read_nvm_word(hw, I40E_SR_NVM_EETRACK_HI, &eetrack_hi); hw->nvm.eetrack = (eetrack_hi << 16) | eetrack_lo; + i40e_read_nvm_word(hw, I40E_SR_BOOT_CONFIG_PTR, &cfg_ptr); + i40e_read_nvm_word(hw, (cfg_ptr + I40E_NVM_OEM_VER_OFF), + &oem_hi); + i40e_read_nvm_word(hw, (cfg_ptr + (I40E_NVM_OEM_VER_OFF + 1)), + &oem_lo); + hw->nvm.oem_ver = ((u32)oem_hi << 16) | oem_lo; if (hw->aq.api_maj_ver > I40E_FW_API_VERSION_MAJOR) { ret_code = I40E_ERR_FIRMWARE_API_VERSION; @@ -669,6 +684,9 @@ enum i40e_status_code i40e_shutdown_admi i40e_destroy_spinlock(&hw->aq.asq_spinlock); i40e_destroy_spinlock(&hw->aq.arq_spinlock); + if (hw->nvm_buff.va) + i40e_free_virt_mem(hw, &hw->nvm_buff); + return ret_code; } @@ -688,16 +706,16 @@ u16 i40e_clean_asq(struct i40e_hw *hw) desc = I40E_ADMINQ_DESC(*asq, ntc); details = I40E_ADMINQ_DETAILS(*asq, ntc); + while (rd32(hw, hw->aq.asq.head) != ntc) { i40e_debug(hw, I40E_DEBUG_AQ_MESSAGE, - "%s: ntc %d head %d.\n", __FUNCTION__, ntc, - rd32(hw, hw->aq.asq.head)); + "ntc %d head %d.\n", ntc, rd32(hw, hw->aq.asq.head)); if (details->callback) { I40E_ADMINQ_CALLBACK cb_func = (I40E_ADMINQ_CALLBACK)details->callback; - i40e_memcpy(&desc_cb, desc, -
svn commit: r283883 - in head/sys: dev/ixgbe modules/ixv
Author: jfv Date: Mon Jun 1 17:43:34 2015 New Revision: 283883 URL: https://svnweb.freebsd.org/changeset/base/283883 Log: Delta D2489 - Add SRIOV support to the Intel 10G driver. NOTE: This is a technology preview, while it has undergone development testing, Intel has not yet completed full validation of the feature. It is being integrated for early access and customer testing. Modified: head/sys/dev/ixgbe/if_ix.c head/sys/dev/ixgbe/if_ixv.c head/sys/dev/ixgbe/ix_txrx.c head/sys/dev/ixgbe/ixgbe.h head/sys/dev/ixgbe/ixgbe_mbx.h head/sys/dev/ixgbe/ixgbe_vf.c head/sys/modules/ixv/Makefile Modified: head/sys/dev/ixgbe/if_ix.c == --- head/sys/dev/ixgbe/if_ix.c Mon Jun 1 17:35:29 2015(r283882) +++ head/sys/dev/ixgbe/if_ix.c Mon Jun 1 17:43:34 2015(r283883) @@ -54,7 +54,7 @@ int ixgbe_display_debug_stat /* * Driver version */ -char ixgbe_driver_version[] = "2.8.3"; +char ixgbe_driver_version[] = "3.1.0"; /* * PCI Device ID Table @@ -138,6 +138,7 @@ static int ixgbe_setup_msix(struct adapt static voidixgbe_free_pci_resources(struct adapter *); static voidixgbe_local_timer(void *); static int ixgbe_setup_interface(device_t, struct adapter *); +static voidixgbe_config_gpie(struct adapter *); static voidixgbe_config_dmac(struct adapter *); static voidixgbe_config_delay_values(struct adapter *); static voidixgbe_config_link(struct adapter *); @@ -204,6 +205,18 @@ static voidixgbe_handle_phy(void *, int static voidixgbe_reinit_fdir(void *, int); #endif +#ifdef PCI_IOV +static voidixgbe_ping_all_vfs(struct adapter *); +static voidixgbe_handle_mbx(void *, int); +static int ixgbe_init_iov(device_t, u16, const nvlist_t *); +static voidixgbe_uninit_iov(device_t); +static int ixgbe_add_vf(device_t, u16, const nvlist_t *); +static voidixgbe_initialize_iov(struct adapter *); +static voidixgbe_recalculate_max_frame(struct adapter *); +static voidixgbe_init_vf(struct adapter *, struct ixgbe_vf *); +#endif /* PCI_IOV */ + + /* * FreeBSD Device Interface Entry Points */ @@ -216,6 +229,11 @@ static device_method_t ix_methods[] = { DEVMETHOD(device_shutdown, ixgbe_shutdown), DEVMETHOD(device_suspend, ixgbe_suspend), DEVMETHOD(device_resume, ixgbe_resume), +#ifdef PCI_IOV + DEVMETHOD(pci_init_iov, ixgbe_init_iov), + DEVMETHOD(pci_uninit_iov, ixgbe_uninit_iov), + DEVMETHOD(pci_add_vf, ixgbe_add_vf), +#endif /* PCI_IOV */ DEVMETHOD_END }; @@ -341,6 +359,8 @@ static int fdir_pballoc = 1; #include #endif /* DEV_NETMAP */ +static MALLOC_DEFINE(M_IXGBE, "ix", "ix driver allocations"); + /* * Device identification routine * @@ -472,7 +492,7 @@ ixgbe_attach(device_t dev) } /* Allocate multicast array memory. */ - adapter->mta = malloc(sizeof(u8) * IXGBE_ETH_LENGTH_OF_ADDRESS * + adapter->mta = malloc(sizeof(*adapter->mta) * MAX_NUM_MULTICAST_ADDRESSES, M_DEVBUF, M_NOWAIT); if (adapter->mta == NULL) { device_printf(dev, "Can not allocate multicast setup array\n"); @@ -558,6 +578,28 @@ ixgbe_attach(device_t dev) /* Set an initial default flow control value */ adapter->fc = ixgbe_fc_full; +#ifdef PCI_IOV + if ((hw->mac.type != ixgbe_mac_82598EB) && (adapter->msix > 1)) { + nvlist_t *pf_schema, *vf_schema; + + hw->mbx.ops.init_params(hw); + pf_schema = pci_iov_schema_alloc_node(); + vf_schema = pci_iov_schema_alloc_node(); + pci_iov_schema_add_unicast_mac(vf_schema, "mac-addr", 0, NULL); + pci_iov_schema_add_bool(vf_schema, "mac-anti-spoof", + IOV_SCHEMA_HASDEFAULT, TRUE); + pci_iov_schema_add_bool(vf_schema, "allow-set-mac", + IOV_SCHEMA_HASDEFAULT, FALSE); + pci_iov_schema_add_bool(vf_schema, "allow-promisc", + IOV_SCHEMA_HASDEFAULT, FALSE); + error = pci_iov_attach(dev, pf_schema, vf_schema); + if (error != 0) { + device_printf(dev, + "Error %d setting up SR-IOV\n", error); + } + } +#endif /* PCI_IOV */ + /* Check for certain supported features */ ixgbe_check_wol_support(adapter); ixgbe_check_eee_support(adapter); @@ -614,6 +656,13 @@ ixgbe_detach(device_t d
svn commit: r283882 - in head: head sys/dev/ixgbe sys/modules/ixv
Author: jfv Date: Mon Jun 1 17:35:29 2015 New Revision: 283882 URL: https://svnweb.freebsd.org/changeset/base/283882 Log: Revert last commit, to remove added skeleton tree. Deleted: head/head/ Modified: head/sys/dev/ixgbe/if_ix.c head/sys/dev/ixgbe/if_ixv.c head/sys/dev/ixgbe/ix_txrx.c head/sys/dev/ixgbe/ixgbe.h head/sys/dev/ixgbe/ixgbe_mbx.h head/sys/dev/ixgbe/ixgbe_vf.c head/sys/modules/ixv/Makefile Modified: head/sys/dev/ixgbe/if_ix.c == --- head/sys/dev/ixgbe/if_ix.c Mon Jun 1 17:15:25 2015(r283881) +++ head/sys/dev/ixgbe/if_ix.c Mon Jun 1 17:35:29 2015(r283882) @@ -54,7 +54,7 @@ int ixgbe_display_debug_stat /* * Driver version */ -char ixgbe_driver_version[] = "3.1.0"; +char ixgbe_driver_version[] = "2.8.3"; /* * PCI Device ID Table @@ -138,7 +138,6 @@ static int ixgbe_setup_msix(struct adapt static voidixgbe_free_pci_resources(struct adapter *); static voidixgbe_local_timer(void *); static int ixgbe_setup_interface(device_t, struct adapter *); -static voidixgbe_config_gpie(struct adapter *); static voidixgbe_config_dmac(struct adapter *); static voidixgbe_config_delay_values(struct adapter *); static voidixgbe_config_link(struct adapter *); @@ -205,18 +204,6 @@ static voidixgbe_handle_phy(void *, int static voidixgbe_reinit_fdir(void *, int); #endif -#ifdef PCI_IOV -static voidixgbe_ping_all_vfs(struct adapter *); -static voidixgbe_handle_mbx(void *, int); -static int ixgbe_init_iov(device_t, u16, const nvlist_t *); -static voidixgbe_uninit_iov(device_t); -static int ixgbe_add_vf(device_t, u16, const nvlist_t *); -static voidixgbe_initialize_iov(struct adapter *); -static voidixgbe_recalculate_max_frame(struct adapter *); -static voidixgbe_init_vf(struct adapter *, struct ixgbe_vf *); -#endif /* PCI_IOV */ - - /* * FreeBSD Device Interface Entry Points */ @@ -229,11 +216,6 @@ static device_method_t ix_methods[] = { DEVMETHOD(device_shutdown, ixgbe_shutdown), DEVMETHOD(device_suspend, ixgbe_suspend), DEVMETHOD(device_resume, ixgbe_resume), -#ifdef PCI_IOV - DEVMETHOD(pci_init_iov, ixgbe_init_iov), - DEVMETHOD(pci_uninit_iov, ixgbe_uninit_iov), - DEVMETHOD(pci_add_vf, ixgbe_add_vf), -#endif /* PCI_IOV */ DEVMETHOD_END }; @@ -359,8 +341,6 @@ static int fdir_pballoc = 1; #include #endif /* DEV_NETMAP */ -static MALLOC_DEFINE(M_IXGBE, "ix", "ix driver allocations"); - /* * Device identification routine * @@ -492,7 +472,7 @@ ixgbe_attach(device_t dev) } /* Allocate multicast array memory. */ - adapter->mta = malloc(sizeof(*adapter->mta) * + adapter->mta = malloc(sizeof(u8) * IXGBE_ETH_LENGTH_OF_ADDRESS * MAX_NUM_MULTICAST_ADDRESSES, M_DEVBUF, M_NOWAIT); if (adapter->mta == NULL) { device_printf(dev, "Can not allocate multicast setup array\n"); @@ -578,28 +558,6 @@ ixgbe_attach(device_t dev) /* Set an initial default flow control value */ adapter->fc = ixgbe_fc_full; -#ifdef PCI_IOV - if ((hw->mac.type != ixgbe_mac_82598EB) && (adapter->msix > 1)) { - nvlist_t *pf_schema, *vf_schema; - - hw->mbx.ops.init_params(hw); - pf_schema = pci_iov_schema_alloc_node(); - vf_schema = pci_iov_schema_alloc_node(); - pci_iov_schema_add_unicast_mac(vf_schema, "mac-addr", 0, NULL); - pci_iov_schema_add_bool(vf_schema, "mac-anti-spoof", - IOV_SCHEMA_HASDEFAULT, TRUE); - pci_iov_schema_add_bool(vf_schema, "allow-set-mac", - IOV_SCHEMA_HASDEFAULT, FALSE); - pci_iov_schema_add_bool(vf_schema, "allow-promisc", - IOV_SCHEMA_HASDEFAULT, FALSE); - error = pci_iov_attach(dev, pf_schema, vf_schema); - if (error != 0) { - device_printf(dev, - "Error %d setting up SR-IOV\n", error); - } - } -#endif /* PCI_IOV */ - /* Check for certain supported features */ ixgbe_check_wol_support(adapter); ixgbe_check_eee_support(adapter); @@ -656,13 +614,6 @@ ixgbe_detach(device_t dev) return (EBUSY); } -#ifdef PCI_IOV - if (pci_iov_detach(dev) != 0) { - device_printf(dev, "SR-IOV in use; detach first.\n"); - return (EBUSY); - }
svn commit: r283881 - in head: head head/sys head/sys/dev head/sys/dev/ixgbe head/sys/modules head/sys/modules/ixv sys/dev/ixgbe sys/modules/ixv
Author: jfv Date: Mon Jun 1 17:15:25 2015 New Revision: 283881 URL: https://svnweb.freebsd.org/changeset/base/283881 Log: Delta D2489 - Add SRIOV support to the Intel 10G driver. NOTE: This is a technology preview, while it has undergone development tests, Intel has not yet completed full validation of the feature. It is being integrated for early access and customer testing. Added: head/head/ head/head/sys/ head/head/sys/dev/ head/head/sys/dev/ixgbe/ head/head/sys/modules/ head/head/sys/modules/ixv/ Modified: head/sys/dev/ixgbe/if_ix.c head/sys/dev/ixgbe/if_ixv.c head/sys/dev/ixgbe/ix_txrx.c head/sys/dev/ixgbe/ixgbe.h head/sys/dev/ixgbe/ixgbe_mbx.h head/sys/dev/ixgbe/ixgbe_vf.c head/sys/modules/ixv/Makefile Modified: head/sys/dev/ixgbe/if_ix.c == --- head/sys/dev/ixgbe/if_ix.c Mon Jun 1 16:46:51 2015(r283880) +++ head/sys/dev/ixgbe/if_ix.c Mon Jun 1 17:15:25 2015(r283881) @@ -54,7 +54,7 @@ int ixgbe_display_debug_stat /* * Driver version */ -char ixgbe_driver_version[] = "2.8.3"; +char ixgbe_driver_version[] = "3.1.0"; /* * PCI Device ID Table @@ -138,6 +138,7 @@ static int ixgbe_setup_msix(struct adapt static voidixgbe_free_pci_resources(struct adapter *); static voidixgbe_local_timer(void *); static int ixgbe_setup_interface(device_t, struct adapter *); +static voidixgbe_config_gpie(struct adapter *); static voidixgbe_config_dmac(struct adapter *); static voidixgbe_config_delay_values(struct adapter *); static voidixgbe_config_link(struct adapter *); @@ -204,6 +205,18 @@ static voidixgbe_handle_phy(void *, int static voidixgbe_reinit_fdir(void *, int); #endif +#ifdef PCI_IOV +static voidixgbe_ping_all_vfs(struct adapter *); +static voidixgbe_handle_mbx(void *, int); +static int ixgbe_init_iov(device_t, u16, const nvlist_t *); +static voidixgbe_uninit_iov(device_t); +static int ixgbe_add_vf(device_t, u16, const nvlist_t *); +static voidixgbe_initialize_iov(struct adapter *); +static voidixgbe_recalculate_max_frame(struct adapter *); +static voidixgbe_init_vf(struct adapter *, struct ixgbe_vf *); +#endif /* PCI_IOV */ + + /* * FreeBSD Device Interface Entry Points */ @@ -216,6 +229,11 @@ static device_method_t ix_methods[] = { DEVMETHOD(device_shutdown, ixgbe_shutdown), DEVMETHOD(device_suspend, ixgbe_suspend), DEVMETHOD(device_resume, ixgbe_resume), +#ifdef PCI_IOV + DEVMETHOD(pci_init_iov, ixgbe_init_iov), + DEVMETHOD(pci_uninit_iov, ixgbe_uninit_iov), + DEVMETHOD(pci_add_vf, ixgbe_add_vf), +#endif /* PCI_IOV */ DEVMETHOD_END }; @@ -341,6 +359,8 @@ static int fdir_pballoc = 1; #include #endif /* DEV_NETMAP */ +static MALLOC_DEFINE(M_IXGBE, "ix", "ix driver allocations"); + /* * Device identification routine * @@ -472,7 +492,7 @@ ixgbe_attach(device_t dev) } /* Allocate multicast array memory. */ - adapter->mta = malloc(sizeof(u8) * IXGBE_ETH_LENGTH_OF_ADDRESS * + adapter->mta = malloc(sizeof(*adapter->mta) * MAX_NUM_MULTICAST_ADDRESSES, M_DEVBUF, M_NOWAIT); if (adapter->mta == NULL) { device_printf(dev, "Can not allocate multicast setup array\n"); @@ -558,6 +578,28 @@ ixgbe_attach(device_t dev) /* Set an initial default flow control value */ adapter->fc = ixgbe_fc_full; +#ifdef PCI_IOV + if ((hw->mac.type != ixgbe_mac_82598EB) && (adapter->msix > 1)) { + nvlist_t *pf_schema, *vf_schema; + + hw->mbx.ops.init_params(hw); + pf_schema = pci_iov_schema_alloc_node(); + vf_schema = pci_iov_schema_alloc_node(); + pci_iov_schema_add_unicast_mac(vf_schema, "mac-addr", 0, NULL); + pci_iov_schema_add_bool(vf_schema, "mac-anti-spoof", + IOV_SCHEMA_HASDEFAULT, TRUE); + pci_iov_schema_add_bool(vf_schema, "allow-set-mac", + IOV_SCHEMA_HASDEFAULT, FALSE); + pci_iov_schema_add_bool(vf_schema, "allow-promisc", + IOV_SCHEMA_HASDEFAULT, FALSE); + error = pci_iov_attach(dev, pf_schema, vf_schema); + if (error != 0) { + device_printf(dev, + "Error %d setting up SR-IOV\n", error); + } + } +#endif /* PCI_IOV */ + /* Check for certain supported features */
svn commit: r280228 - head/sys/dev/ixgbe
Author: jfv Date: Wed Mar 18 20:11:59 2015 New Revision: 280228 URL: https://svnweb.freebsd.org/changeset/base/280228 Log: Fix i386 LINT build issues, and remove unused variable. Modified: head/sys/dev/ixgbe/if_ixv.c head/sys/dev/ixgbe/ixgbe.h Modified: head/sys/dev/ixgbe/if_ixv.c == --- head/sys/dev/ixgbe/if_ixv.c Wed Mar 18 18:33:44 2015(r280227) +++ head/sys/dev/ixgbe/if_ixv.c Wed Mar 18 20:11:59 2015(r280228) @@ -1979,13 +1979,13 @@ ixv_add_stats_sysctls(struct adapter *ad struct sysctl_oid_list *stat_list, *queue_list; /* Driver Statistics */ - SYSCTL_ADD_UQUAD(ctx, child, OID_AUTO, "dropped", + SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "dropped", CTLFLAG_RD, &adapter->dropped_pkts, "Driver dropped packets"); - SYSCTL_ADD_UQUAD(ctx, child, OID_AUTO, "mbuf_defrag_failed", + SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "mbuf_defrag_failed", CTLFLAG_RD, &adapter->mbuf_defrag_failed, "m_defrag() failed"); - SYSCTL_ADD_UQUAD(ctx, child, OID_AUTO, "watchdog_events", + SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "watchdog_events", CTLFLAG_RD, &adapter->watchdog_events, "Watchdog timeouts"); Modified: head/sys/dev/ixgbe/ixgbe.h == --- head/sys/dev/ixgbe/ixgbe.h Wed Mar 18 18:33:44 2015(r280227) +++ head/sys/dev/ixgbe/ixgbe.h Wed Mar 18 20:11:59 2015(r280228) @@ -323,9 +323,8 @@ struct tx_ring { u32 bytes; /* used for AIM */ u32 packets; /* Soft Stats */ - unsigned long tx_bytes; + u64 tx_bytes; unsigned long tso_tx; - unsigned long no_tx_map_avail; unsigned long no_tx_dma_setup; u64 no_desc_avail; u64 total_packets; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r280226 - in head/sys: mips/conf modules powerpc/conf
Author: jfv Date: Wed Mar 18 16:54:03 2015 New Revision: 280226 URL: https://svnweb.freebsd.org/changeset/base/280226 Log: Correct the ixgbe entries in mips and powerpc, and add the module entries in i386/amd64 in the Makefile Modified: head/sys/mips/conf/OCTEON1 head/sys/modules/Makefile head/sys/powerpc/conf/GENERIC64 Modified: head/sys/mips/conf/OCTEON1 == --- head/sys/mips/conf/OCTEON1 Wed Mar 18 16:06:04 2015(r280225) +++ head/sys/mips/conf/OCTEON1 Wed Mar 18 16:54:03 2015(r280226) @@ -196,7 +196,8 @@ device octm device de # DEC/Intel DC21x4x (``Tulip'') device em # Intel PRO/1000 Gigabit Ethernet Family device igb # Intel PRO/1000 PCIE Server Gigabit Family -device ixgbe # Intel PRO/10GbE PCIE Ethernet Family +device ix # Intel PRO/10GbE PF PCIE Ethernet Family +device ixv # Intel PRO/10GbE VF PCIE Ethernet Family device le # AMD Am7900 LANCE and Am79C9xx PCnet device ti # Alteon Networks Tigon I/II gigabit Ethernet device txp # 3Com 3cR990 (``Typhoon'') Modified: head/sys/modules/Makefile == --- head/sys/modules/Makefile Wed Mar 18 16:06:04 2015(r280225) +++ head/sys/modules/Makefile Wed Mar 18 16:54:03 2015(r280226) @@ -511,6 +511,8 @@ _io=io .if ${MK_OFED} != "no" || defined(ALL_MODULES) _ipoib= ipoib .endif +_ix= ix +_ixv= ixv _linprocfs=linprocfs _linsysfs= linsysfs _linux=linux Modified: head/sys/powerpc/conf/GENERIC64 == --- head/sys/powerpc/conf/GENERIC64 Wed Mar 18 16:06:04 2015 (r280225) +++ head/sys/powerpc/conf/GENERIC64 Wed Mar 18 16:54:03 2015 (r280226) @@ -136,7 +136,8 @@ device uart_z8530 # Ethernet hardware device em # Intel PRO/1000 Gigabit Ethernet Family device igb # Intel PRO/1000 PCIE Server Gigabit Family -device ixgbe # Intel PRO/10GbE PCIE Ethernet Family +device ix # Intel PRO/10GbE PCIE PF Ethernet Family +device ixv # Intel PRO/10GbE PCIE VF Ethernet Family device glc # Sony Playstation 3 Ethernet device llan# IBM pSeries Virtual Ethernet ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r280197 - in head/sys: dev/ixgbe modules
Author: jfv Date: Tue Mar 17 22:40:50 2015 New Revision: 280197 URL: https://svnweb.freebsd.org/changeset/base/280197 Log: Resolve a few build issues, add module directories back into Makefile, then correct a NETMAP problem resulting from the split, and finally temporarily disable the X550 functionality. Modified: head/sys/dev/ixgbe/if_ixv.c head/sys/dev/ixgbe/ix_txrx.c head/sys/dev/ixgbe/ixgbe_api.c head/sys/modules/Makefile Modified: head/sys/dev/ixgbe/if_ixv.c == --- head/sys/dev/ixgbe/if_ixv.c Tue Mar 17 22:00:11 2015(r280196) +++ head/sys/dev/ixgbe/if_ixv.c Tue Mar 17 22:40:50 2015(r280197) @@ -285,7 +285,7 @@ ixv_attach(device_t dev) SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), - OID_AUTO, "enable_aim", CTLTYPE_INT|CTLFLAG_RW, + OID_AUTO, "enable_aim", CTLFLAG_RW, &ixv_enable_aim, 1, "Interrupt Moderation"); /* Set up the timer callout */ Modified: head/sys/dev/ixgbe/ix_txrx.c == --- head/sys/dev/ixgbe/ix_txrx.cTue Mar 17 22:00:11 2015 (r280196) +++ head/sys/dev/ixgbe/ix_txrx.cTue Mar 17 22:40:50 2015 (r280197) @@ -45,6 +45,12 @@ #include #endif +#ifdef DEV_NETMAP +#include +#include +#include +#endif + /* ** HW RSC control: ** this feature only works with @@ -1233,6 +1239,7 @@ ixgbe_setup_hw_rsc(struct rx_ring *rxr) rdrxctl = IXGBE_READ_REG(hw, IXGBE_RDRXCTL); rdrxctl &= ~IXGBE_RDRXCTL_RSCFRSTSIZE; #ifdef DEV_NETMAP /* crcstrip is optional in netmap */ + extern int ix_crcstrip; if (adapter->ifp->if_capenable & IFCAP_NETMAP && !ix_crcstrip) #endif /* DEV_NETMAP */ rdrxctl |= IXGBE_RDRXCTL_CRCSTRIP; Modified: head/sys/dev/ixgbe/ixgbe_api.c == --- head/sys/dev/ixgbe/ixgbe_api.c Tue Mar 17 22:00:11 2015 (r280196) +++ head/sys/dev/ixgbe/ixgbe_api.c Tue Mar 17 22:40:50 2015 (r280197) @@ -81,6 +81,7 @@ s32 ixgbe_init_shared_code(struct ixgbe_ case ixgbe_mac_X540: status = ixgbe_init_ops_X540(hw); break; +#if 0 //JFV temporary disable case ixgbe_mac_X550: status = ixgbe_init_ops_X550(hw); break; @@ -88,6 +89,7 @@ s32 ixgbe_init_shared_code(struct ixgbe_ case ixgbe_mac_X550EM_a: status = ixgbe_init_ops_X550EM(hw); break; +#endif case ixgbe_mac_82599_vf: case ixgbe_mac_X540_vf: case ixgbe_mac_X550_vf: Modified: head/sys/modules/Makefile == --- head/sys/modules/Makefile Tue Mar 17 22:00:11 2015(r280196) +++ head/sys/modules/Makefile Tue Mar 17 22:40:50 2015(r280197) @@ -175,6 +175,8 @@ SUBDIR= \ ${_iwn} \ ${_iwnfw} \ ${_ixgb} \ + ${_ix} \ + ${_ixv} \ ${_ixl} \ ${_ixlv} \ jme \ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r280182 - in head/sys: amd64/conf conf dev/ixgbe modules/ix modules/ixgbe modules/ixv
Author: jfv Date: Tue Mar 17 18:32:28 2015 New Revision: 280182 URL: https://svnweb.freebsd.org/changeset/base/280182 Log: Update to the Intel ixgbe driver: - Split the driver into independent pf and vf loadables. This is in preparation for SRIOV support which will be following shortly. This also allows us to keep a seperate revision control over the two parts, making for easier sustaining. - Make the TX/RX code a shared/seperated file, in the old code base the ixv code would miss fixes that went into ixgbe, this model will eliminate that problem. - The driver loadables will now match the device names, something that has been requested for some time. - Rather than a modules/ixgbe there is now modules/ix and modules/ixv - It will also be possible to make your static kernel with only one or the other for streamlined installs, or both. Enjoy! Submitted by: jfv and erj Added: head/sys/dev/ixgbe/if_ix.c (contents, props changed) head/sys/dev/ixgbe/if_ixv.c (contents, props changed) head/sys/dev/ixgbe/ix_txrx.c (contents, props changed) head/sys/modules/ix/ head/sys/modules/ix/Makefile (contents, props changed) head/sys/modules/ixv/ head/sys/modules/ixv/Makefile (contents, props changed) Deleted: head/sys/dev/ixgbe/ixgbe.c head/sys/dev/ixgbe/ixv.c head/sys/dev/ixgbe/ixv.h head/sys/modules/ixgbe/ Modified: head/sys/amd64/conf/GENERIC head/sys/conf/NOTES head/sys/conf/files head/sys/dev/ixgbe/LICENSE head/sys/dev/ixgbe/ixgbe.h head/sys/dev/ixgbe/ixgbe_82598.c head/sys/dev/ixgbe/ixgbe_82598.h head/sys/dev/ixgbe/ixgbe_82599.c head/sys/dev/ixgbe/ixgbe_82599.h head/sys/dev/ixgbe/ixgbe_api.c head/sys/dev/ixgbe/ixgbe_api.h head/sys/dev/ixgbe/ixgbe_common.c head/sys/dev/ixgbe/ixgbe_common.h head/sys/dev/ixgbe/ixgbe_dcb.c head/sys/dev/ixgbe/ixgbe_dcb.h head/sys/dev/ixgbe/ixgbe_dcb_82598.c head/sys/dev/ixgbe/ixgbe_dcb_82598.h head/sys/dev/ixgbe/ixgbe_dcb_82599.c head/sys/dev/ixgbe/ixgbe_dcb_82599.h head/sys/dev/ixgbe/ixgbe_mbx.c head/sys/dev/ixgbe/ixgbe_mbx.h head/sys/dev/ixgbe/ixgbe_phy.c head/sys/dev/ixgbe/ixgbe_phy.h head/sys/dev/ixgbe/ixgbe_type.h head/sys/dev/ixgbe/ixgbe_vf.c head/sys/dev/ixgbe/ixgbe_vf.h head/sys/dev/ixgbe/ixgbe_x540.c head/sys/dev/ixgbe/ixgbe_x540.h Modified: head/sys/amd64/conf/GENERIC == --- head/sys/amd64/conf/GENERIC Tue Mar 17 15:48:19 2015(r280181) +++ head/sys/amd64/conf/GENERIC Tue Mar 17 18:32:28 2015(r280182) @@ -216,7 +216,8 @@ device bxe # Broadcom NetXtreme II BC device de # DEC/Intel DC21x4x (``Tulip'') device em # Intel PRO/1000 Gigabit Ethernet Family device igb # Intel PRO/1000 PCIE Server Gigabit Family -device ixgbe # Intel PRO/10GbE PCIE Ethernet Family +device ix # Intel PRO/10GbE PCIE PF Ethernet +device ixv # Intel PRO/10GbE PCIE VF Ethernet device ixl # Intel XL710 40Gbe PCIE Ethernet device ixlv# Intel XL710 40Gbe VF PCIE Ethernet device le # AMD Am7900 LANCE and Am79C9xx PCnet Modified: head/sys/conf/NOTES == --- head/sys/conf/NOTES Tue Mar 17 15:48:19 2015(r280181) +++ head/sys/conf/NOTES Tue Mar 17 18:32:28 2015(r280182) @@ -2100,7 +2100,8 @@ devicede # DEC/Intel DC21x4x (``Tulip device em # Intel Pro/1000 Gigabit Ethernet device igb # Intel Pro/1000 PCIE Gigabit Ethernet device ixgb# Intel Pro/10Gbe PCI-X Ethernet -device ixgbe # Intel Pro/10Gbe PCIE Ethernet +device ix # Intel Pro/10Gbe PCIE Ethernet +device ixv # Intel Pro/10Gbe PCIE Ethernet VF device le # AMD Am7900 LANCE and Am79C9xx PCnet device mxge# Myricom Myri-10G 10GbE NIC device nxge# Neterion Xframe 10GbE Server/Storage Adapter Modified: head/sys/conf/files == --- head/sys/conf/files Tue Mar 17 15:48:19 2015(r280181) +++ head/sys/conf/files Tue Mar 17 18:32:28 2015(r280182) @@ -1769,31 +1769,31 @@ iwn6050.fw optional iwn6050fw | iwnfw dev/ixgb/if_ixgb.c optional ixgb dev/ixgb/ixgb_ee.c optional ixgb dev/ixgb/ixgb_hw.c optional ixgb -dev/ixgbe/ixgbe.c optional ixgbe inet \ +dev/ixgbe/if_ix.c optional ix inet \ compile-with "${NORM
svn commit: r279860 - head/sys/dev/ixl
Author: jfv Date: Tue Mar 10 19:55:43 2015 New Revision: 279860 URL: https://svnweb.freebsd.org/changeset/base/279860 Log: Replace the DEV_NETMAP code that accidentally got removed in the last commit. MFC after: 1 week Modified: head/sys/dev/ixl/if_ixl.c head/sys/dev/ixl/ixl_txrx.c Modified: head/sys/dev/ixl/if_ixl.c == --- head/sys/dev/ixl/if_ixl.c Tue Mar 10 19:49:25 2015(r279859) +++ head/sys/dev/ixl/if_ixl.c Tue Mar 10 19:55:43 2015(r279860) @@ -239,6 +239,11 @@ DRIVER_MODULE(ixl, pci, ixl_driver, ixl_ MODULE_DEPEND(ixl, pci, 1, 1, 1); MODULE_DEPEND(ixl, ether, 1, 1, 1); +#ifdef DEV_NETMAP +MODULE_DEPEND(ixl, netmap, 1, 1, 1); +#endif /* DEV_NETMAP */ + + /* ** Global reset mutex */ @@ -312,6 +317,10 @@ int ixl_atr_rate = 20; TUNABLE_INT("hw.ixl.atr_rate", &ixl_atr_rate); #endif +#ifdef DEV_NETMAP +#define NETMAP_IXL_MAIN /* only bring in one part of the netmap code */ +#include +#endif /* DEV_NETMAP */ static char *ixl_fc_string[6] = { "None", @@ -690,6 +699,10 @@ ixl_attach(device_t dev) } #endif +#ifdef DEV_NETMAP + ixl_netmap_attach(vsi); +#endif /* DEV_NETMAP */ + INIT_DEBUGOUT("ixl_attach: end"); return (0); @@ -779,6 +792,9 @@ ixl_detach(device_t dev) EVENTHANDLER_DEREGISTER(vlan_unconfig, vsi->vlan_detach); callout_drain(&pf->timer); +#ifdef DEV_NETMAP + netmap_detach(vsi->ifp); +#endif /* DEV_NETMAP */ ixl_free_pci_resources(pf); bus_generic_detach(dev); if_free(vsi->ifp); @@ -2776,6 +2792,15 @@ ixl_initialize_vsi(struct ixl_vsi *vsi) break; } wr32(vsi->hw, I40E_QRX_TAIL(que->me), 0); +#ifdef DEV_NETMAP + /* preserve queue */ + if (vsi->ifp->if_capenable & IFCAP_NETMAP) { + struct netmap_adapter *na = NA(vsi->ifp); + struct netmap_kring *kring = &na->rx_rings[i]; + int t = na->num_rx_desc - 1 - nm_kr_rxspace(kring); + wr32(vsi->hw, I40E_QRX_TAIL(que->me), t); + } else +#endif /* DEV_NETMAP */ wr32(vsi->hw, I40E_QRX_TAIL(que->me), que->num_desc - 1); } return (err); Modified: head/sys/dev/ixl/ixl_txrx.c == --- head/sys/dev/ixl/ixl_txrx.c Tue Mar 10 19:49:25 2015(r279859) +++ head/sys/dev/ixl/ixl_txrx.c Tue Mar 10 19:55:43 2015(r279860) @@ -62,6 +62,9 @@ static __inline void ixl_rx_discard(stru static __inline void ixl_rx_input(struct rx_ring *, struct ifnet *, struct mbuf *, u8); +#ifdef DEV_NETMAP +#include +#endif /* DEV_NETMAP */ /* ** Multiqueue Transmit driver @@ -484,12 +487,23 @@ fail: void ixl_init_tx_ring(struct ixl_queue *que) { +#ifdef DEV_NETMAP + struct netmap_adapter *na = NA(que->vsi->ifp); + struct netmap_slot *slot; +#endif /* DEV_NETMAP */ struct tx_ring *txr = &que->txr; struct ixl_tx_buf *buf; /* Clear the old ring contents */ IXL_TX_LOCK(txr); +#ifdef DEV_NETMAP + /* +* (under lock): if in netmap mode, do some consistency +* checks and set slot to entry 0 of the netmap ring. +*/ + slot = netmap_reset(na, NR_TX, que->me, 0); +#endif /* DEV_NETMAP */ bzero((void *)txr->base, (sizeof(struct i40e_tx_desc)) * que->num_desc); @@ -514,6 +528,19 @@ ixl_init_tx_ring(struct ixl_queue *que) m_freem(buf->m_head); buf->m_head = NULL; } +#ifdef DEV_NETMAP + /* +* In netmap mode, set the map for the packet buffer. +* NOTE: Some drivers (not this one) also need to set +* the physical buffer address in the NIC ring. +* netmap_idx_n2k() maps a nic index, i, into the corresponding +* netmap slot index, si +*/ + if (slot) { + int si = netmap_idx_n2k(&na->tx_rings[que->me], i); + netmap_load_map(na, buf->tag, buf->map, NMB(na, slot + si)); + } +#endif /* DEV_NETMAP */ /* Clear the EOP index */ buf->eop_index = -1; } @@ -825,6 +852,11 @@ ixl_txeof(struct ixl_queue *que) mtx_assert(&txr->mtx, MA_OWNED); +#ifdef DEV_NETMAP + // XXX todo: implement moderation + if (netmap_tx_irq(que->vsi->ifp, que->me)) + return FALSE; +#endif /* DEF_NETMAP */ /* These are not the descriptors you seek, move along :) */ if (txr->avail == que->num_desc) { @@ -1126,8 +1158,16 @@ ixl_init_rx_ring(struct ixl_queue *que) struct ixl_rx_buf *buf; bus_dma_segment_t pseg[1], hseg[1]
svn commit: r279858 - head/sys/dev/ixl
Author: jfv Date: Tue Mar 10 19:17:40 2015 New Revision: 279858 URL: https://svnweb.freebsd.org/changeset/base/279858 Log: This delta introduces SRIOV support, thanks to Ryan Stone of Sandvine for adding this major feature to the driver. Secondly, this updates the base driver with new 20G device support, and with the new firmware levels some changes to link handling and initialization were required. MFC after: 1 week Modified: head/sys/dev/ixl/i40e_adminq_cmd.h head/sys/dev/ixl/i40e_common.c head/sys/dev/ixl/i40e_prototype.h head/sys/dev/ixl/i40e_type.h head/sys/dev/ixl/if_ixl.c head/sys/dev/ixl/if_ixlv.c head/sys/dev/ixl/ixl.h head/sys/dev/ixl/ixl_pf.h head/sys/dev/ixl/ixl_txrx.c head/sys/dev/ixl/ixlv.h head/sys/dev/ixl/ixlvc.c Modified: head/sys/dev/ixl/i40e_adminq_cmd.h == --- head/sys/dev/ixl/i40e_adminq_cmd.h Tue Mar 10 17:45:46 2015 (r279857) +++ head/sys/dev/ixl/i40e_adminq_cmd.h Tue Mar 10 19:17:40 2015 (r279858) @@ -42,7 +42,7 @@ */ #define I40E_FW_API_VERSION_MAJOR 0x0001 -#define I40E_FW_API_VERSION_MINOR 0x0004 +#define I40E_FW_API_VERSION_MINOR 0x0002 struct i40e_aq_desc { __le16 flags; @@ -140,7 +140,12 @@ enum i40e_admin_queue_opc { i40e_aqc_opc_list_func_capabilities = 0x000A, i40e_aqc_opc_list_dev_capabilities = 0x000B, + i40e_aqc_opc_set_cppm_configuration = 0x0103, + i40e_aqc_opc_set_arp_proxy_entry= 0x0104, + i40e_aqc_opc_set_ns_proxy_entry = 0x0105, + /* LAA */ + i40e_aqc_opc_mng_laa= 0x0106, /* AQ obsolete */ i40e_aqc_opc_mac_address_read = 0x0107, i40e_aqc_opc_mac_address_write = 0x0108, @@ -265,6 +270,7 @@ enum i40e_admin_queue_opc { /* Tunnel commands */ i40e_aqc_opc_add_udp_tunnel = 0x0B00, i40e_aqc_opc_del_udp_tunnel = 0x0B01, + i40e_aqc_opc_tunnel_key_structure = 0x0B10, /* Async Events */ i40e_aqc_opc_event_lan_overflow = 0x1001, @@ -276,6 +282,8 @@ enum i40e_admin_queue_opc { i40e_aqc_opc_oem_ocbb_initialize= 0xFE03, /* debug commands */ + i40e_aqc_opc_debug_get_deviceid = 0xFF00, + i40e_aqc_opc_debug_set_mode = 0xFF01, i40e_aqc_opc_debug_read_reg = 0xFF03, i40e_aqc_opc_debug_write_reg= 0xFF04, i40e_aqc_opc_debug_modify_reg = 0xFF07, @@ -509,8 +517,7 @@ struct i40e_aqc_mac_address_read { #define I40E_AQC_SAN_ADDR_VALID0x20 #define I40E_AQC_PORT_ADDR_VALID 0x40 #define I40E_AQC_WOL_ADDR_VALID0x80 -#define I40E_AQC_MC_MAG_EN_VALID 0x100 -#define I40E_AQC_ADDR_VALID_MASK 0x1F0 +#define I40E_AQC_ADDR_VALID_MASK 0xf0 u8 reserved[6]; __le32 addr_high; __le32 addr_low; @@ -533,9 +540,7 @@ struct i40e_aqc_mac_address_write { #define I40E_AQC_WRITE_TYPE_LAA_ONLY 0x #define I40E_AQC_WRITE_TYPE_LAA_WOL0x4000 #define I40E_AQC_WRITE_TYPE_PORT 0x8000 -#define I40E_AQC_WRITE_TYPE_UPDATE_MC_MAG 0xC000 -#define I40E_AQC_WRITE_TYPE_MASK 0xC000 - +#define I40E_AQC_WRITE_TYPE_MASK 0xc000 __le16 mac_sah; __le32 mac_sal; u8 reserved[8]; @@ -1071,7 +1076,6 @@ struct i40e_aqc_set_vsi_promiscuous_mode __le16 seid; #define I40E_AQC_VSI_PROM_CMD_SEID_MASK0x3FF __le16 vlan_tag; -#define I40E_AQC_SET_VSI_VLAN_MASK 0x0FFF #define I40E_AQC_SET_VSI_VLAN_VALID0x8000 u8 reserved[8]; }; @@ -2066,12 +2070,6 @@ I40E_CHECK_CMD_LENGTH(i40e_aqc_lldp_star #define I40E_AQC_CEE_PFC_STATUS_MASK (0x7 << I40E_AQC_CEE_PFC_STATUS_SHIFT) #define I40E_AQC_CEE_APP_STATUS_SHIFT 0x8 #define I40E_AQC_CEE_APP_STATUS_MASK (0x7 << I40E_AQC_CEE_APP_STATUS_SHIFT) -#define I40E_AQC_CEE_FCOE_STATUS_SHIFT 0x8 -#define I40E_AQC_CEE_FCOE_STATUS_MASK (0x7 << I40E_AQC_CEE_FCOE_STATUS_SHIFT) -#define I40E_AQC_CEE_ISCSI_STATUS_SHIFT0xA -#define I40E_AQC_CEE_ISCSI_STATUS_MASK (0x7 << I40E_AQC_CEE_ISCSI_STATUS_SHIFT) -#define I40E_AQC_CEE_FIP_STATUS_SHIFT 0x10 -#define I40E_AQC_CEE_FIP_STATUS_MASK (0x7 << I40E_AQC_CEE_FIP_STATUS_SHIFT) struct i40e_aqc_get_cee_dcb_cfg_v1_resp { u8 reserved1; u8 oper_num_tc; Modified: head/sys/dev/ixl/i40e_common.c == --- head/sys/dev/ixl/i40e_common.c Tue Mar 10 17:45:46 2015 (r279857) +++ head/sys/dev/ixl/i40e_common.c Tue Mar 10 19:17:40 2015 (r279858) @@ -866,7 +866,7 @@ static enum i40e_media_type i40e_get_med return media; } -#define I40E_PF_RESET_WAIT_COUNT 110 +#define I40E_PF_RESET_WAIT_COUNT 200 /** * i40e_pf_reset - Reset the PF * @hw: pointer to t
svn commit: r279033 - head/sys/dev/ixl
Author: jfv Date: Fri Feb 20 00:40:26 2015 New Revision: 279033 URL: https://svnweb.freebsd.org/changeset/base/279033 Log: Bring the XL710 drivers up to the SW3 release level. MFC after: 1 week Modified: head/sys/dev/ixl/i40e_adminq.c head/sys/dev/ixl/i40e_adminq_cmd.h head/sys/dev/ixl/i40e_common.c head/sys/dev/ixl/i40e_lan_hmc.c head/sys/dev/ixl/i40e_prototype.h head/sys/dev/ixl/i40e_type.h head/sys/dev/ixl/if_ixl.c head/sys/dev/ixl/if_ixlv.c head/sys/dev/ixl/ixl.h head/sys/dev/ixl/ixl_pf.h head/sys/dev/ixl/ixl_txrx.c head/sys/dev/ixl/ixlvc.c Modified: head/sys/dev/ixl/i40e_adminq.c == --- head/sys/dev/ixl/i40e_adminq.c Fri Feb 20 00:12:59 2015 (r279032) +++ head/sys/dev/ixl/i40e_adminq.c Fri Feb 20 00:40:26 2015 (r279033) @@ -1,6 +1,6 @@ /** - Copyright (c) 2013-2014, Intel Corporation + Copyright (c) 2013-2015, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -614,7 +614,8 @@ enum i40e_status_code i40e_init_adminq(s goto init_adminq_free_arq; /* get the NVM version info */ - i40e_read_nvm_word(hw, I40E_SR_NVM_IMAGE_VERSION, &hw->nvm.version); + i40e_read_nvm_word(hw, I40E_SR_NVM_DEV_STARTER_VERSION, + &hw->nvm.version); i40e_read_nvm_word(hw, I40E_SR_NVM_EETRACK_LO, &eetrack_lo); i40e_read_nvm_word(hw, I40E_SR_NVM_EETRACK_HI, &eetrack_hi); hw->nvm.eetrack = (eetrack_hi << 16) | eetrack_lo; Modified: head/sys/dev/ixl/i40e_adminq_cmd.h == --- head/sys/dev/ixl/i40e_adminq_cmd.h Fri Feb 20 00:12:59 2015 (r279032) +++ head/sys/dev/ixl/i40e_adminq_cmd.h Fri Feb 20 00:40:26 2015 (r279033) @@ -1,6 +1,6 @@ /** - Copyright (c) 2013-2014, Intel Corporation + Copyright (c) 2013-2015, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -42,7 +42,7 @@ */ #define I40E_FW_API_VERSION_MAJOR 0x0001 -#define I40E_FW_API_VERSION_MINOR 0x0002 +#define I40E_FW_API_VERSION_MINOR 0x0004 struct i40e_aq_desc { __le16 flags; @@ -140,12 +140,7 @@ enum i40e_admin_queue_opc { i40e_aqc_opc_list_func_capabilities = 0x000A, i40e_aqc_opc_list_dev_capabilities = 0x000B, - i40e_aqc_opc_set_cppm_configuration = 0x0103, - i40e_aqc_opc_set_arp_proxy_entry= 0x0104, - i40e_aqc_opc_set_ns_proxy_entry = 0x0105, - /* LAA */ - i40e_aqc_opc_mng_laa= 0x0106, /* AQ obsolete */ i40e_aqc_opc_mac_address_read = 0x0107, i40e_aqc_opc_mac_address_write = 0x0108, @@ -270,7 +265,6 @@ enum i40e_admin_queue_opc { /* Tunnel commands */ i40e_aqc_opc_add_udp_tunnel = 0x0B00, i40e_aqc_opc_del_udp_tunnel = 0x0B01, - i40e_aqc_opc_tunnel_key_structure = 0x0B10, /* Async Events */ i40e_aqc_opc_event_lan_overflow = 0x1001, @@ -282,8 +276,6 @@ enum i40e_admin_queue_opc { i40e_aqc_opc_oem_ocbb_initialize= 0xFE03, /* debug commands */ - i40e_aqc_opc_debug_get_deviceid = 0xFF00, - i40e_aqc_opc_debug_set_mode = 0xFF01, i40e_aqc_opc_debug_read_reg = 0xFF03, i40e_aqc_opc_debug_write_reg= 0xFF04, i40e_aqc_opc_debug_modify_reg = 0xFF07, @@ -517,7 +509,8 @@ struct i40e_aqc_mac_address_read { #define I40E_AQC_SAN_ADDR_VALID0x20 #define I40E_AQC_PORT_ADDR_VALID 0x40 #define I40E_AQC_WOL_ADDR_VALID0x80 -#define I40E_AQC_ADDR_VALID_MASK 0xf0 +#define I40E_AQC_MC_MAG_EN_VALID 0x100 +#define I40E_AQC_ADDR_VALID_MASK 0x1F0 u8 reserved[6]; __le32 addr_high; __le32 addr_low; @@ -540,7 +533,9 @@ struct i40e_aqc_mac_address_write { #define I40E_AQC_WRITE_TYPE_LAA_ONLY 0x #define I40E_AQC_WRITE_TYPE_LAA_WOL0x4000 #define I40E_AQC_WRITE_TYPE_PORT 0x8000 -#define I40E_AQC_WRITE_TYPE_MASK 0xc000 +#define I40E_AQC_WRITE_TYPE_UPDATE_MC_MAG 0xC000 +#define I40E_AQC_WRITE_TYPE_MASK 0xC000 + __le16 mac_sah; __le32 mac_sal; u8 reserved[8]; @@ -1076,6 +1071,7 @@ struct i40e_aqc_set_vsi_promiscuous_mode __le16 seid; #define I40E_AQC_VSI_PROM_CMD_SEID_MASK0x3FF __le16 vlan_tag; +#define I40E_AQC_SET_VSI_VLAN_MASK 0x0FFF #define I40E_AQC_SET_VSI_VLAN_VALID0x8000 u8 reserved[8]; }; @@ -2070,6 +2066,12 @@ I40E_CHECK_CMD_LENGTH(i40e_aqc_lldp_s
svn commit: r277262 - head/sys/dev/ixl
Author: jfv Date: Fri Jan 16 19:11:58 2015 New Revision: 277262 URL: https://svnweb.freebsd.org/changeset/base/277262 Log: Some RSS issues discovered by Adrian, missing header, variable names fat fingered, incorrect hash config setup. Thanks :) MFC after: 1 week Modified: head/sys/dev/ixl/if_ixl.c head/sys/dev/ixl/if_ixlv.c head/sys/dev/ixl/ixl_txrx.c Modified: head/sys/dev/ixl/if_ixl.c == --- head/sys/dev/ixl/if_ixl.c Fri Jan 16 19:07:13 2015(r277261) +++ head/sys/dev/ixl/if_ixl.c Fri Jan 16 19:11:58 2015(r277262) @@ -38,6 +38,10 @@ #include "ixl.h" #include "ixl_pf.h" +#ifdef RSS +#include +#endif + /* * Driver version */ @@ -3249,7 +3253,7 @@ static void ixl_config_rss(struct ixl_vs * num_queues.) */ que_id = rss_get_indirection_to_bucket(i); - que_id = que_id % adapter->num_queues; + que_id = que_id % vsi->num_queues; #else que_id = j; #endif Modified: head/sys/dev/ixl/if_ixlv.c == --- head/sys/dev/ixl/if_ixlv.c Fri Jan 16 19:07:13 2015(r277261) +++ head/sys/dev/ixl/if_ixlv.c Fri Jan 16 19:11:58 2015(r277262) @@ -38,10 +38,14 @@ #include "ixl.h" #include "ixlv.h" +#ifdef RSS +#include +#endif + /* * Driver version */ -char ixlv_driver_version[] = "1.2.0"; +char ixlv_driver_version[] = "1.2.1"; /* * PCI Device ID Table @@ -2596,12 +2600,12 @@ ixlv_config_rss(struct ixlv_sc *sc) set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV4_UDP); if (rss_hash_config & RSS_HASHTYPE_RSS_IPV6) set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_OTHER); +if (rss_hash_config & RSS_HASHTYPE_RSS_IPV6_EX) + set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_FRAG_IPV6); if (rss_hash_config & RSS_HASHTYPE_RSS_TCP_IPV6) set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_TCP); if (rss_hash_config & RSS_HASHTYPE_RSS_UDP_IPV6) set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_UDP); -if (rss_hash_config & RSS_HASHTYPE_RSS_UDP_IPV6_EX) -set_hena |= IXGBE_MRQC_RSS_FIELD_IPV6_EX_UDP; #else set_hena = ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV4_UDP) | @@ -2633,7 +2637,7 @@ ixlv_config_rss(struct ixlv_sc *sc) * num_queues.) */ que_id = rss_get_indirection_to_bucket(i); - que_id = que_id % adapter->num_queues; + que_id = que_id % vsi->num_queues; #else que_id = j; #endif Modified: head/sys/dev/ixl/ixl_txrx.c == --- head/sys/dev/ixl/ixl_txrx.c Fri Jan 16 19:07:13 2015(r277261) +++ head/sys/dev/ixl/ixl_txrx.c Fri Jan 16 19:11:58 2015(r277262) @@ -43,6 +43,10 @@ #include "opt_rss.h" #include "ixl.h" +#ifdef RSS +#include +#endif + /* Local Prototypes */ static voidixl_rx_checksum(struct mbuf *, u32, u32, u8); static voidixl_refresh_mbufs(struct ixl_queue *, int); @@ -1367,7 +1371,7 @@ ixl_rx_discard(struct rx_ring *rxr, int #ifdef RSS /* -** i40e_ptype_to_hash: parse the packet type +** ixl_ptype_to_hash: parse the packet type ** to determine the appropriate hash. */ static inline int @@ -1376,7 +1380,7 @@ ixl_ptype_to_hash(u8 ptype) struct i40e_rx_ptype_decoded decoded; u8 ex = 0 - decode = decode_rx_desc_ptype(ptype); + decoded = decode_rx_desc_ptype(ptype); ex = decoded.outer_frag; if (!decoded.known) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r277219 - head/share/man/man4
Author: jfv Date: Thu Jan 15 22:17:11 2015 New Revision: 277219 URL: https://svnweb.freebsd.org/changeset/base/277219 Log: Add needed bits to the Makefile, and the Mt to the emails. Thanks to Nathan and Baptiste for the corrections :) MFC after: 1 week Modified: head/share/man/man4/Makefile head/share/man/man4/ixl.4 head/share/man/man4/ixlv.4 Modified: head/share/man/man4/Makefile == --- head/share/man/man4/MakefileThu Jan 15 21:47:02 2015 (r277218) +++ head/share/man/man4/MakefileThu Jan 15 22:17:11 2015 (r277219) @@ -217,6 +217,8 @@ MAN=aac.4 \ iwnfw.4 \ ixgb.4 \ ixgbe.4 \ + ixl.4 \ + ixlv.4 \ jme.4 \ joy.4 \ kbdmux.4 \ @@ -667,6 +669,8 @@ MLINKS+=ixgb.4 if_ixgb.4 MLINKS+=ixgbe.4 ix.4 MLINKS+=ixgbe.4 if_ix.4 MLINKS+=ixgbe.4 if_ixgbe.4 +MLINKS+=ixl.4 if_ixl.4 +MLINKS+=ixlv.4 if_ixlv.4 MLINKS+=jme.4 if_jme.4 MLINKS+=kue.4 if_kue.4 MLINKS+=lagg.4 trunk.4 Modified: head/share/man/man4/ixl.4 == --- head/share/man/man4/ixl.4 Thu Jan 15 21:47:02 2015(r277218) +++ head/share/man/man4/ixl.4 Thu Jan 15 22:17:11 2015(r277219) @@ -183,6 +183,6 @@ device driver first appeared in The .Nm driver was written by -.An Jack Vogel Aq j...@freebsd.org +.An Jack Vogel Aq Mt j...@freebsd.org and -.An Eric Joyner Aq ricer...@gmail.com . +.An Eric Joyner Aq Mt ricer...@gmail.com . Modified: head/share/man/man4/ixlv.4 == --- head/share/man/man4/ixlv.4 Thu Jan 15 21:47:02 2015(r277218) +++ head/share/man/man4/ixlv.4 Thu Jan 15 22:17:11 2015(r277219) @@ -135,6 +135,6 @@ device driver first appeared in The .Nm driver was written by -.An Jack Vogel Aq j...@freebsd.org +.An Jack Vogel Aq Mt j...@freebsd.org and -.An Eric Joyner Aq ricer...@gmail.com . +.An Eric Joyner Aq Mt ricer...@gmail.com . ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r277218 - head/share/man/man4
Author: jfv Date: Thu Jan 15 21:47:02 2015 New Revision: 277218 URL: https://svnweb.freebsd.org/changeset/base/277218 Log: First draft man pages for ixl and ixlv drivers. MFC after: 1 week Added: head/share/man/man4/ixl.4 (contents, props changed) head/share/man/man4/ixlv.4 (contents, props changed) Added: head/share/man/man4/ixl.4 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/ixl.4 Thu Jan 15 21:47:02 2015(r277218) @@ -0,0 +1,188 @@ +.\" Copyright (c) 2013-2015, Intel Corporation +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are met: +.\" +.\" 1. Redistributions of source code must retain the above copyright notice, +.\" this list of conditions and the following disclaimer. +.\" +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" 3. Neither the name of the Intel Corporation nor the names of its +.\" contributors may be used to endorse or promote products derived from +.\" this software without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +.\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGE. +.\" +.\" * Other names and brands may be claimed as the property of others. +.\" +.\" $FreeBSD$ +.\" +.Dd January 14, 2015 +.Dt IXL 4 +.Os +.Sh NAME +.Nm ixl +.Nd "Intel XL710 Ethernet 40Gb Base driver" +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device ixl" +.Ed +.Pp +To load the driver as a +module at boot time, place the following lines in +.Xr loader.conf 5 : +.Bd -literal -offset indent +if_ixl_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for PCI Express adapters or LOMs +in the XL710 Family of ethernet devices. +The driver supports Jumbo Frames, TX/RX checksum offload, +TCP segmentation offload (TSO), Large Receive Offload (LRO), VLAN +tag insertion/extraction, VLAN checksum offload, VLAN TSO, and +Receive Side Steering (RSS), all for both IPv4 and IPv6. +For further hardware information and questions related to hardware +requirements, see +.Pa http://support.intel.com/ . +.Pp +Support for Jumbo Frames is provided via the interface MTU setting. +Selecting an MTU larger than 1500 bytes with the +.Xr ifconfig 8 +utility configures the adapter to receive and transmit Jumbo Frames. +The maximum MTU size for Jumbo Frames is 9706. +.Pp +Offloads are also controlled via the interface, for instance, +checksumming for both IPv4 and IPv6 can be set and unset, TSO4 +and/or TSO6, and finally LRO can be set and unset. +.Pp +For more information on configuring this device, see +.Xr ifconfig 8 . +.Sh HARDWARE +The +.Nm +driver supports these SFP+ Pluggable Optics: +.Pp +.Bl -bullet -compact +.It +Intel TRIPLE RATE 1G/10G/40G QSFP+ SR (bailed) E40GQSFPSR +.It +Intel TRIPLE RATE 1G/10G/40G QSFP+ SR (bailed) E40GQSFPLR +.El +.Pp +The +.Nm +driver supports 10Gb and 1Gb Ethernet adapters with SR Modules: +.Pp +.Bl -bullet -compact +.It +Intel DUAL RATE 1G/10G SFP+ SR (bailed) FTLX8571D3BCV-IT +.It +Intel DUAL RATE 1G/10G SFP+ SR (bailed) AFBR-703SDZ-IN2 +.El +.Pp +The +.Nm +driver supports 10Gb and 1Gb Ethernet adapters with LR Modules: +.Pp +.Bl -bullet -compact +.It +Intel DUAL RATE 1G/10G SFP+ LR (bailed) FTLX1471D3BCV-IT +.It +Intel DUAL RATE 1G/10G SFP+ LR (bailed) AFCT-701SDZ-IN2 +.El +.Pp +Note that X710/XL710 Based SFP+ adapters also support all passive and active +limiting direct attach cables that comply with SFF-8431 v4.1 and +SFF-8472 v10.4 specifications. + +.Pp +.Sh LOADER TUNABLES +Tunables can be set at the +.Xr loader 8 +prompt before booting the kernel or stored in +.Xr loader.conf 5 . +.Bl -tag -width indent +.It Va hw.ixl.enable_msix +Allows one to enable/disable MSIX, thus forcing MSI instead. +.It Va hw.ixl.ringsz +Set the number of descriptors
svn commit: r277151 - head/sys/dev/ixl
Author: jfv Date: Tue Jan 13 22:13:30 2015 New Revision: 277151 URL: https://svnweb.freebsd.org/changeset/base/277151 Log: Cleanup some bogus code in the RSS config, and add the include for the rss option file. And bump the version. MFC after:1 week Modified: head/sys/dev/ixl/if_ixl.c head/sys/dev/ixl/ixl_txrx.c Modified: head/sys/dev/ixl/if_ixl.c == --- head/sys/dev/ixl/if_ixl.c Tue Jan 13 22:13:03 2015(r277150) +++ head/sys/dev/ixl/if_ixl.c Tue Jan 13 22:13:30 2015(r277151) @@ -41,7 +41,7 @@ /* * Driver version */ -char ixl_driver_version[] = "1.3.0"; +char ixl_driver_version[] = "1.3.1"; /* * PCI Device ID Table @@ -3212,12 +3212,12 @@ static void ixl_config_rss(struct ixl_vs set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV4_UDP); if (rss_hash_config & RSS_HASHTYPE_RSS_IPV6) set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_OTHER); +if (rss_hash_config & RSS_HASHTYPE_RSS_IPV6_EX) + set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_FRAG_IPV6); if (rss_hash_config & RSS_HASHTYPE_RSS_TCP_IPV6) set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_TCP); if (rss_hash_config & RSS_HASHTYPE_RSS_UDP_IPV6) set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_UDP); -if (rss_hash_config & RSS_HASHTYPE_RSS_UDP_IPV6_EX) -set_hena |= IXGBE_MRQC_RSS_FIELD_IPV6_EX_UDP; #else set_hena = ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV4_UDP) | Modified: head/sys/dev/ixl/ixl_txrx.c == --- head/sys/dev/ixl/ixl_txrx.c Tue Jan 13 22:13:03 2015(r277150) +++ head/sys/dev/ixl/ixl_txrx.c Tue Jan 13 22:13:30 2015(r277151) @@ -40,6 +40,7 @@ #include "opt_inet.h" #include "opt_inet6.h" +#include "opt_rss.h" #include "ixl.h" /* Local Prototypes */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r277143 - head/sys/dev/ixl
Author: jfv Date: Tue Jan 13 18:56:29 2015 New Revision: 277143 URL: https://svnweb.freebsd.org/changeset/base/277143 Log: Complete the RX side RSS code: parse the encoded portion of the RX descriptor to determine the correct hash type. MFC after:1 week Modified: head/sys/dev/ixl/ixl_txrx.c Modified: head/sys/dev/ixl/ixl_txrx.c == --- head/sys/dev/ixl/ixl_txrx.c Tue Jan 13 18:56:28 2015(r277142) +++ head/sys/dev/ixl/ixl_txrx.c Tue Jan 13 18:56:29 2015(r277143) @@ -1364,6 +1364,63 @@ ixl_rx_discard(struct rx_ring *rxr, int return; } +#ifdef RSS +/* +** i40e_ptype_to_hash: parse the packet type +** to determine the appropriate hash. +*/ +static inline int +ixl_ptype_to_hash(u8 ptype) +{ +struct i40e_rx_ptype_decoded decoded; + u8 ex = 0 + + decode = decode_rx_desc_ptype(ptype); + ex = decoded.outer_frag; + + if (!decoded.known) + return M_HASHTYPE_OPAQUE; + + if (decoded.outer_ip == I40E_RX_PTYPE_OUTER_L2) + return M_HASHTYPE_OPAQUE; + + /* Note: anything that gets to this point is IP */ +if (decoded.outer_ip_ver == I40E_RX_PTYPE_OUTER_IPV6) { + switch (decoded.inner_prot) { + case I40E_RX_PTYPE_INNER_PROT_TCP: + if (ex) + return M_HASHTYPE_RSS_TCP_IPV6_EX; + else + return M_HASHTYPE_RSS_TCP_IPV6; + case I40E_RX_PTYPE_INNER_PROT_UDP: + if (ex) + return M_HASHTYPE_RSS_UDP_IPV6_EX; + else + return M_HASHTYPE_RSS_UDP_IPV6; + default: + if (ex) + return M_HASHTYPE_RSS_IPV6_EX; + else + return M_HASHTYPE_RSS_IPV6; + } + } +if (decoded.outer_ip_ver == I40E_RX_PTYPE_OUTER_IPV4) { + switch (decoded.inner_prot) { + case I40E_RX_PTYPE_INNER_PROT_TCP: + return M_HASHTYPE_RSS_TCP_IPV4; + case I40E_RX_PTYPE_INNER_PROT_UDP: + if (ex) + return M_HASHTYPE_RSS_UDP_IPV4_EX; + else + return M_HASHTYPE_RSS_UDP_IPV4; + default: + return M_HASHTYPE_RSS_IPV4; + } + } + /* We should never get here!! */ + return M_HASHTYPE_OPAQUE; +} +#endif /* RSS */ /* * @@ -1562,10 +1619,13 @@ ixl_rxeof(struct ixl_queue *que, int cou if ((ifp->if_capenable & IFCAP_RXCSUM) != 0) ixl_rx_checksum(sendmp, status, error, ptype); #ifdef RSS - /* XXX Work in Progress, fix the build for now */ -#endif + sendmp->m_pkthdr.flowid = + le32toh(cur->wb.qword0.hi_dword.rss); + M_HASHTYPE_SET(sendmp, ixl_ptype_to_hash(ptype)); +#else sendmp->m_pkthdr.flowid = que->msix; M_HASHTYPE_SET(sendmp, M_HASHTYPE_OPAQUE); +#endif } next_desc: bus_dmamap_sync(rxr->dma.tag, rxr->dma.map, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r277088 - head/sys/dev/ixl
Author: jfv Date: Mon Jan 12 20:59:07 2015 New Revision: 277088 URL: https://svnweb.freebsd.org/changeset/base/277088 Log: Missing RSS support added, this fixes the build, but the code in the RX side was complicated by recent changes and will need some further tweaking. Modified: head/sys/dev/ixl/ixl_txrx.c Modified: head/sys/dev/ixl/ixl_txrx.c == --- head/sys/dev/ixl/ixl_txrx.c Mon Jan 12 20:27:06 2015(r277087) +++ head/sys/dev/ixl/ixl_txrx.c Mon Jan 12 20:59:07 2015(r277088) @@ -65,14 +65,33 @@ ixl_mq_start(struct ifnet *ifp, struct m struct ixl_queue*que; struct tx_ring *txr; int err, i; +#ifdef RSS + u32 bucket_id; +#endif - /* Which queue to use */ - if ((m->m_flags & M_FLOWID) != 0) - i = m->m_pkthdr.flowid % vsi->num_queues; - else + /* + ** Which queue to use: + ** + ** When doing RSS, map it to the same outbound + ** queue as the incoming flow would be mapped to. + ** If everything is setup correctly, it should be + ** the same bucket that the current CPU we're on is. + */ + if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) { +#ifdef RSS + if (rss_hash2bucket(m->m_pkthdr.flowid, + M_HASHTYPE_GET(m), &bucket_id) == 0) { + i = bucket_id % vsi->num_queues; +} else +#endif +i = m->m_pkthdr.flowid % vsi->num_queues; +} else i = curcpu % vsi->num_queues; - - /* Check for a hung queue and pick alternative */ + /* + ** This may not be perfect, but until something + ** better comes along it will keep from scheduling + ** on stalled queues. + */ if (((1 << i) & vsi->active_queues) == 0) i = ffsl(vsi->active_queues); @@ -1542,8 +1561,11 @@ ixl_rxeof(struct ixl_queue *que, int cou rxr->bytes += sendmp->m_pkthdr.len; if ((ifp->if_capenable & IFCAP_RXCSUM) != 0) ixl_rx_checksum(sendmp, status, error, ptype); +#ifdef RSS + /* XXX Work in Progress, fix the build for now */ +#endif sendmp->m_pkthdr.flowid = que->msix; - sendmp->m_flags |= M_FLOWID; + M_HASHTYPE_SET(sendmp, M_HASHTYPE_OPAQUE); } next_desc: bus_dmamap_sync(rxr->dma.tag, rxr->dma.map, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r277084 - in head/sys: dev/ixl modules/ixl modules/ixlv
Author: jfv Date: Mon Jan 12 18:43:34 2015 New Revision: 277084 URL: https://svnweb.freebsd.org/changeset/base/277084 Log: Intel I40E driver updates: if_ixl to version 1.3.0, if_ixlv to version 1.2.0 - Major change in both drivers is to add RSS support - In ixl fix some interface speed related issues, dual speed was not changing correctly, KR/X media was not displaying correctly (this has a workaround until a more robust media handling is in place) - Add a warning when using Dell NPAR and the speed is less than 10G - Wrap a queue hung message in IXL_DEBUG, as it is non-fatal, and without tuning can display excessively MFC after: 1 week Modified: head/sys/dev/ixl/if_ixl.c head/sys/dev/ixl/if_ixlv.c head/sys/dev/ixl/ixl.h head/sys/dev/ixl/ixl_txrx.c head/sys/modules/ixl/Makefile head/sys/modules/ixlv/Makefile Modified: head/sys/dev/ixl/if_ixl.c == --- head/sys/dev/ixl/if_ixl.c Mon Jan 12 18:38:09 2015(r277083) +++ head/sys/dev/ixl/if_ixl.c Mon Jan 12 18:43:34 2015(r277084) @@ -34,13 +34,14 @@ #include "opt_inet.h" #include "opt_inet6.h" +#include "opt_rss.h" #include "ixl.h" #include "ixl_pf.h" /* * Driver version */ -char ixl_driver_version[] = "1.2.8"; +char ixl_driver_version[] = "1.3.0"; /* * PCI Device ID Table @@ -174,7 +175,7 @@ static void ixl_stat_update48(struct i40 static voidixl_stat_update32(struct i40e_hw *, u32, bool, u64 *, u64 *); -#ifdef IXL_DEBUG +#ifdef IXL_DEBUG_SYSCTL static int ixl_sysctl_link_status(SYSCTL_HANDLER_ARGS); static int ixl_sysctl_phy_abilities(SYSCTL_HANDLER_ARGS); static int ixl_sysctl_sw_filter_list(SYSCTL_HANDLER_ARGS); @@ -427,7 +428,7 @@ ixl_attach(device_t dev) OID_AUTO, "dynamic_tx_itr", CTLFLAG_RW, &ixl_dynamic_tx_itr, 0, "Dynamic TX ITR"); -#ifdef IXL_DEBUG +#ifdef IXL_DEBUG_SYSCTL SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "link_status", CTLTYPE_STRING | CTLFLAG_RD, @@ -662,8 +663,9 @@ ixl_attach(device_t dev) /* Reset port's advertised speeds */ if (!i40e_is_40G_device(hw->device_id)) { - pf->advertised_speed = 0x7; - ixl_set_advertised_speeds(pf, 0x7); + pf->advertised_speed = + (hw->device_id == I40E_DEV_ID_10G_BASE_T) ? 0x7 : 0x6; + ixl_set_advertised_speeds(pf, pf->advertised_speed); } /* Register for VLAN events */ @@ -1407,6 +1409,12 @@ ixl_media_status(struct ifnet * ifp, str case I40E_PHY_TYPE_10GBASE_SFPP_CU: ifmr->ifm_active |= IFM_10G_TWINAX; break; + case I40E_PHY_TYPE_10GBASE_KR: + /* + ** this is not technically correct + ** but FreeBSD does not have the media + ** type defined yet, so its a compromise. + */ case I40E_PHY_TYPE_10GBASE_SR: ifmr->ifm_active |= IFM_10G_SR; break; @@ -1721,8 +1729,10 @@ ixl_local_timer(void *arg) vsi->active_queues |= ((u64)1 << que->me); } if (que->busy >= IXL_MAX_TX_BUSY) { +#ifdef IXL_DEBUG device_printf(dev,"Warning queue %d " "appears to be hung!\n", i); +#endif que->busy = IXL_QUEUE_HUNG; ++hung; } @@ -1765,6 +1775,15 @@ ixl_update_link_status(struct ixl_pf *pf "Full Duplex", ixl_fc_string[fc]); } vsi->link_active = TRUE; + /* + ** Warn user if link speed on NPAR enabled + ** partition is not at least 10GB + */ + if (hw->func_caps.npar_enable && + (hw->phy.link_info.link_speed == I40E_LINK_SPEED_1GB || + hw->phy.link_info.link_speed == I40E_LINK_SPEED_100MB)) + device_printf(dev, "The partition detected link" + "speed that is less than 10Gbps\n"); if_link_state_change(ifp, LINK_STATE_UP); } } else { /* Link down */ @@ -1901,6 +1920,7 @@ ixl_assign_vsi_msix(struct ixl_pf *pf) /* Now set up the stations */ for (int i = 0; i < vsi->num_
svn commit: r277082 - head/sys/dev/ixl
Author: jfv Date: Mon Jan 12 18:32:45 2015 New Revision: 277082 URL: https://svnweb.freebsd.org/changeset/base/277082 Log: Update to the shared code for Intel I40E drivers in preparation for the ixl 1.3.0 and ixlv 1.2.0 revisions. MFC after:1 week Modified: head/sys/dev/ixl/i40e_adminq.c head/sys/dev/ixl/i40e_adminq.h head/sys/dev/ixl/i40e_adminq_cmd.h head/sys/dev/ixl/i40e_common.c head/sys/dev/ixl/i40e_lan_hmc.c head/sys/dev/ixl/i40e_nvm.c head/sys/dev/ixl/i40e_prototype.h head/sys/dev/ixl/i40e_register.h head/sys/dev/ixl/i40e_type.h head/sys/dev/ixl/i40e_virtchnl.h Modified: head/sys/dev/ixl/i40e_adminq.c == --- head/sys/dev/ixl/i40e_adminq.c Mon Jan 12 18:20:37 2015 (r277081) +++ head/sys/dev/ixl/i40e_adminq.c Mon Jan 12 18:32:45 2015 (r277082) @@ -589,10 +589,10 @@ enum i40e_status_code i40e_init_adminq(s if (ret_code != I40E_SUCCESS) goto init_adminq_free_asq; -if (i40e_is_vf(hw)) /* VF has no need of firmware */ -goto init_adminq_exit; - -/* There are some cases where the firmware may not be quite ready + /* VF has no need of firmware */ + if (i40e_is_vf(hw)) + goto init_adminq_exit; + /* There are some cases where the firmware may not be quite ready * for AdminQ operations, so we retry the AdminQ setup a few times * if we see timeouts in this first AQ call. */ @@ -600,6 +600,7 @@ enum i40e_status_code i40e_init_adminq(s ret_code = i40e_aq_get_firmware_version(hw, &hw->aq.fw_maj_ver, &hw->aq.fw_min_ver, + &hw->aq.fw_build, &hw->aq.api_maj_ver, &hw->aq.api_min_ver, NULL); @@ -625,7 +626,8 @@ enum i40e_status_code i40e_init_adminq(s /* pre-emptive resource lock release */ i40e_aq_release_resource(hw, I40E_NVM_RESOURCE_ID, 0, NULL); - hw->aq.nvm_busy = FALSE; + hw->aq.nvm_release_on_done = FALSE; + hw->nvmupd_state = I40E_NVMUPD_STATE_INIT; ret_code = i40e_aq_set_hmc_resource_profile(hw, I40E_HMC_PROFILE_DEFAULT, @@ -767,12 +769,6 @@ enum i40e_status_code i40e_asq_send_comm goto asq_send_command_exit; } - if (i40e_is_nvm_update_op(desc) && hw->aq.nvm_busy) { - i40e_debug(hw, I40E_DEBUG_AQ_MESSAGE, "AQTX: NVM busy.\n"); - status = I40E_ERR_NVM; - goto asq_send_command_exit; - } - details = I40E_ADMINQ_DETAILS(hw->aq.asq, hw->aq.asq.next_to_use); if (cmd_details) { i40e_memcpy(details, @@ -924,9 +920,6 @@ enum i40e_status_code i40e_asq_send_comm status = I40E_ERR_ADMIN_QUEUE_TIMEOUT; } - if (!status && i40e_is_nvm_update_op(desc)) - hw->aq.nvm_busy = TRUE; - asq_send_command_error: i40e_release_spinlock(&hw->aq.asq_spinlock); asq_send_command_exit: @@ -1042,7 +1035,6 @@ clean_arq_element_out: i40e_release_spinlock(&hw->aq.arq_spinlock); if (i40e_is_nvm_update_op(&e->desc)) { - hw->aq.nvm_busy = FALSE; if (hw->aq.nvm_release_on_done) { i40e_release_nvm(hw); hw->aq.nvm_release_on_done = FALSE; Modified: head/sys/dev/ixl/i40e_adminq.h == --- head/sys/dev/ixl/i40e_adminq.h Mon Jan 12 18:20:37 2015 (r277081) +++ head/sys/dev/ixl/i40e_adminq.h Mon Jan 12 18:32:45 2015 (r277082) @@ -36,6 +36,7 @@ #define _I40E_ADMINQ_H_ #include "i40e_osdep.h" +#include "i40e_status.h" #include "i40e_adminq_cmd.h" #define I40E_ADMINQ_DESC(R, i) \ @@ -100,9 +101,9 @@ struct i40e_adminq_info { u16 asq_buf_size; /* send queue buffer size */ u16 fw_maj_ver; /* firmware major version */ u16 fw_min_ver; /* firmware minor version */ + u32 fw_build; /* firmware build number */ u16 api_maj_ver;/* api major version */ u16 api_min_ver;/* api minor version */ - bool nvm_busy; bool nvm_release_on_done; struct i40e_spinlock asq_spinlock; /* Send queue spinlock */ @@ -115,7 +116,7 @@ struct i40e_adminq_info { /* general information */ #define I40E_AQ_LARGE_BUF 512 -#define I40E_ASQ_CMD_TIMEOUT 100 /* msecs */ +#define I40E_ASQ_CMD_TIMEOUT 250 /* msecs */ void i40e_fill_default_direct_cm
svn commit: r275431 - in head/sys/dev: e1000 ixgbe
Author: jfv Date: Tue Dec 2 23:02:57 2014 New Revision: 275431 URL: https://svnweb.freebsd.org/changeset/base/275431 Log: Revert r275136, it was not approved, it was sloppy, if a feature like this is needed please resubmit for Intel's approval. Modified: head/sys/dev/e1000/if_igb.c head/sys/dev/ixgbe/ixgbe.c Modified: head/sys/dev/e1000/if_igb.c == --- head/sys/dev/e1000/if_igb.c Tue Dec 2 22:35:43 2014(r275430) +++ head/sys/dev/e1000/if_igb.c Tue Dec 2 23:02:57 2014(r275431) @@ -188,7 +188,6 @@ static char *igb_strings[] = { /* * Function prototypes */ -static int igb_per_unit_num_queues(SYSCTL_HANDLER_ARGS); static int igb_probe(device_t); static int igb_attach(device_t); static int igb_detach(device_t); @@ -494,11 +493,6 @@ igb_attach(device_t dev) OID_AUTO, "nvm", CTLTYPE_INT|CTLFLAG_RW, adapter, 0, igb_sysctl_nvm_info, "I", "NVM Information"); -SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), -SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), - OID_AUTO, "num_queues", CTLTYPE_INT | CTLFLAG_RD, - adapter, 0, igb_per_unit_num_queues, "I", "Number of Queues"); - igb_set_sysctl_value(adapter, "enable_aim", "Interrupt Moderation", &adapter->enable_aim, igb_enable_aim); @@ -2837,7 +2831,6 @@ igb_setup_msix(struct adapter *adapter) { device_tdev = adapter->dev; int bar, want, queues, msgs, maxqueues; - int n_queues; /* tuneable override */ if (igb_enable_msix == 0) @@ -2865,18 +2858,11 @@ igb_setup_msix(struct adapter *adapter) goto msi; } - n_queues = 0; - /* try more specific tunable, then global, then finally default to boot time tunable if set. */ - if (device_getenv_int(dev, "num_queues", &n_queues) != 0) { - device_printf(dev, "using specific tunable num_queues=%d", n_queues); - } else if (TUNABLE_INT_FETCH("hw.igb.num_queues", &n_queues) != 0) { - if (igb_num_queues != n_queues) { - device_printf(dev, "using global tunable hw.igb.num_queues=%d", n_queues); - igb_num_queues = n_queues; - } - } else { - n_queues = igb_num_queues; - } + queues = (mp_ncpus > (msgs-1)) ? (msgs-1) : mp_ncpus; + + /* Override via tuneable */ + if (igb_num_queues != 0) + queues = igb_num_queues; #ifdef RSS /* If we're doing RSS, clamp at the number of RSS buckets */ @@ -2884,12 +2870,6 @@ igb_setup_msix(struct adapter *adapter) queues = rss_getnumbuckets(); #endif - if (n_queues != 0) { - queues = n_queues; - } else { - /* Figure out a reasonable auto config value */ - queues = (mp_ncpus > (msgs-1)) ? (msgs-1) : mp_ncpus; - } /* Sanity check based on HW */ switch (adapter->hw.mac.type) { @@ -2912,17 +2892,10 @@ igb_setup_msix(struct adapter *adapter) maxqueues = 1; break; } - if (queues > maxqueues) { - device_printf(adapter->dev, "requested %d queues, but max for this adapter is %d\n", - queues, maxqueues); + + /* Final clamp on the actual hardware capability */ + if (queues > maxqueues) queues = maxqueues; - } else if (queues == 0) { - queues = 1; - } else if (queues < 0) { - device_printf(adapter->dev, "requested %d queues, but min for this adapter is %d\n", - queues, 1); - queues = 1; - } /* ** One vector (RX/TX pair) per queue @@ -6407,14 +6380,3 @@ igb_sysctl_eee(SYSCTL_HANDLER_ARGS) IGB_CORE_UNLOCK(adapter); return (0); } - -static int -igb_per_unit_num_queues(SYSCTL_HANDLER_ARGS) -{ - struct adapter *adapter; - - adapter = (struct adapter *) arg1; - - return sysctl_handle_int(oidp, &adapter->num_queues, 0, req); -} - Modified: head/sys/dev/ixgbe/ixgbe.c == --- head/sys/dev/ixgbe/ixgbe.c Tue Dec 2 22:35:43 2014(r275430) +++ head/sys/dev/ixgbe/ixgbe.c Tue Dec 2 23:02:57 2014(r275431) @@ -103,7 +103,6 @@ static char*ixgbe_strings[] = { /* * Function prototypes */ -static int ixgbe_per_unit_num_queues(SYSCTL_HANDLER_ARGS); static int ixgbe_probe(device_t); s
svn commit: r274367 - in releng/10.1/sys: dev/ixl modules/ixlv
Author: jfv Date: Tue Nov 11 05:00:51 2014 New Revision: 274367 URL: https://svnweb.freebsd.org/changeset/base/274367 Log: Update the Intel ixl/ixlv drivers to fix a panic in the boot/install kernel if the system has a fiber-based Intel XL710 adapter installed. In addition ixl version 1.2.8 and ixlv version 1.1.18 give: - Improved VF stability (thanks to Ryan Stone for this) - RSS fixes - link detection in the ixlv driver - new sysctl's added - corrected media reporting Submitted by: jfv Approved by: re Added: releng/10.1/sys/dev/ixl/ixlv_vc_mgr.h - copied unchanged from r274360, stable/10/sys/dev/ixl/ixlv_vc_mgr.h Deleted: releng/10.1/sys/dev/ixl/i40e_register_x710_int.h Modified: releng/10.1/sys/dev/ixl/i40e_osdep.c releng/10.1/sys/dev/ixl/i40e_osdep.h releng/10.1/sys/dev/ixl/if_ixl.c releng/10.1/sys/dev/ixl/if_ixlv.c releng/10.1/sys/dev/ixl/ixl.h releng/10.1/sys/dev/ixl/ixl_txrx.c releng/10.1/sys/dev/ixl/ixlv.h releng/10.1/sys/dev/ixl/ixlvc.c releng/10.1/sys/modules/ixlv/Makefile Directory Properties: releng/10.1/ (props changed) Modified: releng/10.1/sys/dev/ixl/i40e_osdep.c == --- releng/10.1/sys/dev/ixl/i40e_osdep.cTue Nov 11 04:48:09 2014 (r274366) +++ releng/10.1/sys/dev/ixl/i40e_osdep.cTue Nov 11 05:00:51 2014 (r274367) @@ -107,6 +107,7 @@ i40e_allocate_dma_mem(struct i40e_hw *hw "error %u\n", err); goto fail_2; } + mem->nseg = 1; mem->size = size; bus_dmamap_sync(mem->tag, mem->map, BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE); Modified: releng/10.1/sys/dev/ixl/i40e_osdep.h == --- releng/10.1/sys/dev/ixl/i40e_osdep.hTue Nov 11 04:48:09 2014 (r274366) +++ releng/10.1/sys/dev/ixl/i40e_osdep.hTue Nov 11 05:00:51 2014 (r274367) @@ -147,11 +147,11 @@ void prefetch(void *x) #defineprefetch(x) #endif -struct i40e_osdep -{ +struct i40e_osdep { bus_space_tag_t mem_bus_space_tag; bus_space_handle_t mem_bus_space_handle; bus_size_t mem_bus_space_size; + uint32_tflush_reg; struct device *dev; }; @@ -208,6 +208,13 @@ wr32_osdep(struct i40e_osdep *osdep, uin osdep->mem_bus_space_handle, reg, value); } +static __inline void +ixl_flush_osdep(struct i40e_osdep *osdep) +{ + + rd32_osdep(osdep, osdep->flush_reg); +} + #define rd32(a, reg) rd32_osdep((a)->back, (reg)) #define wr32(a, reg, value)wr32_osdep((a)->back, (reg), (value)) @@ -221,9 +228,6 @@ wr32_osdep(struct i40e_osdep *osdep, uin ((struct i40e_osdep *)(a)->back)->mem_bus_space_handle, \ reg, value)) -#define ixl_flush(a) (\ - bus_space_read_4( ((struct i40e_osdep *)(a)->back)->mem_bus_space_tag, \ - ((struct i40e_osdep *)(a)->back)->mem_bus_space_handle, \ - I40E_GLGEN_STAT)) +#define ixl_flush(a) ixl_flush_osdep((a)->back) #endif /* _I40E_OSDEP_H_ */ Modified: releng/10.1/sys/dev/ixl/if_ixl.c == --- releng/10.1/sys/dev/ixl/if_ixl.cTue Nov 11 04:48:09 2014 (r274366) +++ releng/10.1/sys/dev/ixl/if_ixl.cTue Nov 11 05:00:51 2014 (r274367) @@ -40,7 +40,7 @@ /* * Driver version */ -char ixl_driver_version[] = "1.2.2"; +char ixl_driver_version[] = "1.2.8"; /* * PCI Device ID Table @@ -109,6 +109,7 @@ static bool ixl_config_link(struct i40e_ static voidixl_config_rss(struct ixl_vsi *); static voidixl_set_queue_rx_itr(struct ixl_queue *); static voidixl_set_queue_tx_itr(struct ixl_queue *); +static int ixl_set_advertised_speeds(struct ixl_pf *, int); static voidixl_enable_rings(struct ixl_vsi *); static voidixl_disable_rings(struct ixl_vsi *); @@ -155,6 +156,7 @@ static void ixl_do_adminq(void *, int); static int ixl_set_flowcntl(SYSCTL_HANDLER_ARGS); static int ixl_set_advertise(SYSCTL_HANDLER_ARGS); static int ixl_current_speed(SYSCTL_HANDLER_ARGS); +static int ixl_sysctl_show_fw(SYSCTL_HANDLER_ARGS); /* Statistics */ static void ixl_add_hw_stats(struct ixl_pf *); @@ -176,7 +178,8 @@ static void ixl_stat_update32(struct i40 static int ixl_sysctl_link_status(SYSCTL_HANDLER_ARGS); static int ixl_sysctl_phy_abilities(SYSCTL_HANDLER_ARGS); static int ixl_sysctl_sw_filter_list(SYSCTL_HANDLER_ARGS); -static int ixl_sysctl_hw_res_info(SYSCTL_HANDLER_ARGS); +static int ixl_sysctl_hw
svn commit: r274360 - in stable/10/sys: dev/ixl modules/ixlv
Author: jfv Date: Mon Nov 10 23:56:06 2014 New Revision: 274360 URL: https://svnweb.freebsd.org/changeset/base/274360 Log: MFC Intel I40E drivers: r274205,r274218, and r274228 The MFC was pushed early as it fixes a panic in the exiting driver of 10.1 that Intel discovered in validation. Added: stable/10/sys/dev/ixl/ixlv_vc_mgr.h - copied unchanged from r274218, head/sys/dev/ixl/ixlv_vc_mgr.h Deleted: stable/10/sys/dev/ixl/i40e_register_x710_int.h Modified: stable/10/sys/dev/ixl/i40e_osdep.c stable/10/sys/dev/ixl/i40e_osdep.h stable/10/sys/dev/ixl/if_ixl.c stable/10/sys/dev/ixl/if_ixlv.c stable/10/sys/dev/ixl/ixl.h stable/10/sys/dev/ixl/ixl_txrx.c stable/10/sys/dev/ixl/ixlv.h stable/10/sys/dev/ixl/ixlvc.c stable/10/sys/modules/ixlv/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ixl/i40e_osdep.c == --- stable/10/sys/dev/ixl/i40e_osdep.c Mon Nov 10 23:10:01 2014 (r274359) +++ stable/10/sys/dev/ixl/i40e_osdep.c Mon Nov 10 23:56:06 2014 (r274360) @@ -107,6 +107,7 @@ i40e_allocate_dma_mem(struct i40e_hw *hw "error %u\n", err); goto fail_2; } + mem->nseg = 1; mem->size = size; bus_dmamap_sync(mem->tag, mem->map, BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE); Modified: stable/10/sys/dev/ixl/i40e_osdep.h == --- stable/10/sys/dev/ixl/i40e_osdep.h Mon Nov 10 23:10:01 2014 (r274359) +++ stable/10/sys/dev/ixl/i40e_osdep.h Mon Nov 10 23:56:06 2014 (r274360) @@ -147,11 +147,11 @@ void prefetch(void *x) #defineprefetch(x) #endif -struct i40e_osdep -{ +struct i40e_osdep { bus_space_tag_t mem_bus_space_tag; bus_space_handle_t mem_bus_space_handle; bus_size_t mem_bus_space_size; + uint32_tflush_reg; struct device *dev; }; @@ -208,6 +208,13 @@ wr32_osdep(struct i40e_osdep *osdep, uin osdep->mem_bus_space_handle, reg, value); } +static __inline void +ixl_flush_osdep(struct i40e_osdep *osdep) +{ + + rd32_osdep(osdep, osdep->flush_reg); +} + #define rd32(a, reg) rd32_osdep((a)->back, (reg)) #define wr32(a, reg, value)wr32_osdep((a)->back, (reg), (value)) @@ -221,9 +228,6 @@ wr32_osdep(struct i40e_osdep *osdep, uin ((struct i40e_osdep *)(a)->back)->mem_bus_space_handle, \ reg, value)) -#define ixl_flush(a) (\ - bus_space_read_4( ((struct i40e_osdep *)(a)->back)->mem_bus_space_tag, \ - ((struct i40e_osdep *)(a)->back)->mem_bus_space_handle, \ - I40E_GLGEN_STAT)) +#define ixl_flush(a) ixl_flush_osdep((a)->back) #endif /* _I40E_OSDEP_H_ */ Modified: stable/10/sys/dev/ixl/if_ixl.c == --- stable/10/sys/dev/ixl/if_ixl.c Mon Nov 10 23:10:01 2014 (r274359) +++ stable/10/sys/dev/ixl/if_ixl.c Mon Nov 10 23:56:06 2014 (r274360) @@ -40,7 +40,7 @@ /* * Driver version */ -char ixl_driver_version[] = "1.2.2"; +char ixl_driver_version[] = "1.2.8"; /* * PCI Device ID Table @@ -109,6 +109,7 @@ static bool ixl_config_link(struct i40e_ static voidixl_config_rss(struct ixl_vsi *); static voidixl_set_queue_rx_itr(struct ixl_queue *); static voidixl_set_queue_tx_itr(struct ixl_queue *); +static int ixl_set_advertised_speeds(struct ixl_pf *, int); static voidixl_enable_rings(struct ixl_vsi *); static voidixl_disable_rings(struct ixl_vsi *); @@ -155,6 +156,7 @@ static void ixl_do_adminq(void *, int); static int ixl_set_flowcntl(SYSCTL_HANDLER_ARGS); static int ixl_set_advertise(SYSCTL_HANDLER_ARGS); static int ixl_current_speed(SYSCTL_HANDLER_ARGS); +static int ixl_sysctl_show_fw(SYSCTL_HANDLER_ARGS); /* Statistics */ static void ixl_add_hw_stats(struct ixl_pf *); @@ -176,7 +178,8 @@ static void ixl_stat_update32(struct i40 static int ixl_sysctl_link_status(SYSCTL_HANDLER_ARGS); static int ixl_sysctl_phy_abilities(SYSCTL_HANDLER_ARGS); static int ixl_sysctl_sw_filter_list(SYSCTL_HANDLER_ARGS); -static int ixl_sysctl_hw_res_info(SYSCTL_HANDLER_ARGS); +static int ixl_sysctl_hw_res_alloc(SYSCTL_HANDLER_ARGS); +static int ixl_sysctl_switch_config(SYSCTL_HANDLER_ARGS); static int ixl_sysctl_dump_txd(SYSCTL_HANDLER_ARGS); #endif @@ -276,6 +279,7 @@ int ixl_atr_rate = 20; TUNABLE_INT("hw.ixl.atr_rate", &ixl_atr_rate); #endif + static char *ixl_fc_string[6] = {
svn commit: r274218 - head/sys/dev/ixl
Author: jfv Date: Fri Nov 7 04:47:46 2014 New Revision: 274218 URL: https://svnweb.freebsd.org/changeset/base/274218 Log: Add header file missing from last commit. Submitted by: jfv MFC after: 1 week Added: head/sys/dev/ixl/ixlv_vc_mgr.h (contents, props changed) Added: head/sys/dev/ixl/ixlv_vc_mgr.h == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/ixl/ixlv_vc_mgr.h Fri Nov 7 04:47:46 2014 (r274218) @@ -0,0 +1,76 @@ +/** + + Copyright (c) 2013-2014, Intel Corporation + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + 3. Neither the name of the Intel Corporation nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +**/ +/*$FreeBSD$*/ + +#ifndef _IXLV_VC_MGR_H_ +#define _IXLV_VC_MGR_H_ + +#include + +struct ixl_vc_cmd; + +typedef void ixl_vc_callback_t(struct ixl_vc_cmd *, void *, + enum i40e_status_code); + + +#defineIXLV_VC_CMD_FLAG_BUSY 0x0001 + +struct ixl_vc_cmd +{ + uint32_t request; + uint32_t flags; + + ixl_vc_callback_t *callback; + void *arg; + + TAILQ_ENTRY(ixl_vc_cmd) next; +}; + +struct ixl_vc_mgr +{ + struct ixlv_sc *sc; + struct ixl_vc_cmd *current; + struct callout callout; + + TAILQ_HEAD(, ixl_vc_cmd) pending; +}; + +#defineIXLV_VC_TIMEOUT (2 * hz) + +void ixl_vc_init_mgr(struct ixlv_sc *, struct ixl_vc_mgr *); +void ixl_vc_enqueue(struct ixl_vc_mgr *, struct ixl_vc_cmd *, + uint32_t, ixl_vc_callback_t *, void *); +void ixl_vc_flush(struct ixl_vc_mgr *mgr); + +#endif + ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r274205 - in head/sys: dev/ixl modules/ixlv
Author: jfv Date: Thu Nov 6 23:45:05 2014 New Revision: 274205 URL: https://svnweb.freebsd.org/changeset/base/274205 Log: Update the Intel i40e drivers, ixl version 1.2.8, ixlv version 1.1.18 -Improved VF stability, thanks to changes from Ryan Stone, and Juniper. - RSS fixes in the ixlv driver - link detection in the ixlv driver - New sysctl's added in ixl and ixlv - reset timeout increased for ixlv - stability fixes in detach - correct media reporting - Coverity warnings fixed - Many small bug fixes - VF Makefile modified - nvm shared code needed - remove unused sleep channels in ixlv_sc struct Submitted by: Eric Joyner (committed by jfv) MFC after:1 week Modified: head/sys/dev/ixl/i40e_osdep.c head/sys/dev/ixl/i40e_osdep.h head/sys/dev/ixl/if_ixl.c head/sys/dev/ixl/if_ixlv.c head/sys/dev/ixl/ixl.h head/sys/dev/ixl/ixl_txrx.c head/sys/dev/ixl/ixlv.h head/sys/dev/ixl/ixlvc.c head/sys/modules/ixlv/Makefile Modified: head/sys/dev/ixl/i40e_osdep.c == --- head/sys/dev/ixl/i40e_osdep.c Thu Nov 6 23:35:22 2014 (r274204) +++ head/sys/dev/ixl/i40e_osdep.c Thu Nov 6 23:45:05 2014 (r274205) @@ -107,6 +107,7 @@ i40e_allocate_dma_mem(struct i40e_hw *hw "error %u\n", err); goto fail_2; } + mem->nseg = 1; mem->size = size; bus_dmamap_sync(mem->tag, mem->map, BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE); Modified: head/sys/dev/ixl/i40e_osdep.h == --- head/sys/dev/ixl/i40e_osdep.h Thu Nov 6 23:35:22 2014 (r274204) +++ head/sys/dev/ixl/i40e_osdep.h Thu Nov 6 23:45:05 2014 (r274205) @@ -147,8 +147,7 @@ void prefetch(void *x) #defineprefetch(x) #endif -struct i40e_osdep -{ +struct i40e_osdep { bus_space_tag_t mem_bus_space_tag; bus_space_handle_t mem_bus_space_handle; bus_size_t mem_bus_space_size; Modified: head/sys/dev/ixl/if_ixl.c == --- head/sys/dev/ixl/if_ixl.c Thu Nov 6 23:35:22 2014(r274204) +++ head/sys/dev/ixl/if_ixl.c Thu Nov 6 23:45:05 2014(r274205) @@ -40,7 +40,7 @@ /* * Driver version */ -char ixl_driver_version[] = "1.2.2"; +char ixl_driver_version[] = "1.2.8"; /* * PCI Device ID Table @@ -109,6 +109,7 @@ static bool ixl_config_link(struct i40e_ static voidixl_config_rss(struct ixl_vsi *); static voidixl_set_queue_rx_itr(struct ixl_queue *); static voidixl_set_queue_tx_itr(struct ixl_queue *); +static int ixl_set_advertised_speeds(struct ixl_pf *, int); static voidixl_enable_rings(struct ixl_vsi *); static voidixl_disable_rings(struct ixl_vsi *); @@ -155,6 +156,7 @@ static void ixl_do_adminq(void *, int); static int ixl_set_flowcntl(SYSCTL_HANDLER_ARGS); static int ixl_set_advertise(SYSCTL_HANDLER_ARGS); static int ixl_current_speed(SYSCTL_HANDLER_ARGS); +static int ixl_sysctl_show_fw(SYSCTL_HANDLER_ARGS); /* Statistics */ static void ixl_add_hw_stats(struct ixl_pf *); @@ -176,7 +178,8 @@ static void ixl_stat_update32(struct i40 static int ixl_sysctl_link_status(SYSCTL_HANDLER_ARGS); static int ixl_sysctl_phy_abilities(SYSCTL_HANDLER_ARGS); static int ixl_sysctl_sw_filter_list(SYSCTL_HANDLER_ARGS); -static int ixl_sysctl_hw_res_info(SYSCTL_HANDLER_ARGS); +static int ixl_sysctl_hw_res_alloc(SYSCTL_HANDLER_ARGS); +static int ixl_sysctl_switch_config(SYSCTL_HANDLER_ARGS); static int ixl_sysctl_dump_txd(SYSCTL_HANDLER_ARGS); #endif @@ -276,6 +279,7 @@ int ixl_atr_rate = 20; TUNABLE_INT("hw.ixl.atr_rate", &ixl_atr_rate); #endif + static char *ixl_fc_string[6] = { "None", "Rx", @@ -398,6 +402,11 @@ ixl_attach(device_t dev) OID_AUTO, "current_speed", CTLTYPE_STRING | CTLFLAG_RD, pf, 0, ixl_current_speed, "A", "Current Port Speed"); + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "fw_version", CTLTYPE_STRING | CTLFLAG_RD, + pf, 0, ixl_sysctl_show_fw, "A", "Firmware version"); + SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "rx_itr", CTLFLAG_RW, @@ -436,8 +445,13 @@ ixl_attach(device_t dev) SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), - OID_AUTO, "hw
svn commit: r270919 - in stable/10/sys: conf dev/ixl modules
Author: jfv Date: Mon Sep 1 07:54:30 2014 New Revision: 270919 URL: http://svnweb.freebsd.org/changeset/base/270919 Log: MFC of 270755, 270772, 270773, 270775, 270799, 270806, 270807, 270820 Enable the build of the Intel XL710 drivers, and fixes for that build. Modified: stable/10/sys/conf/NOTES stable/10/sys/dev/ixl/README stable/10/sys/dev/ixl/i40e_alloc.h stable/10/sys/dev/ixl/i40e_common.c stable/10/sys/dev/ixl/i40e_osdep.h stable/10/sys/dev/ixl/if_ixl.c stable/10/sys/dev/ixl/if_ixlv.c stable/10/sys/dev/ixl/ixl.h stable/10/sys/dev/ixl/ixl_txrx.c stable/10/sys/modules/Makefile Modified: stable/10/sys/conf/NOTES == --- stable/10/sys/conf/NOTESMon Sep 1 07:34:36 2014(r270918) +++ stable/10/sys/conf/NOTESMon Sep 1 07:54:30 2014(r270919) @@ -2089,6 +2089,8 @@ deviceem # Intel Pro/1000 Gigabit Eth device igb # Intel Pro/1000 PCIE Gigabit Ethernet device ixgb# Intel Pro/10Gbe PCI-X Ethernet device ixgbe # Intel Pro/10Gbe PCIE Ethernet +device ixl # Intel XL710 40Gbe PCIE Ethernet +device ixlv# Intel XL710 40Gbe VF PCIE Ethernet device le # AMD Am7900 LANCE and Am79C9xx PCnet device mxge# Myricom Myri-10G 10GbE NIC device nxge# Neterion Xframe 10GbE Server/Storage Adapter Modified: stable/10/sys/dev/ixl/README == --- stable/10/sys/dev/ixl/READMEMon Sep 1 07:34:36 2014 (r270918) +++ stable/10/sys/dev/ixl/READMEMon Sep 1 07:54:30 2014 (r270919) @@ -1,9 +1,10 @@ -ixl FreeBSD* Base Driver for the Intel� XL710 Ethernet Controller Family + ixl FreeBSD* Base Driver and ixlv VF Driver for the +Intel XL710 Ethernet Controller Family /*$FreeBSD$*/ -July 21, 2014 +August 26, 2014 Contents @@ -11,6 +12,7 @@ Contents - Overview - Supported Adapters +- The VF Driver - Building and Installation - Additional Configurations - Known Limitations @@ -19,15 +21,21 @@ Contents Overview -This file describes the IXL FreeBSD* Base driver for the XL710 Ethernet Family of Adapters. The Driver has been developed for use with FreeBSD 10.0 or later, but should be compatible with any supported release. - -For questions related to hardware requirements, refer to the documentation supplied with your Intel XL710 adapter. All hardware requirements listed apply for use with FreeBSD. +This file describes the IXL FreeBSD* Base driver and the IXLV VF Driver +for the XL710 Ethernet Family of Adapters. The Driver has been developed +for use with FreeBSD 10.0 or later, but should be compatible with any +supported release. + +For questions related to hardware requirements, refer to the documentation +supplied with your Intel XL710 adapter. All hardware requirements listed +apply for use with FreeBSD. Supported Adapters == -The driver in this release is compatible with XL710 and X710-based Intel Ethernet Network Connections. +The drivers in this release are compatible with XL710 and X710-based +Intel Ethernet Network Connections. SFP+ Devices with Pluggable Optics @@ -49,18 +57,45 @@ QSFP+ Modules Intel TRIPLE RATE 1G/10G/40G QSFP+ LR (bailed)E40GQSFPLR QSFP+ 1G speed is not supported on XL710 based devices. -X710/XL710 Based SFP+ adapters support all passive and active limiting direct attach cables that comply with SFF-8431 v4.1 and SFF-8472 v10.4 specifications. +X710/XL710 Based SFP+ adapters support all passive and active limiting direct +attach cables that comply with SFF-8431 v4.1 and SFF-8472 v10.4 specifications. +The VF Driver +== +The VF driver is normally used in a virtualized environment where a host +driver manages SRIOV, and provides a VF device to the guest. With this +first release the only host environment tested was using Linux QEMU/KVM. +Support is planned for Xen and VMWare hosts at a later time. + +In the FreeBSD guest the IXLV driver would be loaded and will function +using the VF device assigned to it. + +The VF driver provides most of the same functionality as the CORE driver, +but is actually a slave to the Host, access to many controls are actually +accomplished by a request to the Host via what is called the "Admin queue". +These are startup and initialization events however, once in operation +the device is self-contained and should achieve near native performance. + +Some notable limitations of the VF environment: for security reasons +the driver is never permitted to be promiscuous, therefore a tcpdump +will not behave the same with the interface. Second, media info is not +available from
svn commit: r270775 - head/sys/dev/ixl
Author: jfv Date: Fri Aug 29 00:33:31 2014 New Revision: 270775 URL: http://svnweb.freebsd.org/changeset/base/270775 Log: Fix the NOINET and NOINET6 builds. MFC after:3 days Modified: head/sys/dev/ixl/ixl_txrx.c Modified: head/sys/dev/ixl/ixl_txrx.c == --- head/sys/dev/ixl/ixl_txrx.c Thu Aug 28 23:32:56 2014(r270774) +++ head/sys/dev/ixl/ixl_txrx.c Fri Aug 29 00:33:31 2014(r270775) @@ -596,6 +596,7 @@ ixl_tx_setup_offload(struct ixl_queue *q switch (etype) { case ETHERTYPE_IP: +#ifdef INET ip = (struct ip *)(mp->m_data + elen); ip_hlen = ip->ip_hl << 2; ipproto = ip->ip_p; @@ -605,14 +606,17 @@ ixl_tx_setup_offload(struct ixl_queue *q *cmd |= I40E_TX_DESC_CMD_IIPT_IPV4_CSUM; else *cmd |= I40E_TX_DESC_CMD_IIPT_IPV4; +#endif break; case ETHERTYPE_IPV6: +#ifdef INET6 ip6 = (struct ip6_hdr *)(mp->m_data + elen); ip_hlen = sizeof(struct ip6_hdr); ipproto = ip6->ip6_nxt; th = (struct tcphdr *)((caddr_t)ip6 + ip_hlen); *cmd |= I40E_TX_DESC_CMD_IIPT_IPV6; /* Falls thru */ +#endif default: break; } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r270773 - head/sys/dev/ixl
Author: jfv Date: Thu Aug 28 22:52:20 2014 New Revision: 270773 URL: http://svnweb.freebsd.org/changeset/base/270773 Log: Remove the DEV_NETMAP code from the ixl drivers, it was a placeholder and not yet ready to be defined, and its causing build errors. MFC after:3 days Modified: head/sys/dev/ixl/if_ixl.c head/sys/dev/ixl/ixl.h head/sys/dev/ixl/ixl_txrx.c Modified: head/sys/dev/ixl/if_ixl.c == --- head/sys/dev/ixl/if_ixl.c Thu Aug 28 21:45:07 2014(r270772) +++ head/sys/dev/ixl/if_ixl.c Thu Aug 28 22:52:20 2014(r270773) @@ -276,10 +276,6 @@ int ixl_atr_rate = 20; TUNABLE_INT("hw.ixl.atr_rate", &ixl_atr_rate); #endif -#ifdef DEV_NETMAP -#include -#endif /* DEV_NETMAP */ - static char *ixl_fc_string[6] = { "None", "Rx", @@ -652,10 +648,6 @@ ixl_attach(device_t dev) vsi->vlan_detach = EVENTHANDLER_REGISTER(vlan_unconfig, ixl_unregister_vlan, vsi, EVENTHANDLER_PRI_FIRST); -#ifdef DEV_NETMAP - ixl_netmap_attach(pf); -#endif /* DEV_NETMAP */ - INIT_DEBUGOUT("ixl_attach: end"); return (0); @@ -733,10 +725,6 @@ ixl_detach(device_t dev) ether_ifdetach(vsi->ifp); callout_drain(&pf->timer); -#ifdef DEV_NETMAP - netmap_detach(vsi->ifp); -#endif /* DEV_NETMAP */ - ixl_free_pci_resources(pf); bus_generic_detach(dev); if_free(vsi->ifp); @@ -2552,12 +2540,6 @@ ixl_initialize_vsi(struct ixl_vsi *vsi) rctx.tphdata_ena = 0; rctx.tphhead_ena = 0; rctx.lrxqthresh = 2; -#ifdef DEV_NETMAP - /* "CRC strip in netmap is conditional" */ - if (vsi->ifp->if_capenable & IFCAP_NETMAP && !ixl_crcstrip) - rctx.crcstrip = 0; - else -#endif /* DEV_NETMAP */ rctx.crcstrip = 1; rctx.l2tsel = 1; rctx.showiv = 1; @@ -2581,21 +2563,6 @@ ixl_initialize_vsi(struct ixl_vsi *vsi) break; } wr32(vsi->hw, I40E_QRX_TAIL(que->me), 0); -#ifdef DEV_NETMAP - /* TODO appropriately comment -* Code based on netmap code in ixgbe_init_locked() -* Messes with what the software sets as queue -* descriptor tail in hardware. -*/ - if (vsi->ifp->if_capenable & IFCAP_NETMAP) - { - struct netmap_adapter *na = NA(vsi->ifp); - struct netmap_kring *kring = &na->rx_rings[que->me]; - int t = na->num_rx_desc - 1 - kring->nr_hwavail; - - wr32(vsi->hw, I40E_QRX_TAIL(que->me), t); - } else -#endif /* DEV_NETMAP */ wr32(vsi->hw, I40E_QRX_TAIL(que->me), que->num_desc - 1); } return (err); Modified: head/sys/dev/ixl/ixl.h == --- head/sys/dev/ixl/ixl.h Thu Aug 28 21:45:07 2014(r270772) +++ head/sys/dev/ixl/ixl.h Thu Aug 28 22:52:20 2014(r270773) @@ -295,9 +295,6 @@ struct ixl_rx_buf { struct mbuf *fmp; bus_dmamap_thmap; bus_dmamap_tpmap; -#ifdef DEV_NETMAP - u64 addr; -#endif }; /* Modified: head/sys/dev/ixl/ixl_txrx.c == --- head/sys/dev/ixl/ixl_txrx.c Thu Aug 28 21:45:07 2014(r270772) +++ head/sys/dev/ixl/ixl_txrx.c Thu Aug 28 22:52:20 2014(r270773) @@ -454,17 +454,9 @@ ixl_init_tx_ring(struct ixl_queue *que) { struct tx_ring *txr = &que->txr; struct ixl_tx_buf *buf; -#ifdef DEV_NETMAP - struct ixl_vsi *vsi = que->vsi; - struct netmap_adapter *na = NA(vsi->ifp); - struct netmap_slot *slot; -#endif /* DEV_NETMAP */ /* Clear the old ring contents */ IXL_TX_LOCK(txr); -#ifdef DEV_NETMAP - slot = netmap_reset(na, NR_TX, que->me, 0); -#endif bzero((void *)txr->base, (sizeof(struct i40e_tx_desc)) * que->num_desc); @@ -488,13 +480,6 @@ ixl_init_tx_ring(struct ixl_queue *que) m_freem(buf->m_head); buf->m_head = NULL; } -#ifdef DEV_NETMAP - if (slot) - { - int si = netmap_idx_n2k(&na->tx_rings[que->me], i); - netmap_load_map(txr->tag, buf->map, NMB(slot + si)); - } -#endif /* Clear the EOP index */ buf->eop_index = -1; } @@ -573,9 +558,13 @@ ixl_tx_setup_offload(struct ixl_queue *q struct mbuf *mp, u32 *cmd, u32 *off) { struct ether_vlan_header*eh; +#ifdef INET struct ip *ip = NULL; +#endif struct tcphdr *th = NULL; +
svn commit: r270772 - head/sys/dev/ixl
Author: jfv Date: Thu Aug 28 21:45:07 2014 New Revision: 270772 URL: http://svnweb.freebsd.org/changeset/base/270772 Log: Some corrections, reformating, and additional info about the VF driver in the README. MFC after: 1 day Modified: head/sys/dev/ixl/README Modified: head/sys/dev/ixl/README == --- head/sys/dev/ixl/README Thu Aug 28 21:30:39 2014(r270771) +++ head/sys/dev/ixl/README Thu Aug 28 21:45:07 2014(r270772) @@ -1,9 +1,10 @@ -ixl FreeBSD* Base Driver for the Intel� XL710 Ethernet Controller Family + ixl FreeBSD* Base Driver and ixlv VF Driver for the +Intel XL710 Ethernet Controller Family /*$FreeBSD$*/ -July 21, 2014 +August 26, 2014 Contents @@ -11,6 +12,7 @@ Contents - Overview - Supported Adapters +- The VF Driver - Building and Installation - Additional Configurations - Known Limitations @@ -19,15 +21,21 @@ Contents Overview -This file describes the IXL FreeBSD* Base driver for the XL710 Ethernet Family of Adapters. The Driver has been developed for use with FreeBSD 10.0 or later, but should be compatible with any supported release. - -For questions related to hardware requirements, refer to the documentation supplied with your Intel XL710 adapter. All hardware requirements listed apply for use with FreeBSD. +This file describes the IXL FreeBSD* Base driver and the IXLV VF Driver +for the XL710 Ethernet Family of Adapters. The Driver has been developed +for use with FreeBSD 10.0 or later, but should be compatible with any +supported release. + +For questions related to hardware requirements, refer to the documentation +supplied with your Intel XL710 adapter. All hardware requirements listed +apply for use with FreeBSD. Supported Adapters == -The driver in this release is compatible with XL710 and X710-based Intel Ethernet Network Connections. +The drivers in this release are compatible with XL710 and X710-based +Intel Ethernet Network Connections. SFP+ Devices with Pluggable Optics @@ -49,18 +57,45 @@ QSFP+ Modules Intel TRIPLE RATE 1G/10G/40G QSFP+ LR (bailed)E40GQSFPLR QSFP+ 1G speed is not supported on XL710 based devices. -X710/XL710 Based SFP+ adapters support all passive and active limiting direct attach cables that comply with SFF-8431 v4.1 and SFF-8472 v10.4 specifications. +X710/XL710 Based SFP+ adapters support all passive and active limiting direct +attach cables that comply with SFF-8431 v4.1 and SFF-8472 v10.4 specifications. +The VF Driver +== +The VF driver is normally used in a virtualized environment where a host +driver manages SRIOV, and provides a VF device to the guest. With this +first release the only host environment tested was using Linux QEMU/KVM. +Support is planned for Xen and VMWare hosts at a later time. + +In the FreeBSD guest the IXLV driver would be loaded and will function +using the VF device assigned to it. + +The VF driver provides most of the same functionality as the CORE driver, +but is actually a slave to the Host, access to many controls are actually +accomplished by a request to the Host via what is called the "Admin queue". +These are startup and initialization events however, once in operation +the device is self-contained and should achieve near native performance. + +Some notable limitations of the VF environment: for security reasons +the driver is never permitted to be promiscuous, therefore a tcpdump +will not behave the same with the interface. Second, media info is not +available from the PF, so it will always appear as auto. -Building and Installation +Tarball Building and Installation = -NOTE: You must have kernel sources installed to compile the driver module. +NOTE: You must have kernel sources installed to compile the driver tarball. + +These instructions assume a standalone driver tarball, building the driver +already in the kernel source is simply a matter of adding the device entry +to the kernel config file, or building in the ixl or ixlv module directory. In the instructions below, x.x.x is the driver version -as indicated in thename of the driver tar. +as indicated in the name of the driver tarball. The example is +for ixl, the same procedure applies for ixlv. -1. Move the base driver tar file to the directory of your choice. For example, use /home/username/ixl or /usr/local/src/ixl. +1. Move the base driver tar file to the directory of your choice. + For example, use /home/username/ixl or /usr/local/src/ixl. 2. Untar/unzip the archive: tar xfz ixl-x.x.x.tar.gz @@ -76,7 +111,9 @@ as indicated in thename of the driver ta 5. To assign an IP address to the interface, enter the following: ifconfig ixl -6. Verify that the interface works. Enter the followi
svn commit: r270755 - in head/sys: conf modules
Author: jfv Date: Thu Aug 28 17:40:19 2014 New Revision: 270755 URL: http://svnweb.freebsd.org/changeset/base/270755 Log: Add XL710 device entries to NOTES, and directories to the module Makefile so they will be built. MFC after: 1 day Modified: head/sys/conf/NOTES head/sys/modules/Makefile Modified: head/sys/conf/NOTES == --- head/sys/conf/NOTES Thu Aug 28 16:26:13 2014(r270754) +++ head/sys/conf/NOTES Thu Aug 28 17:40:19 2014(r270755) @@ -2094,6 +2094,8 @@ deviceem # Intel Pro/1000 Gigabit Eth device igb # Intel Pro/1000 PCIE Gigabit Ethernet device ixgb# Intel Pro/10Gbe PCI-X Ethernet device ixgbe # Intel Pro/10Gbe PCIE Ethernet +device ixl # Intel XL710 40Gbe PCIE Ethernet +device ixlv# Intel XL710 40Gbe VF PCIE Ethernet device le # AMD Am7900 LANCE and Am79C9xx PCnet device mxge# Myricom Myri-10G 10GbE NIC device nxge# Neterion Xframe 10GbE Server/Storage Adapter Modified: head/sys/modules/Makefile == --- head/sys/modules/Makefile Thu Aug 28 16:26:13 2014(r270754) +++ head/sys/modules/Makefile Thu Aug 28 17:40:19 2014(r270755) @@ -180,6 +180,8 @@ SUBDIR= \ ${_iwnfw} \ ${_ixgb} \ ${_ixgbe} \ + ${_ixl} \ + ${_ixlv} \ jme \ joy \ kbdmux \ @@ -622,6 +624,8 @@ _iwnfw= iwnfw .endif _ixgb= ixgb _ixgbe=ixgbe +_ixl= ixl +_ixlv= ixlv _mly= mly _nfe= nfe _nvd= nvd @@ -729,6 +733,8 @@ _iwnfw= iwnfw .endif _ixgb= ixgb _ixgbe=ixgbe +_ixl= ixl +_ixlv= ixlv _linprocfs=linprocfs _linsysfs= linsysfs _linux=linux ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r270631 - in stable/10/sys: conf dev/ixl modules/ixl modules/ixlv
Author: jfv Date: Mon Aug 25 22:04:29 2014 New Revision: 270631 URL: http://svnweb.freebsd.org/changeset/base/270631 Log: MFC of the Intel Base driver for the Intel XL710 Ethernet Controller Family - It was decided to change the driver name to if_ixl for FreeBSD - This release adds the VF Driver to the tree, it can be built into the kernel or as the if_ixlv module - The VF driver is independent for the first time, this will be desireable when full SRIOV capability is added to the OS. Submitted by: jack.vo...@intel.com and eric.joy...@intel.com Added: stable/10/sys/dev/ixl/ stable/10/sys/dev/ixl/README (contents, props changed) stable/10/sys/dev/ixl/i40e_adminq.c (contents, props changed) stable/10/sys/dev/ixl/i40e_adminq.h (contents, props changed) stable/10/sys/dev/ixl/i40e_adminq_cmd.h (contents, props changed) stable/10/sys/dev/ixl/i40e_alloc.h (contents, props changed) stable/10/sys/dev/ixl/i40e_common.c (contents, props changed) stable/10/sys/dev/ixl/i40e_hmc.c (contents, props changed) stable/10/sys/dev/ixl/i40e_hmc.h (contents, props changed) stable/10/sys/dev/ixl/i40e_lan_hmc.c (contents, props changed) stable/10/sys/dev/ixl/i40e_lan_hmc.h (contents, props changed) stable/10/sys/dev/ixl/i40e_nvm.c (contents, props changed) stable/10/sys/dev/ixl/i40e_osdep.c (contents, props changed) stable/10/sys/dev/ixl/i40e_osdep.h (contents, props changed) stable/10/sys/dev/ixl/i40e_prototype.h (contents, props changed) stable/10/sys/dev/ixl/i40e_register.h (contents, props changed) stable/10/sys/dev/ixl/i40e_register_x710_int.h (contents, props changed) stable/10/sys/dev/ixl/i40e_status.h (contents, props changed) stable/10/sys/dev/ixl/i40e_type.h (contents, props changed) stable/10/sys/dev/ixl/i40e_virtchnl.h (contents, props changed) stable/10/sys/dev/ixl/if_ixl.c (contents, props changed) stable/10/sys/dev/ixl/if_ixlv.c (contents, props changed) stable/10/sys/dev/ixl/ixl.h (contents, props changed) stable/10/sys/dev/ixl/ixl_pf.h (contents, props changed) stable/10/sys/dev/ixl/ixl_txrx.c (contents, props changed) stable/10/sys/dev/ixl/ixlv.h (contents, props changed) stable/10/sys/dev/ixl/ixlvc.c (contents, props changed) stable/10/sys/modules/ixl/ stable/10/sys/modules/ixl/Makefile (contents, props changed) stable/10/sys/modules/ixlv/ stable/10/sys/modules/ixlv/Makefile (contents, props changed) Modified: stable/10/sys/conf/files Modified: stable/10/sys/conf/files == --- stable/10/sys/conf/filesMon Aug 25 21:21:29 2014(r270630) +++ stable/10/sys/conf/filesMon Aug 25 22:04:29 2014(r270631) @@ -1729,6 +1729,26 @@ dev/ixgbe/ixgbe_dcb_82598.c optional ixg compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_dcb_82599.coptional ixgbe inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" +dev/ixl/if_ixl.c optional ixl inet \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/if_ixlv.c optional ixlv inet \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/ixlvc.coptional ixlv inet \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/ixl_txrx.c optional ixl ixlv inet \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/i40e_osdep.c optional ixl ixlv inet \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/i40e_lan_hmc.c optional ixl ixlv inet \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/i40e_hmc.c optional ixl ixlv inet \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/i40e_common.c optional ixl ixlv inet \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/i40e_nvm.c optional ixl ixlv inet \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/i40e_adminq.c optional ixl ixlv inet \ + compile-with "${NORMAL_C} -I$S/dev/ixl" dev/jme/if_jme.c optional jme pci dev/joy/joy.c optional joy dev/joy/joy_isa.c optional joy isa Added: stable/10/sys/dev/ixl/README == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/dev/ixl/READMEMon Aug 25 22:04:29 2014 (r270631) @@ -0,0 +1,342 @@ +ixl FreeBSD* Base Driver for the Intel� XL710 Ethernet Controller Family + +/*$FreeBSD$*/ + + +July 21, 2014 + + +Contents + + +- Overview +- Supported Adapters +- Building and Installation +- Additional Configurations +- Known Limitations + + +Overview + + +This file describes the IXL FreeBSD* Base driver for the XL710 Ethernet Family of Adapters. The Driver has been developed for use with FreeBSD 10.0 or late
svn commit: r270346 - in head/sys: conf dev/i40e dev/ixl modules/i40e modules/ixl modules/ixlv
Author: jfv Date: Fri Aug 22 18:59:19 2014 New Revision: 270346 URL: http://svnweb.freebsd.org/changeset/base/270346 Log: Update to the Intel Base driver for the Intel XL710 Ethernet Controller Family - It was decided to change the driver name to if_ixl for FreeBSD - This release adds the VF Driver to the tree, it can be built into the kernel or as the if_ixlv module - The VF driver is independent for the first time, this will be desireable when full SRIOV capability is added to the OS. - Thanks to my new coworker Eric Joyner for his superb work in both the core and vf driver code. Enjoy everyone! Submitted by: jack.vo...@intel.com and eric.joy...@intel.com MFC after:3 days (hoping to make 10.1) Added: head/sys/dev/ixl/ - copied from r270343, head/sys/dev/i40e/ head/sys/dev/ixl/if_ixl.c - copied, changed from r270343, head/sys/dev/i40e/if_i40e.c head/sys/dev/ixl/if_ixlv.c (contents, props changed) head/sys/dev/ixl/ixl.h (contents, props changed) head/sys/dev/ixl/ixl_pf.h (contents, props changed) head/sys/dev/ixl/ixl_txrx.c - copied, changed from r270343, head/sys/dev/i40e/i40e_txrx.c head/sys/dev/ixl/ixlv.h (contents, props changed) head/sys/dev/ixl/ixlvc.c (contents, props changed) head/sys/modules/ixl/ - copied from r270343, head/sys/modules/i40e/ head/sys/modules/ixlv/ head/sys/modules/ixlv/Makefile (contents, props changed) Deleted: head/sys/dev/i40e/ head/sys/dev/ixl/i40e.h head/sys/dev/ixl/i40e_pf.h head/sys/dev/ixl/i40e_txrx.c head/sys/dev/ixl/if_i40e.c head/sys/modules/i40e/ Modified: head/sys/conf/files head/sys/dev/ixl/README (contents, props changed) head/sys/dev/ixl/i40e_adminq.c head/sys/dev/ixl/i40e_adminq.h head/sys/dev/ixl/i40e_adminq_cmd.h head/sys/dev/ixl/i40e_common.c head/sys/dev/ixl/i40e_osdep.c head/sys/dev/ixl/i40e_osdep.h head/sys/dev/ixl/i40e_prototype.h head/sys/dev/ixl/i40e_type.h head/sys/dev/ixl/i40e_virtchnl.h head/sys/modules/ixl/Makefile Modified: head/sys/conf/files == --- head/sys/conf/files Fri Aug 22 18:42:14 2014(r270345) +++ head/sys/conf/files Fri Aug 22 18:59:19 2014(r270346) @@ -1424,22 +1424,26 @@ dev/hptiop/hptiop.c optional hptiop scb dev/hwpmc/hwpmc_logging.c optional hwpmc dev/hwpmc/hwpmc_mod.c optional hwpmc dev/hwpmc/hwpmc_soft.c optional hwpmc -dev/i40e/if_i40e.c optional i40e inet \ - compile-with "${NORMAL_C} -I$S/dev/i40e -DSMP" -dev/i40e/i40e_txrx.c optional i40e inet \ - compile-with "${NORMAL_C} -I$S/dev/i40e -DSMP" -dev/i40e/i40e_osdep.c optional i40e inet \ - compile-with "${NORMAL_C} -I$S/dev/i40e -DSMP" -dev/i40e/i40e_nvm.coptional i40e inet \ - compile-with "${NORMAL_C} -I$S/dev/i40e -DSMP" -dev/i40e/i40e_lan_hmc.coptional i40e inet \ - compile-with "${NORMAL_C} -I$S/dev/i40e -DSMP" -dev/i40e/i40e_hmc.coptional i40e inet \ - compile-with "${NORMAL_C} -I$S/dev/i40e -DSMP" -dev/i40e/i40e_common.c optional i40e inet \ - compile-with "${NORMAL_C} -I$S/dev/i40e -DSMP" -dev/i40e/i40e_adminq.c optional i40e inet \ - compile-with "${NORMAL_C} -I$S/dev/i40e -DSMP" +dev/ixl/if_ixl.c optional ixl inet \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/if_ixlv.c optional ixlv inet \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/ixlvc.coptional ixlv inet \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/ixl_txrx.c optional ixl ixlv inet \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/i40e_osdep.c optional ixl ixlv inet \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/i40e_lan_hmc.c optional ixl ixlv inet \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/i40e_hmc.c optional ixl ixlv inet \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/i40e_common.c optional ixl ixlv inet \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/i40e_nvm.c optional ixl ixlv inet \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/i40e_adminq.c optional ixl ixlv inet \ + compile-with "${NORMAL_C} -I$S/dev/ixl" dev/ichsmb/ichsmb.coptional ichsmb dev/ichsmb/ichsmb_pci.coptional ichsmb pci dev/ida/ida.c optional ida Modified: head/sys/dev/ixl/README == --- head/sys/dev/i40e/READMEFri Aug 22 17:49:24 2014(r270343) +++ head/sys/dev/ixl/README Fri Aug 22 18:59:19 2014(r270346) @@ -1,7 +1,7 @@ -FreeBSD Base Driver for the Intel� XL710 Ethernet Controller Family -=
svn commit: r269647 - stable/9/sys/dev/e1000
Author: jfv Date: Wed Aug 6 22:15:01 2014 New Revision: 269647 URL: http://svnweb.freebsd.org/changeset/base/269647 Log: MFC of the r267935 - Shared code update - em driver support for i218 devices - igb brought up to the 2.4.0 level Modified: stable/9/sys/dev/e1000/e1000_80003es2lan.c stable/9/sys/dev/e1000/e1000_80003es2lan.h stable/9/sys/dev/e1000/e1000_82542.c stable/9/sys/dev/e1000/e1000_82571.c stable/9/sys/dev/e1000/e1000_82571.h stable/9/sys/dev/e1000/e1000_82575.c stable/9/sys/dev/e1000/e1000_82575.h stable/9/sys/dev/e1000/e1000_api.c stable/9/sys/dev/e1000/e1000_api.h stable/9/sys/dev/e1000/e1000_defines.h stable/9/sys/dev/e1000/e1000_hw.h stable/9/sys/dev/e1000/e1000_i210.c stable/9/sys/dev/e1000/e1000_i210.h stable/9/sys/dev/e1000/e1000_ich8lan.c stable/9/sys/dev/e1000/e1000_ich8lan.h stable/9/sys/dev/e1000/e1000_mac.c stable/9/sys/dev/e1000/e1000_mac.h stable/9/sys/dev/e1000/e1000_manage.c stable/9/sys/dev/e1000/e1000_mbx.c stable/9/sys/dev/e1000/e1000_mbx.h stable/9/sys/dev/e1000/e1000_nvm.c stable/9/sys/dev/e1000/e1000_osdep.h stable/9/sys/dev/e1000/e1000_phy.c stable/9/sys/dev/e1000/e1000_phy.h stable/9/sys/dev/e1000/e1000_regs.h stable/9/sys/dev/e1000/e1000_vf.c stable/9/sys/dev/e1000/e1000_vf.h stable/9/sys/dev/e1000/if_em.c stable/9/sys/dev/e1000/if_igb.c stable/9/sys/dev/e1000/if_igb.h Modified: stable/9/sys/dev/e1000/e1000_80003es2lan.c == --- stable/9/sys/dev/e1000/e1000_80003es2lan.c Wed Aug 6 21:27:15 2014 (r269646) +++ stable/9/sys/dev/e1000/e1000_80003es2lan.c Wed Aug 6 22:15:01 2014 (r269647) @@ -1,6 +1,6 @@ /** - Copyright (c) 2001-2011, Intel Corporation + Copyright (c) 2001-2013, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -32,16 +32,12 @@ **/ /*$FreeBSD$*/ -/* - * 80003ES2LAN Gigabit Ethernet Controller (Copper) +/* 80003ES2LAN Gigabit Ethernet Controller (Copper) * 80003ES2LAN Gigabit Ethernet Controller (Serdes) */ #include "e1000_api.h" -static s32 e1000_init_phy_params_80003es2lan(struct e1000_hw *hw); -static s32 e1000_init_nvm_params_80003es2lan(struct e1000_hw *hw); -static s32 e1000_init_mac_params_80003es2lan(struct e1000_hw *hw); static s32 e1000_acquire_phy_80003es2lan(struct e1000_hw *hw); static void e1000_release_phy_80003es2lan(struct e1000_hw *hw); static s32 e1000_acquire_nvm_80003es2lan(struct e1000_hw *hw); @@ -71,14 +67,12 @@ static s32 e1000_read_kmrn_reg_80003es2 u16 *data); static s32 e1000_write_kmrn_reg_80003es2lan(struct e1000_hw *hw, u32 offset, u16 data); -static s32 e1000_copper_link_setup_gg82563_80003es2lan(struct e1000_hw *hw); static void e1000_initialize_hw_bits_80003es2lan(struct e1000_hw *hw); static void e1000_release_swfw_sync_80003es2lan(struct e1000_hw *hw, u16 mask); static s32 e1000_read_mac_addr_80003es2lan(struct e1000_hw *hw); static void e1000_power_down_phy_copper_80003es2lan(struct e1000_hw *hw); -/* - * A table for the GG82563 cable length where the range is defined +/* A table for the GG82563 cable length where the range is defined * with a lower bound at "index" and the upper bound at * "index + 5". */ @@ -95,13 +89,13 @@ static const u16 e1000_gg82563_cable_len static s32 e1000_init_phy_params_80003es2lan(struct e1000_hw *hw) { struct e1000_phy_info *phy = &hw->phy; - s32 ret_val = E1000_SUCCESS; + s32 ret_val; DEBUGFUNC("e1000_init_phy_params_80003es2lan"); if (hw->phy.media_type != e1000_media_type_copper) { phy->type = e1000_phy_none; - goto out; + return E1000_SUCCESS; } else { phy->ops.power_up = e1000_power_up_phy_copper; phy->ops.power_down = e1000_power_down_phy_copper_80003es2lan; @@ -133,12 +127,9 @@ static s32 e1000_init_phy_params_80003es ret_val = e1000_get_phy_id(hw); /* Verify phy id */ - if (phy->id != GG82563_E_PHY_ID) { - ret_val = -E1000_ERR_PHY; - goto out; - } + if (phy->id != GG82563_E_PHY_ID) + return -E1000_ERR_PHY; -out: return ret_val; } @@ -176,8 +167,7 @@ static s32 e1000_init_nvm_params_80003es size = (u16)((eecd & E1000_EECD_SIZE_EX_MASK) >> E1000_EECD_SIZE_EX_SHIFT); - /* -* Added to a constant, "size" becomes the left-shift value + /* Added to a constant, "size" becomes the left-shift value * for setting word_size. */ size += NVM_WORD_SIZE_BASE_SHIFT; @@ -234,8 +224,8
svn commit: r269201 - head/sys/dev/i40e
Author: jfv Date: Mon Jul 28 22:23:49 2014 New Revision: 269201 URL: http://svnweb.freebsd.org/changeset/base/269201 Log: Add new README to the driver... Added: head/sys/dev/i40e/README (contents, props changed) Added: head/sys/dev/i40e/README == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/i40e/READMEMon Jul 28 22:23:49 2014(r269201) @@ -0,0 +1,342 @@ +FreeBSD Base Driver for the Intel� XL710 Ethernet Controller Family + + +/*$FreeBSD$*/ + +July 21, 2014 + + +Contents + + +- Overview +- Supported Adapters +- Building and Installation +- Additional Configurations +- Known Limitations + + +Overview + + +This file describes the i40e FreeBSD* Base driver for the XL710 Ethernet Family of Adapters. The Driver has been developed for use with FreeBSD 10.0 or later, but should be compatible with any supported release. + +For questions related to hardware requirements, refer to the documentation supplied with your Intel XL710 adapter. All hardware requirements listed apply for use with FreeBSD. + + +Supported Adapters +== + +The driver in this release is compatible with XL710 and X710-based Intel Ethernet Network Connections. + + +SFP+ Devices with Pluggable Optics +-- + +SR Modules +-- + Intel DUAL RATE 1G/10G SFP+ SR (bailed)FTLX8571D3BCV-IT + Intel DUAL RATE 1G/10G SFP+ SR (bailed)AFBR-703SDZ-IN2 + +LR Modules +-- + Intel DUAL RATE 1G/10G SFP+ LR (bailed)FTLX1471D3BCV-IT + Intel DUAL RATE 1G/10G SFP+ LR (bailed)AFCT-701SDZ-IN2 + +QSFP+ Modules +- + Intel TRIPLE RATE 1G/10G/40G QSFP+ SR (bailed)E40GQSFPSR + Intel TRIPLE RATE 1G/10G/40G QSFP+ LR (bailed)E40GQSFPLR +QSFP+ 1G speed is not supported on XL710 based devices. + +X710/XL710 Based SFP+ adapters support all passive and active limiting direct attach cables that comply with SFF-8431 v4.1 and SFF-8472 v10.4 specifications. + + +Building and Installation += + +NOTE: You must have kernel sources installed to compile the driver module. + +In the instructions below, x.x.x is the driver version +as indicated in thename of the driver tar. + +1. Move the base driver tar file to the directory of your choice. For example, use /home/username/i40e or /usr/local/src/i40e. + +2. Untar/unzip the archive: + tar xfz i40e-x.x.x.tar.gz + +3. To install man page: + cd i40e-x.x.x + gzip -c i40e.4 > /usr/share/man/man4/i40e.4.gz + +4. To load the driver onto a running system: + cd i40e-x.x.x/src + make load + +5. To assign an IP address to the interface, enter the following: + ifconfig ixl + +6. Verify that the interface works. Enter the following, where is the IP address for another machine on the same subnet as the interface that is being tested: + + ping + +7. If you want the driver to load automatically when the system is booted: + + cd i40e-x.x.x/src + make + make install + +Edit /boot/loader.conf, and add the following line: + if_i40e_load="YES" + +Edit /etc/rc.conf, and create the appropriate +ifconfig_ixl entry: + + ifconfig_ixl="" + + Example usage: + + ifconfig_ixl0="inet 192.168.10.1 netmask 255.255.255.0" + + NOTE: For assistance, see the ifconfig man page. + + + +Configuration and Tuning += + +The driver supports Transmit/Receive Checksum Offload for IPv4 and IPv6, +TSO forIPv4 and IPv6, LRO, and Jumbo Frames on all 40 Gigabit adapters. + + Jumbo Frames + + To enable Jumbo Frames, use the ifconfig utility to increase + the MTU beyond 1500 bytes. + + - The Jumbo Frames setting on the switch must be set to at least + 22 byteslarger than that of the adapter. + + - The maximum MTU setting for Jumbo Frames is 9706. This value + coincides with the maximum jumbo frames size of 9728. + To modify the setting, enter the following: + +ifconfig ixl mtu 9000 + + - To confirm an interface's MTU value, use the ifconfig command. + To confirm the MTU used between two specific devices, use: + +route get + + VLANs + - + To create a new VLAN pseudo-interface: + +ifconfig create + + To associate the VLAN pseudo-interface with a physical interface + and assign a VLAN ID, IP address, and netmask: + +ifconfig netmask vlan +vlandev + + Example: + +ifconfig vlan10 10.0.0.1 netmask 255.255.255.0 vlan 10 vlandev ixl0 + + In this example, all packets will be marked on egress with + 802.1Q VLAN tags, specifying a VLAN ID of 10. + + To remove a VLAN pseudo-interface: + +ifconfig destroy + + + Checksum Offload + +
svn commit: r269198 - in head/sys: dev/i40e modules/i40e
Author: jfv Date: Mon Jul 28 21:57:09 2014 New Revision: 269198 URL: http://svnweb.freebsd.org/changeset/base/269198 Log: Update the new 40G XL710 driver to Release version 1.0.0 Modified: head/sys/dev/i40e/i40e.h head/sys/dev/i40e/i40e_adminq.c head/sys/dev/i40e/i40e_adminq.h head/sys/dev/i40e/i40e_adminq_cmd.h head/sys/dev/i40e/i40e_common.c head/sys/dev/i40e/i40e_hmc.h head/sys/dev/i40e/i40e_lan_hmc.c head/sys/dev/i40e/i40e_lan_hmc.h head/sys/dev/i40e/i40e_nvm.c head/sys/dev/i40e/i40e_osdep.c head/sys/dev/i40e/i40e_prototype.h head/sys/dev/i40e/i40e_register.h head/sys/dev/i40e/i40e_register_x710_int.h head/sys/dev/i40e/i40e_txrx.c head/sys/dev/i40e/i40e_type.h head/sys/dev/i40e/if_i40e.c head/sys/modules/i40e/Makefile Modified: head/sys/dev/i40e/i40e.h == --- head/sys/dev/i40e/i40e.hMon Jul 28 21:14:41 2014(r269197) +++ head/sys/dev/i40e/i40e.hMon Jul 28 21:57:09 2014(r269198) @@ -92,13 +92,23 @@ #include "i40e_prototype.h" #ifdef I40E_DEBUG +#include + #define MAC_FORMAT "%02x:%02x:%02x:%02x:%02x:%02x" #define MAC_FORMAT_ARGS(mac_addr) \ (mac_addr)[0], (mac_addr)[1], (mac_addr)[2], (mac_addr)[3], \ (mac_addr)[4], (mac_addr)[5] #define ON_OFF_STR(is_set) ((is_set) ? "On" : "Off") +#define DPRINTF(...) printf(__VA_ARGS__) +#define DDPRINTF(dev, ...) device_printf(dev, __VA_ARGS__) +#define IDPRINTF(ifp, ...) if_printf(ifp, __VA_ARGS__) + // static void i40e_dump_desc(void *, u8, u16); +#else +#define DPRINTF(...) +#define DDPRINTF(...) +#define IDPRINTF(...) #endif /* Tunables */ @@ -173,10 +183,21 @@ #define I40E_ITR_NONE 3 #define I40E_QUEUE_EOL 0x7FF #define I40E_MAX_FRAME 0x2600 -#define I40E_MAX_SEGS 32 -#define I40E_MAX_FILTERS 256 /* This is artificial */ +#define I40E_MAX_TX_SEGS 8 +#define I40E_MAX_TSO_SEGS 66 +#define I40E_SPARSE_CHAIN 6 +#define I40E_QUEUE_HUNG0x8000 + +/* ERJ: hardware can support ~1.5k filters between all functions */ +#define I40E_MAX_FILTERS 256 #define I40E_MAX_TX_BUSY 10 +#define I40E_NVM_VERSION_LO_SHIFT 0 +#define I40E_NVM_VERSION_LO_MASK (0xff << I40E_NVM_VERSION_LO_SHIFT) +#define I40E_NVM_VERSION_HI_SHIFT 12 +#define I40E_NVM_VERSION_HI_MASK (0xf << I40E_NVM_VERSION_HI_SHIFT) + + /* * Interrupt Moderation parameters */ @@ -200,7 +221,9 @@ /* used in the vlan field of the filter when not a vlan */ #define I40E_VLAN_ANY -1 -#define CSUM_OFFLOAD (CSUM_IP|CSUM_TCP|CSUM_UDP|CSUM_SCTP) +#define CSUM_OFFLOAD_IPV4 (CSUM_IP|CSUM_TCP|CSUM_UDP|CSUM_SCTP) +#define CSUM_OFFLOAD_IPV6 (CSUM_TCP_IPV6|CSUM_UDP_IPV6|CSUM_SCTP_IPV6) +#define CSUM_OFFLOAD (CSUM_OFFLOAD_IPV4|CSUM_OFFLOAD_IPV6|CSUM_TSO) /* Misc flags for i40e_vsi.flags */ #define I40E_FLAGS_KEEP_TSO4 (1 << 0) @@ -238,6 +261,7 @@ struct i40e_tx_buf { u32 eop_index; struct mbuf *m_head; bus_dmamap_tmap; + bus_dma_tag_t tag; }; struct i40e_rx_buf { @@ -248,15 +272,6 @@ struct i40e_rx_buf { bus_dmamap_tpmap; }; -struct i40e_pkt_info { - u16 etype; - u32 elen; - u32 iplen; - struct ip *ip; - struct ip6_hdr *ip6; - struct tcphdr *th; -}; - /* ** This struct has multiple uses, multicast ** addresses, vlans, and mac filters all use it. @@ -275,7 +290,7 @@ struct i40e_mac_filter { struct tx_ring { struct i40e_queue *que; struct mtx mtx; - int watchdog; + u32 tail; struct i40e_tx_desc *base; struct i40e_dma_mem dma; u16 next_avail; @@ -287,7 +302,8 @@ struct tx_ring { struct i40e_tx_buf *buffers; volatile u16avail; u32 cmd; - bus_dma_tag_t tag; + bus_dma_tag_t tx_tag; + bus_dma_tag_t tso_tag; charmtx_name[16]; struct buf_ring *br; @@ -318,6 +334,7 @@ struct rx_ring { charmtx_name[16]; struct i40e_rx_buf *buffers; u32 mbuf_sz; + u32 tail; bus_dma_tag_t htag; bus_dma_tag_t ptag; @@ -407,6 +424,7 @@ struct i40e_vsi { u64 hw_filters_add; /* Misc. */ + u64 active_queues; u64 flags; }; @@ -433,8 +451,9 @@ i40e_get_filter(struct i40e_vsi *vsi) { struct i40e_mac_filter *f; - // create a new empty filter - f = malloc(sizeof(struct i40e_mac_filter) , M_DEVBUF, M_NOWAIT | M_ZERO); + /* creat
svn commit: r269196 - stable/10/sys/dev/e1000
Author: jfv Date: Mon Jul 28 21:11:18 2014 New Revision: 269196 URL: http://svnweb.freebsd.org/changeset/base/269196 Log: MFC of R267935: Sync the E1000 shared code to Intel internal, and more importantly add new I218 adapter support to em. Modified: stable/10/sys/dev/e1000/e1000_82542.c stable/10/sys/dev/e1000/e1000_82571.c stable/10/sys/dev/e1000/e1000_82571.h stable/10/sys/dev/e1000/e1000_82575.c stable/10/sys/dev/e1000/e1000_82575.h stable/10/sys/dev/e1000/e1000_api.c stable/10/sys/dev/e1000/e1000_api.h stable/10/sys/dev/e1000/e1000_defines.h stable/10/sys/dev/e1000/e1000_hw.h stable/10/sys/dev/e1000/e1000_i210.c stable/10/sys/dev/e1000/e1000_i210.h stable/10/sys/dev/e1000/e1000_ich8lan.c stable/10/sys/dev/e1000/e1000_ich8lan.h stable/10/sys/dev/e1000/e1000_mac.c stable/10/sys/dev/e1000/e1000_mac.h stable/10/sys/dev/e1000/e1000_manage.c stable/10/sys/dev/e1000/e1000_mbx.c stable/10/sys/dev/e1000/e1000_mbx.h stable/10/sys/dev/e1000/e1000_nvm.c stable/10/sys/dev/e1000/e1000_osdep.h stable/10/sys/dev/e1000/e1000_phy.c stable/10/sys/dev/e1000/e1000_phy.h stable/10/sys/dev/e1000/e1000_regs.h stable/10/sys/dev/e1000/e1000_vf.c stable/10/sys/dev/e1000/e1000_vf.h stable/10/sys/dev/e1000/if_em.c Modified: stable/10/sys/dev/e1000/e1000_82542.c == --- stable/10/sys/dev/e1000/e1000_82542.c Mon Jul 28 19:01:25 2014 (r269195) +++ stable/10/sys/dev/e1000/e1000_82542.c Mon Jul 28 21:11:18 2014 (r269196) @@ -1,6 +1,6 @@ /** - Copyright (c) 2001-2010, Intel Corporation + Copyright (c) 2001-2014, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -47,7 +47,7 @@ static s32 e1000_init_hw_82542(struct e static s32 e1000_setup_link_82542(struct e1000_hw *hw); static s32 e1000_led_on_82542(struct e1000_hw *hw); static s32 e1000_led_off_82542(struct e1000_hw *hw); -static void e1000_rar_set_82542(struct e1000_hw *hw, u8 *addr, u32 index); +static int e1000_rar_set_82542(struct e1000_hw *hw, u8 *addr, u32 index); static void e1000_clear_hw_cntrs_82542(struct e1000_hw *hw); static s32 e1000_read_mac_addr_82542(struct e1000_hw *hw); @@ -409,7 +409,7 @@ static s32 e1000_led_off_82542(struct e1 * Sets the receive address array register at index to the address passed * in by addr. **/ -static void e1000_rar_set_82542(struct e1000_hw *hw, u8 *addr, u32 index) +static int e1000_rar_set_82542(struct e1000_hw *hw, u8 *addr, u32 index) { u32 rar_low, rar_high; @@ -431,6 +431,7 @@ static void e1000_rar_set_82542(struct e E1000_WRITE_REG_ARRAY(hw, E1000_RA, (index << 1), rar_low); E1000_WRITE_REG_ARRAY(hw, E1000_RA, ((index << 1) + 1), rar_high); + return E1000_SUCCESS; } /** Modified: stable/10/sys/dev/e1000/e1000_82571.c == --- stable/10/sys/dev/e1000/e1000_82571.c Mon Jul 28 19:01:25 2014 (r269195) +++ stable/10/sys/dev/e1000/e1000_82571.c Mon Jul 28 21:11:18 2014 (r269196) @@ -1,6 +1,6 @@ /** - Copyright (c) 2001-2013, Intel Corporation + Copyright (c) 2001-2014, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -1453,10 +1453,14 @@ static void e1000_clear_vfta_82571(struc static bool e1000_check_mng_mode_82574(struct e1000_hw *hw) { u16 data; + s32 ret_val; DEBUGFUNC("e1000_check_mng_mode_82574"); - hw->nvm.ops.read(hw, NVM_INIT_CONTROL2_REG, 1, &data); + ret_val = hw->nvm.ops.read(hw, NVM_INIT_CONTROL2_REG, 1, &data); + if (ret_val) + return FALSE; + return (data & E1000_NVM_INIT_CTRL2_MNGM) != 0; } Modified: stable/10/sys/dev/e1000/e1000_82571.h == --- stable/10/sys/dev/e1000/e1000_82571.h Mon Jul 28 19:01:25 2014 (r269195) +++ stable/10/sys/dev/e1000/e1000_82571.h Mon Jul 28 21:11:18 2014 (r269196) @@ -1,6 +1,6 @@ /** - Copyright (c) 2001-2010, Intel Corporation + Copyright (c) 2001-2014, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -35,29 +35,30 @@ #ifndef _E1000_82571_H_ #define _E1000_82571_H_ -#define ID_LED_RESERVED_F746 0xF746 -#define ID_LED_DEFAULT_82573 ((ID_LED_DEF1_DEF2 << 12) | \ - (ID_LED_OFF1_ON2 << 8) | \ - (ID_LED_DEF1_DEF2 << 4) | \ - (ID_LED_DEF1_DEF2)) +#defi
svn commit: r267935 - head/sys/dev/e1000
Author: jfv Date: Thu Jun 26 21:33:32 2014 New Revision: 267935 URL: http://svnweb.freebsd.org/changeset/base/267935 Log: Sync the E1000 shared code with Intel internal, this adds fixes, and more importantly, new I218 adapter support to the em driver. MFC after: 1 week Modified: head/sys/dev/e1000/e1000_82542.c head/sys/dev/e1000/e1000_82571.c head/sys/dev/e1000/e1000_82575.c head/sys/dev/e1000/e1000_82575.h head/sys/dev/e1000/e1000_api.c head/sys/dev/e1000/e1000_api.h head/sys/dev/e1000/e1000_defines.h head/sys/dev/e1000/e1000_hw.h head/sys/dev/e1000/e1000_i210.c head/sys/dev/e1000/e1000_i210.h head/sys/dev/e1000/e1000_ich8lan.c head/sys/dev/e1000/e1000_ich8lan.h head/sys/dev/e1000/e1000_mac.c head/sys/dev/e1000/e1000_mac.h head/sys/dev/e1000/e1000_manage.c head/sys/dev/e1000/e1000_mbx.c head/sys/dev/e1000/e1000_mbx.h head/sys/dev/e1000/e1000_nvm.c head/sys/dev/e1000/e1000_osdep.h head/sys/dev/e1000/e1000_phy.c head/sys/dev/e1000/e1000_phy.h head/sys/dev/e1000/e1000_regs.h head/sys/dev/e1000/e1000_vf.c head/sys/dev/e1000/e1000_vf.h head/sys/dev/e1000/if_em.c Modified: head/sys/dev/e1000/e1000_82542.c == --- head/sys/dev/e1000/e1000_82542.cThu Jun 26 20:12:38 2014 (r267934) +++ head/sys/dev/e1000/e1000_82542.cThu Jun 26 21:33:32 2014 (r267935) @@ -1,6 +1,6 @@ /** - Copyright (c) 2001-2010, Intel Corporation + Copyright (c) 2001-2014, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -47,7 +47,7 @@ static s32 e1000_init_hw_82542(struct e static s32 e1000_setup_link_82542(struct e1000_hw *hw); static s32 e1000_led_on_82542(struct e1000_hw *hw); static s32 e1000_led_off_82542(struct e1000_hw *hw); -static void e1000_rar_set_82542(struct e1000_hw *hw, u8 *addr, u32 index); +static int e1000_rar_set_82542(struct e1000_hw *hw, u8 *addr, u32 index); static void e1000_clear_hw_cntrs_82542(struct e1000_hw *hw); static s32 e1000_read_mac_addr_82542(struct e1000_hw *hw); @@ -409,7 +409,7 @@ static s32 e1000_led_off_82542(struct e1 * Sets the receive address array register at index to the address passed * in by addr. **/ -static void e1000_rar_set_82542(struct e1000_hw *hw, u8 *addr, u32 index) +static int e1000_rar_set_82542(struct e1000_hw *hw, u8 *addr, u32 index) { u32 rar_low, rar_high; @@ -431,6 +431,7 @@ static void e1000_rar_set_82542(struct e E1000_WRITE_REG_ARRAY(hw, E1000_RA, (index << 1), rar_low); E1000_WRITE_REG_ARRAY(hw, E1000_RA, ((index << 1) + 1), rar_high); + return E1000_SUCCESS; } /** Modified: head/sys/dev/e1000/e1000_82571.c == --- head/sys/dev/e1000/e1000_82571.cThu Jun 26 20:12:38 2014 (r267934) +++ head/sys/dev/e1000/e1000_82571.cThu Jun 26 21:33:32 2014 (r267935) @@ -1,6 +1,6 @@ /** - Copyright (c) 2001-2013, Intel Corporation + Copyright (c) 2001-2014, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -1453,10 +1453,14 @@ static void e1000_clear_vfta_82571(struc static bool e1000_check_mng_mode_82574(struct e1000_hw *hw) { u16 data; + s32 ret_val; DEBUGFUNC("e1000_check_mng_mode_82574"); - hw->nvm.ops.read(hw, NVM_INIT_CONTROL2_REG, 1, &data); + ret_val = hw->nvm.ops.read(hw, NVM_INIT_CONTROL2_REG, 1, &data); + if (ret_val) + return FALSE; + return (data & E1000_NVM_INIT_CTRL2_MNGM) != 0; } Modified: head/sys/dev/e1000/e1000_82575.c == --- head/sys/dev/e1000/e1000_82575.cThu Jun 26 20:12:38 2014 (r267934) +++ head/sys/dev/e1000/e1000_82575.cThu Jun 26 21:33:32 2014 (r267935) @@ -1,6 +1,6 @@ /** - Copyright (c) 2001-2013, Intel Corporation + Copyright (c) 2001-2014, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -56,7 +56,6 @@ static s32 e1000_check_for_link_media_s static s32 e1000_get_cfg_done_82575(struct e1000_hw *hw); static s32 e1000_get_link_up_info_82575(struct e1000_hw *hw, u16 *speed, u16 *duplex); -static s32 e1000_init_hw_82575(struct e1000_hw *hw); static s32 e1000_phy_hw_reset_sgmii_82575(struct e1000_hw *hw); static s32 e1000_read_phy_reg_sgmii_82575(struct e1000_hw *hw, u32 offset, u16 *data); @@ -120,7 +119,8 @@ static bool e1000_get_i2c_data(u
svn commit: r266423 - in head/sys: conf dev/i40e modules/i40e
Author: jfv Date: Mon May 19 01:21:02 2014 New Revision: 266423 URL: http://svnweb.freebsd.org/changeset/base/266423 Log: This is the beta release of the driver for the new Intel 40G Ethernet Controller XL710 Family. This is the core driver, a VF driver called i40evf, will be following soon. Questions or comments to myself or my co-developer Eric Joyner. Cheers! Added: head/sys/dev/i40e/ head/sys/dev/i40e/i40e.h (contents, props changed) head/sys/dev/i40e/i40e_adminq.c (contents, props changed) head/sys/dev/i40e/i40e_adminq.h (contents, props changed) head/sys/dev/i40e/i40e_adminq_cmd.h (contents, props changed) head/sys/dev/i40e/i40e_alloc.h (contents, props changed) head/sys/dev/i40e/i40e_common.c (contents, props changed) head/sys/dev/i40e/i40e_hmc.c (contents, props changed) head/sys/dev/i40e/i40e_hmc.h (contents, props changed) head/sys/dev/i40e/i40e_lan_hmc.c (contents, props changed) head/sys/dev/i40e/i40e_lan_hmc.h (contents, props changed) head/sys/dev/i40e/i40e_nvm.c (contents, props changed) head/sys/dev/i40e/i40e_osdep.c (contents, props changed) head/sys/dev/i40e/i40e_osdep.h (contents, props changed) head/sys/dev/i40e/i40e_pf.h (contents, props changed) head/sys/dev/i40e/i40e_prototype.h (contents, props changed) head/sys/dev/i40e/i40e_register.h (contents, props changed) head/sys/dev/i40e/i40e_register_x710_int.h (contents, props changed) head/sys/dev/i40e/i40e_status.h (contents, props changed) head/sys/dev/i40e/i40e_txrx.c (contents, props changed) head/sys/dev/i40e/i40e_type.h (contents, props changed) head/sys/dev/i40e/i40e_virtchnl.h (contents, props changed) head/sys/dev/i40e/if_i40e.c (contents, props changed) head/sys/modules/i40e/ head/sys/modules/i40e/Makefile (contents, props changed) Modified: head/sys/conf/files Modified: head/sys/conf/files == --- head/sys/conf/files Sun May 18 22:39:01 2014(r266422) +++ head/sys/conf/files Mon May 19 01:21:02 2014(r266423) @@ -1417,6 +1417,22 @@ dev/hptiop/hptiop.c optional hptiop scb dev/hwpmc/hwpmc_logging.c optional hwpmc dev/hwpmc/hwpmc_mod.c optional hwpmc dev/hwpmc/hwpmc_soft.c optional hwpmc +dev/i40e/if_i40e.c optional i40e inet \ + compile-with "${NORMAL_C} -I$S/dev/i40e -DSMP" +dev/i40e/i40e_txrx.c optional i40e inet \ + compile-with "${NORMAL_C} -I$S/dev/i40e -DSMP" +dev/i40e/i40e_osdep.c optional i40e inet \ + compile-with "${NORMAL_C} -I$S/dev/i40e -DSMP" +dev/i40e/i40e_nvm.coptional i40e inet \ + compile-with "${NORMAL_C} -I$S/dev/i40e -DSMP" +dev/i40e/i40e_lan_hmc.coptional i40e inet \ + compile-with "${NORMAL_C} -I$S/dev/i40e -DSMP" +dev/i40e/i40e_hmc.coptional i40e inet \ + compile-with "${NORMAL_C} -I$S/dev/i40e -DSMP" +dev/i40e/i40e_common.c optional i40e inet \ + compile-with "${NORMAL_C} -I$S/dev/i40e -DSMP" +dev/i40e/i40e_adminq.c optional i40e inet \ + compile-with "${NORMAL_C} -I$S/dev/i40e -DSMP" dev/ichsmb/ichsmb.coptional ichsmb dev/ichsmb/ichsmb_pci.coptional ichsmb pci dev/ida/ida.c optional ida Added: head/sys/dev/i40e/i40e.h == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/i40e/i40e.hMon May 19 01:21:02 2014(r266423) @@ -0,0 +1,491 @@ +/** + + Copyright (c) 2013-2014, Intel Corporation + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + 3. Neither the name of the Intel Corporation nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +
svn commit: r256200 - in head/sys/dev: e1000 netmap
Author: jfv Date: Wed Oct 9 17:32:52 2013 New Revision: 256200 URL: http://svnweb.freebsd.org/changeset/base/256200 Log: Update the Intel igb driver to version 2.4.0 - This version has support for the new Intel Avoton systems, including 2.5Gb support, further it now has IPv6/TSO6 support as well. Shared code has been updated where necessary as well. Thanks to my new assistant Eric Joyner for doing the transmit path changes to bring in the IPv6/TSO6 support. Thanks to Gleb for catching the one bug and change needed in NETMAP. Approved by: re Modified: head/sys/dev/e1000/e1000_80003es2lan.c head/sys/dev/e1000/e1000_80003es2lan.h head/sys/dev/e1000/e1000_82571.c head/sys/dev/e1000/e1000_82575.c head/sys/dev/e1000/e1000_82575.h head/sys/dev/e1000/e1000_api.c head/sys/dev/e1000/e1000_defines.h head/sys/dev/e1000/e1000_hw.h head/sys/dev/e1000/e1000_i210.c head/sys/dev/e1000/e1000_i210.h head/sys/dev/e1000/e1000_ich8lan.c head/sys/dev/e1000/e1000_ich8lan.h head/sys/dev/e1000/e1000_mac.c head/sys/dev/e1000/e1000_osdep.h head/sys/dev/e1000/e1000_phy.c head/sys/dev/e1000/e1000_phy.h head/sys/dev/e1000/e1000_regs.h head/sys/dev/e1000/e1000_vf.h head/sys/dev/e1000/if_igb.c head/sys/dev/e1000/if_igb.h head/sys/dev/netmap/if_igb_netmap.h Modified: head/sys/dev/e1000/e1000_80003es2lan.c == --- head/sys/dev/e1000/e1000_80003es2lan.c Wed Oct 9 17:07:50 2013 (r256199) +++ head/sys/dev/e1000/e1000_80003es2lan.c Wed Oct 9 17:32:52 2013 (r256200) @@ -1,6 +1,6 @@ /** - Copyright (c) 2001-2011, Intel Corporation + Copyright (c) 2001-2013, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -32,16 +32,12 @@ **/ /*$FreeBSD$*/ -/* - * 80003ES2LAN Gigabit Ethernet Controller (Copper) +/* 80003ES2LAN Gigabit Ethernet Controller (Copper) * 80003ES2LAN Gigabit Ethernet Controller (Serdes) */ #include "e1000_api.h" -static s32 e1000_init_phy_params_80003es2lan(struct e1000_hw *hw); -static s32 e1000_init_nvm_params_80003es2lan(struct e1000_hw *hw); -static s32 e1000_init_mac_params_80003es2lan(struct e1000_hw *hw); static s32 e1000_acquire_phy_80003es2lan(struct e1000_hw *hw); static void e1000_release_phy_80003es2lan(struct e1000_hw *hw); static s32 e1000_acquire_nvm_80003es2lan(struct e1000_hw *hw); @@ -71,14 +67,12 @@ static s32 e1000_read_kmrn_reg_80003es2 u16 *data); static s32 e1000_write_kmrn_reg_80003es2lan(struct e1000_hw *hw, u32 offset, u16 data); -static s32 e1000_copper_link_setup_gg82563_80003es2lan(struct e1000_hw *hw); static void e1000_initialize_hw_bits_80003es2lan(struct e1000_hw *hw); static void e1000_release_swfw_sync_80003es2lan(struct e1000_hw *hw, u16 mask); static s32 e1000_read_mac_addr_80003es2lan(struct e1000_hw *hw); static void e1000_power_down_phy_copper_80003es2lan(struct e1000_hw *hw); -/* - * A table for the GG82563 cable length where the range is defined +/* A table for the GG82563 cable length where the range is defined * with a lower bound at "index" and the upper bound at * "index + 5". */ @@ -95,13 +89,13 @@ static const u16 e1000_gg82563_cable_len static s32 e1000_init_phy_params_80003es2lan(struct e1000_hw *hw) { struct e1000_phy_info *phy = &hw->phy; - s32 ret_val = E1000_SUCCESS; + s32 ret_val; DEBUGFUNC("e1000_init_phy_params_80003es2lan"); if (hw->phy.media_type != e1000_media_type_copper) { phy->type = e1000_phy_none; - goto out; + return E1000_SUCCESS; } else { phy->ops.power_up = e1000_power_up_phy_copper; phy->ops.power_down = e1000_power_down_phy_copper_80003es2lan; @@ -133,12 +127,9 @@ static s32 e1000_init_phy_params_80003es ret_val = e1000_get_phy_id(hw); /* Verify phy id */ - if (phy->id != GG82563_E_PHY_ID) { - ret_val = -E1000_ERR_PHY; - goto out; - } + if (phy->id != GG82563_E_PHY_ID) + return -E1000_ERR_PHY; -out: return ret_val; } @@ -176,8 +167,7 @@ static s32 e1000_init_nvm_params_80003es size = (u16)((eecd & E1000_EECD_SIZE_EX_MASK) >> E1000_EECD_SIZE_EX_SHIFT); - /* -* Added to a constant, "size" becomes the left-shift value + /* Added to a constant, "size" becomes the left-shift value * for setting word_size. */ size += NVM_WORD_SIZE_BASE_SHIFT; @@ -234,8 +224,8 @@ static s32 e1000_init_mac_params_80003es /* FWSM register */ mac->has_fwsm = TRUE;
svn commit: r254573 - in releng/9.2/sys/dev: e1000 ixgbe
Author: jfv Date: Tue Aug 20 17:50:30 2013 New Revision: 254573 URL: http://svnweb.freebsd.org/changeset/base/254573 Log: MFC r254008,254262: Improve the MSIX setup logic, making sure the requested number of vectors are actually obtained, and if not cleaning up before falling back to MSI. Also make the fallback decision as early as possible. Approved by: re Modified: releng/9.2/sys/dev/e1000/if_em.c releng/9.2/sys/dev/e1000/if_igb.c releng/9.2/sys/dev/ixgbe/ixgbe.c releng/9.2/sys/dev/ixgbe/ixv.c Directory Properties: releng/9.2/sys/ (props changed) releng/9.2/sys/dev/ (props changed) releng/9.2/sys/dev/e1000/ (props changed) releng/9.2/sys/dev/ixgbe/ (props changed) Modified: releng/9.2/sys/dev/e1000/if_em.c == --- releng/9.2/sys/dev/e1000/if_em.cTue Aug 20 16:21:05 2013 (r254572) +++ releng/9.2/sys/dev/e1000/if_em.cTue Aug 20 17:50:30 2013 (r254573) @@ -2277,7 +2277,7 @@ em_local_timer(void *arg) /* Mask to use in the irq trigger */ if (adapter->msix_mem) - trigger = rxr->ims; /* RX for 82574 */ + trigger = rxr->ims; else trigger = E1000_ICS_RXDMT0; @@ -2742,7 +2742,7 @@ static int em_setup_msix(struct adapter *adapter) { device_t dev = adapter->dev; - int val = 0; + int val; /* ** Setup MSI/X for Hartwell: tests have shown @@ -2756,37 +2756,43 @@ em_setup_msix(struct adapter *adapter) int rid = PCIR_BAR(EM_MSIX_BAR); adapter->msix_mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); - if (!adapter->msix_mem) { + if (adapter->msix_mem == NULL) { /* May not be enabled */ device_printf(adapter->dev, "Unable to map MSIX table \n"); goto msi; } val = pci_msix_count(dev); - /* We only need 3 vectors */ - if (val > 3) + /* We only need/want 3 vectors */ + if (val >= 3) val = 3; - if ((val != 3) && (val != 5)) { - bus_release_resource(dev, SYS_RES_MEMORY, - PCIR_BAR(EM_MSIX_BAR), adapter->msix_mem); - adapter->msix_mem = NULL; + else { device_printf(adapter->dev, - "MSIX: incorrect vectors, using MSI\n"); + "MSIX: insufficient vectors, using MSI\n"); goto msi; } - if (pci_alloc_msix(dev, &val) == 0) { + if ((pci_alloc_msix(dev, &val) == 0) && (val == 3)) { device_printf(adapter->dev, "Using MSIX interrupts " "with %d vectors\n", val); + return (val); } - return (val); + /* + ** If MSIX alloc failed or provided us with + ** less than needed, free and fall through to MSI + */ + pci_release_msi(dev); } msi: - val = pci_msi_count(dev); - if (val == 1 && pci_alloc_msi(dev, &val) == 0) { - adapter->msix = 1; + if (adapter->msix_mem != NULL) { + bus_release_resource(dev, SYS_RES_MEMORY, + PCIR_BAR(EM_MSIX_BAR), adapter->msix_mem); + adapter->msix_mem = NULL; + } + val = 1; + if (pci_alloc_msi(dev, &val) == 0) { device_printf(adapter->dev,"Using an MSI interrupt\n"); return (val); } Modified: releng/9.2/sys/dev/e1000/if_igb.c == --- releng/9.2/sys/dev/e1000/if_igb.c Tue Aug 20 16:21:05 2013 (r254572) +++ releng/9.2/sys/dev/e1000/if_igb.c Tue Aug 20 17:50:30 2013 (r254573) @@ -972,7 +972,13 @@ igb_mq_start(struct ifnet *ifp, struct m que = &adapter->queues[i]; err = drbr_enqueue(ifp, txr->br, m); - taskqueue_enqueue(que->tq, &txr->txq_task); + if (err) + return (err); + if (IGB_TX_TRYLOCK(txr)) { + err = igb_mq_start_locked(ifp, txr); + IGB_TX_UNLOCK(txr); + } else + taskqueue_enqueue(que->tq, &txr->txq_task); return (err); } @@ -2834,24 +2840,19 @@ igb_setup_msix(struct adapter *adapter) goto msi; /* First try MSI/X */ + msgs = pci_msix_count(dev); + if (msgs == 0) + goto msi; rid = PCIR_BAR(IGB_MSIX_BAR); adapter->msix_mem = bus_all
svn commit: r254385 - stable/9/sys/dev/e1000
Author: jfv Date: Thu Aug 15 21:24:43 2013 New Revision: 254385 URL: http://svnweb.freebsd.org/changeset/base/254385 Log: MFC r254264 Make the igb_mq_start() routine use TRYLOCK rather than simple queuing, there were latency and other problems with the latter. Modified: stable/9/sys/dev/e1000/if_igb.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) Modified: stable/9/sys/dev/e1000/if_igb.c == --- stable/9/sys/dev/e1000/if_igb.c Thu Aug 15 21:09:05 2013 (r254384) +++ stable/9/sys/dev/e1000/if_igb.c Thu Aug 15 21:24:43 2013 (r254385) @@ -972,7 +972,13 @@ igb_mq_start(struct ifnet *ifp, struct m que = &adapter->queues[i]; err = drbr_enqueue(ifp, txr->br, m); - taskqueue_enqueue(que->tq, &txr->txq_task); + if (err) + return (err); + if (IGB_TX_TRYLOCK(txr)) { + err = igb_mq_start_locked(ifp, txr); + IGB_TX_UNLOCK(txr); + } else + taskqueue_enqueue(que->tq, &txr->txq_task); return (err); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r254383 - in stable/9/sys/dev: e1000 ixgbe
Author: jfv Date: Thu Aug 15 21:06:38 2013 New Revision: 254383 URL: http://svnweb.freebsd.org/changeset/base/254383 Log: MFC r254262 Further improve the msix setup, make sure pci_alloc_msix() gives us the vectors we requested, and fall back to MSI when not, also release any allocated resources before the fallback. Modified: stable/9/sys/dev/e1000/if_em.c stable/9/sys/dev/e1000/if_igb.c stable/9/sys/dev/ixgbe/ixgbe.c stable/9/sys/dev/ixgbe/ixv.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) Modified: stable/9/sys/dev/e1000/if_em.c == --- stable/9/sys/dev/e1000/if_em.c Thu Aug 15 20:33:17 2013 (r254382) +++ stable/9/sys/dev/e1000/if_em.c Thu Aug 15 21:06:38 2013 (r254383) @@ -2277,7 +2277,7 @@ em_local_timer(void *arg) /* Mask to use in the irq trigger */ if (adapter->msix_mem) - trigger = rxr->ims; /* RX for 82574 */ + trigger = rxr->ims; else trigger = E1000_ICS_RXDMT0; @@ -2767,23 +2767,30 @@ em_setup_msix(struct adapter *adapter) if (val >= 3) val = 3; else { - bus_release_resource(dev, SYS_RES_MEMORY, - PCIR_BAR(EM_MSIX_BAR), adapter->msix_mem); - adapter->msix_mem = NULL; device_printf(adapter->dev, - "MSIX: incorrect vectors, using MSI\n"); + "MSIX: insufficient vectors, using MSI\n"); goto msi; } - if (pci_alloc_msix(dev, &val) == 0) { + if ((pci_alloc_msix(dev, &val) == 0) && (val == 3)) { device_printf(adapter->dev, "Using MSIX interrupts " "with %d vectors\n", val); return (val); } - /* Fall through to MSI */ + + /* + ** If MSIX alloc failed or provided us with + ** less than needed, free and fall through to MSI + */ + pci_release_msi(dev); } msi: + if (adapter->msix_mem != NULL) { + bus_release_resource(dev, SYS_RES_MEMORY, + PCIR_BAR(EM_MSIX_BAR), adapter->msix_mem); + adapter->msix_mem = NULL; + } val = 1; if (pci_alloc_msi(dev, &val) == 0) { device_printf(adapter->dev,"Using an MSI interrupt\n"); Modified: stable/9/sys/dev/e1000/if_igb.c == --- stable/9/sys/dev/e1000/if_igb.c Thu Aug 15 20:33:17 2013 (r254382) +++ stable/9/sys/dev/e1000/if_igb.c Thu Aug 15 21:06:38 2013 (r254383) @@ -2891,13 +2891,18 @@ igb_setup_msix(struct adapter *adapter) msgs, want); goto msi; } - if (pci_alloc_msix(dev, &msgs) == 0) { + if ((pci_alloc_msix(dev, &msgs) == 0) && (msgs == want)) { device_printf(adapter->dev, "Using MSIX interrupts with %d vectors\n", msgs); adapter->num_queues = queues; return (msgs); } - /* Fallback to MSI configuration */ + /* + ** If MSIX alloc failed or provided us with + ** less than needed, free and fall through to MSI + */ + pci_release_msi(dev); + msi: if (adapter->msix_mem != NULL) { bus_release_resource(dev, SYS_RES_MEMORY, @@ -2906,10 +2911,10 @@ msi: } msgs = 1; if (pci_alloc_msi(dev, &msgs) == 0) { - device_printf(adapter->dev," Using MSI interrupt\n"); + device_printf(adapter->dev," Using an MSI interrupt\n"); return (msgs); } - /* Default to a legacy interrupt */ + device_printf(adapter->dev," Using a Legacy interrupt\n"); return (0); } Modified: stable/9/sys/dev/ixgbe/ixgbe.c == --- stable/9/sys/dev/ixgbe/ixgbe.c Thu Aug 15 20:33:17 2013 (r254382) +++ stable/9/sys/dev/ixgbe/ixgbe.c Thu Aug 15 21:06:38 2013 (r254383) @@ -2456,12 +2456,18 @@ ixgbe_setup_msix(struct adapter *adapter msgs, want); goto msi; } - if (pci_alloc_msix(dev, &msgs) == 0) { + if ((pci_alloc_msix(dev, &msgs) == 0) && (msgs == want)) { device_printf(adapter->dev, "Using MSIX interrupts with %d vectors\n", msgs); adapter->num_queues = que
svn commit: r254382 - in stable/9/sys/dev: e1000 ixgbe
Author: jfv Date: Thu Aug 15 20:33:17 2013 New Revision: 254382 URL: http://svnweb.freebsd.org/changeset/base/254382 Log: MFC r254008 Make the fallback from MSIX to MSI interrupt usage more graceful. Modified: stable/9/sys/dev/e1000/if_em.c stable/9/sys/dev/e1000/if_igb.c stable/9/sys/dev/ixgbe/ixgbe.c stable/9/sys/dev/ixgbe/ixv.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) Modified: stable/9/sys/dev/e1000/if_em.c == --- stable/9/sys/dev/e1000/if_em.c Thu Aug 15 20:28:13 2013 (r254381) +++ stable/9/sys/dev/e1000/if_em.c Thu Aug 15 20:33:17 2013 (r254382) @@ -2742,7 +2742,7 @@ static int em_setup_msix(struct adapter *adapter) { device_t dev = adapter->dev; - int val = 0; + int val; /* ** Setup MSI/X for Hartwell: tests have shown @@ -2756,17 +2756,17 @@ em_setup_msix(struct adapter *adapter) int rid = PCIR_BAR(EM_MSIX_BAR); adapter->msix_mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); - if (!adapter->msix_mem) { + if (adapter->msix_mem == NULL) { /* May not be enabled */ device_printf(adapter->dev, "Unable to map MSIX table \n"); goto msi; } val = pci_msix_count(dev); - /* We only need 3 vectors */ - if (val > 3) + /* We only need/want 3 vectors */ + if (val >= 3) val = 3; - if ((val != 3) && (val != 5)) { + else { bus_release_resource(dev, SYS_RES_MEMORY, PCIR_BAR(EM_MSIX_BAR), adapter->msix_mem); adapter->msix_mem = NULL; @@ -2779,14 +2779,13 @@ em_setup_msix(struct adapter *adapter) device_printf(adapter->dev, "Using MSIX interrupts " "with %d vectors\n", val); + return (val); } - - return (val); + /* Fall through to MSI */ } msi: - val = pci_msi_count(dev); - if (val == 1 && pci_alloc_msi(dev, &val) == 0) { - adapter->msix = 1; + val = 1; + if (pci_alloc_msi(dev, &val) == 0) { device_printf(adapter->dev,"Using an MSI interrupt\n"); return (val); } Modified: stable/9/sys/dev/e1000/if_igb.c == --- stable/9/sys/dev/e1000/if_igb.c Thu Aug 15 20:28:13 2013 (r254381) +++ stable/9/sys/dev/e1000/if_igb.c Thu Aug 15 20:33:17 2013 (r254382) @@ -2834,24 +2834,19 @@ igb_setup_msix(struct adapter *adapter) goto msi; /* First try MSI/X */ + msgs = pci_msix_count(dev); + if (msgs == 0) + goto msi; rid = PCIR_BAR(IGB_MSIX_BAR); adapter->msix_mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); - if (!adapter->msix_mem) { + if (adapter->msix_mem == NULL) { /* May not be enabled */ device_printf(adapter->dev, "Unable to map MSIX table \n"); goto msi; } - msgs = pci_msix_count(dev); - if (msgs == 0) { /* system has msix disabled */ - bus_release_resource(dev, SYS_RES_MEMORY, - PCIR_BAR(IGB_MSIX_BAR), adapter->msix_mem); - adapter->msix_mem = NULL; - goto msi; - } - /* Figure out a reasonable auto config value */ queues = (mp_ncpus > (msgs-1)) ? (msgs-1) : mp_ncpus; @@ -2894,20 +2889,27 @@ igb_setup_msix(struct adapter *adapter) "MSIX Configuration Problem, " "%d vectors configured, but %d queues wanted!\n", msgs, want); - return (0); + goto msi; } - if ((msgs) && pci_alloc_msix(dev, &msgs) == 0) { + if (pci_alloc_msix(dev, &msgs) == 0) { device_printf(adapter->dev, "Using MSIX interrupts with %d vectors\n", msgs); adapter->num_queues = queues; return (msgs); } + /* Fallback to MSI configuration */ msi: - msgs = pci_msi_count(dev); - if (msgs == 1 && pci_alloc_msi(dev, &msgs) == 0) { + if (adapter->msix_mem != NULL) { + bus_release_resource(dev, SYS_RES_MEMORY, + PCI
svn commit: r254264 - head/sys/dev/e1000
Author: jfv Date: Tue Aug 13 00:25:39 2013 New Revision: 254264 URL: http://svnweb.freebsd.org/changeset/base/254264 Log: Alter the mq_start routine to do a TRYLOCK and call to the locked routine rather than just queueing. The former code was an attempt at getting UDP performance up, but there have been customer reports of problems with it, so the ixgbe approach seems the best solution for now. Modified: head/sys/dev/e1000/if_igb.c Modified: head/sys/dev/e1000/if_igb.c == --- head/sys/dev/e1000/if_igb.c Mon Aug 12 23:30:01 2013(r254263) +++ head/sys/dev/e1000/if_igb.c Tue Aug 13 00:25:39 2013(r254264) @@ -972,7 +972,13 @@ igb_mq_start(struct ifnet *ifp, struct m que = &adapter->queues[i]; err = drbr_enqueue(ifp, txr->br, m); - taskqueue_enqueue(que->tq, &txr->txq_task); + if (err) + return (err); + if (IGB_TX_TRYLOCK(txr)) { + err = igb_mq_start_locked(ifp, txr); + IGB_TX_UNLOCK(txr); + } else + taskqueue_enqueue(que->tq, &txr->txq_task); return (err); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r254262 - in head/sys/dev: e1000 ixgbe
Author: jfv Date: Mon Aug 12 22:54:38 2013 New Revision: 254262 URL: http://svnweb.freebsd.org/changeset/base/254262 Log: Improve the MSIX setup code in the drivers, thanks to Marius for the changes. Make sure that pci_alloc_msix() does give us the vectors we need and fall back to MSI when it doesn't, also release any that were allocated when insufficient. MFC after: 3 days Modified: head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_igb.c head/sys/dev/ixgbe/ixgbe.c head/sys/dev/ixgbe/ixv.c Modified: head/sys/dev/e1000/if_em.c == --- head/sys/dev/e1000/if_em.c Mon Aug 12 22:27:53 2013(r254261) +++ head/sys/dev/e1000/if_em.c Mon Aug 12 22:54:38 2013(r254262) @@ -2277,7 +2277,7 @@ em_local_timer(void *arg) /* Mask to use in the irq trigger */ if (adapter->msix_mem) - trigger = rxr->ims; /* RX for 82574 */ + trigger = rxr->ims; else trigger = E1000_ICS_RXDMT0; @@ -2775,23 +2775,30 @@ em_setup_msix(struct adapter *adapter) if (val >= 3) val = 3; else { - bus_release_resource(dev, SYS_RES_MEMORY, - PCIR_BAR(EM_MSIX_BAR), adapter->msix_mem); - adapter->msix_mem = NULL; device_printf(adapter->dev, - "MSIX: incorrect vectors, using MSI\n"); + "MSIX: insufficient vectors, using MSI\n"); goto msi; } - if (pci_alloc_msix(dev, &val) == 0) { + if ((pci_alloc_msix(dev, &val) == 0) && (val == 3)) { device_printf(adapter->dev, "Using MSIX interrupts " "with %d vectors\n", val); return (val); } - /* Fall through to MSI */ + + /* + ** If MSIX alloc failed or provided us with + ** less than needed, free and fall through to MSI + */ + pci_release_msi(dev); } msi: + if (adapter->msix_mem != NULL) { + bus_release_resource(dev, SYS_RES_MEMORY, + PCIR_BAR(EM_MSIX_BAR), adapter->msix_mem); + adapter->msix_mem = NULL; + } val = 1; if (pci_alloc_msi(dev, &val) == 0) { device_printf(adapter->dev,"Using an MSI interrupt\n"); Modified: head/sys/dev/e1000/if_igb.c == --- head/sys/dev/e1000/if_igb.c Mon Aug 12 22:27:53 2013(r254261) +++ head/sys/dev/e1000/if_igb.c Mon Aug 12 22:54:38 2013(r254262) @@ -2899,13 +2899,18 @@ igb_setup_msix(struct adapter *adapter) msgs, want); goto msi; } - if (pci_alloc_msix(dev, &msgs) == 0) { + if ((pci_alloc_msix(dev, &msgs) == 0) && (msgs == want)) { device_printf(adapter->dev, "Using MSIX interrupts with %d vectors\n", msgs); adapter->num_queues = queues; return (msgs); } - /* Fallback to MSI configuration */ + /* + ** If MSIX alloc failed or provided us with + ** less than needed, free and fall through to MSI + */ + pci_release_msi(dev); + msi: if (adapter->msix_mem != NULL) { bus_release_resource(dev, SYS_RES_MEMORY, @@ -2914,10 +2919,10 @@ msi: } msgs = 1; if (pci_alloc_msi(dev, &msgs) == 0) { - device_printf(adapter->dev," Using MSI interrupt\n"); + device_printf(adapter->dev," Using an MSI interrupt\n"); return (msgs); } - /* Default to a legacy interrupt */ + device_printf(adapter->dev," Using a Legacy interrupt\n"); return (0); } Modified: head/sys/dev/ixgbe/ixgbe.c == --- head/sys/dev/ixgbe/ixgbe.c Mon Aug 12 22:27:53 2013(r254261) +++ head/sys/dev/ixgbe/ixgbe.c Mon Aug 12 22:54:38 2013(r254262) @@ -2456,12 +2456,18 @@ ixgbe_setup_msix(struct adapter *adapter msgs, want); goto msi; } - if (pci_alloc_msix(dev, &msgs) == 0) { + if ((pci_alloc_msix(dev, &msgs) == 0) && (msgs == want)) { device_printf(adapter->dev, "Using MSIX interrupts with %d vectors\n", msgs); adapter->num_queues = queues; return (msgs); } + /* + ** If MSIX alloc failed or provided us with + ** less than needed, free and fall through to MSI + */ + pci_release_msi(dev); + msi:
svn commit: r254149 - releng/9.2/sys/modules/ixgbe
Author: jfv Date: Fri Aug 9 16:34:12 2013 New Revision: 254149 URL: http://svnweb.freebsd.org/changeset/base/254149 Log: Automate inet option file creation for module build, change module name to if_ixgbe, this sync's the Makefile with HEAD. Approved by: re Modified: releng/9.2/sys/modules/ixgbe/Makefile Directory Properties: releng/9.2/sys/ (props changed) releng/9.2/sys/modules/ (props changed) releng/9.2/sys/modules/ixgbe/ (props changed) Modified: releng/9.2/sys/modules/ixgbe/Makefile == --- releng/9.2/sys/modules/ixgbe/Makefile Fri Aug 9 16:27:51 2013 (r254148) +++ releng/9.2/sys/modules/ixgbe/Makefile Fri Aug 9 16:34:12 2013 (r254149) @@ -1,7 +1,12 @@ #$FreeBSD$ + +.include + .PATH: ${.CURDIR}/../../dev/ixgbe -KMOD= ixgbe + +KMOD= if_ixgbe SRCS= device_if.h bus_if.h pci_if.h +SRCS += opt_inet.h opt_inet6.h SRCS+= ixgbe.c ixv.c # Shared source SRCS+= ixgbe_common.c ixgbe_api.c ixgbe_phy.c ixgbe_mbx.c ixgbe_vf.c @@ -9,4 +14,16 @@ SRCS+= ixgbe_dcb.c ixgbe_dcb_82598.c SRCS+= ixgbe_82599.c ixgbe_82598.c ixgbe_x540.c CFLAGS+= -I${.CURDIR}/../../dev/ixgbe -DSMP -DIXGBE_FDIR +.if !defined(KERNBUILDDIR) +.if ${MK_INET_SUPPORT} != "no" +opt_inet.h: + @echo "#define INET 1" > ${.TARGET} +.endif + +.if ${MK_INET6_SUPPORT} != "no" +opt_inet6.h: + @echo "#define INET6 1" > ${.TARGET} +.endif +.endif + .include ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r254114 - stable/9/sys/modules/ixgbe
Author: jfv Date: Fri Aug 9 00:39:20 2013 New Revision: 254114 URL: http://svnweb.freebsd.org/changeset/base/254114 Log: MFC 235964,236311,247505 Add the INET opt file creation, module name change, and include making the Makefile match HEAD. Modified: stable/9/sys/modules/ixgbe/Makefile Directory Properties: stable/9/sys/modules/ixgbe/ (props changed) Modified: stable/9/sys/modules/ixgbe/Makefile == --- stable/9/sys/modules/ixgbe/Makefile Thu Aug 8 23:53:47 2013 (r254113) +++ stable/9/sys/modules/ixgbe/Makefile Fri Aug 9 00:39:20 2013 (r254114) @@ -1,7 +1,12 @@ #$FreeBSD$ + +.include + .PATH: ${.CURDIR}/../../dev/ixgbe -KMOD= ixgbe + +KMOD= if_ixgbe SRCS= device_if.h bus_if.h pci_if.h +SRCS += opt_inet.h opt_inet6.h SRCS+= ixgbe.c ixv.c # Shared source SRCS+= ixgbe_common.c ixgbe_api.c ixgbe_phy.c ixgbe_mbx.c ixgbe_vf.c @@ -9,4 +14,16 @@ SRCS+= ixgbe_dcb.c ixgbe_dcb_82598.c SRCS+= ixgbe_82599.c ixgbe_82598.c ixgbe_x540.c CFLAGS+= -I${.CURDIR}/../../dev/ixgbe -DSMP -DIXGBE_FDIR +.if !defined(KERNBUILDDIR) +.if ${MK_INET_SUPPORT} != "no" +opt_inet.h: + @echo "#define INET 1" > ${.TARGET} +.endif + +.if ${MK_INET6_SUPPORT} != "no" +opt_inet6.h: + @echo "#define INET6 1" > ${.TARGET} +.endif +.endif + .include ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r254098 - releng/9.2/sys/dev/ixgbe
Author: jfv Date: Thu Aug 8 18:16:13 2013 New Revision: 254098 URL: http://svnweb.freebsd.org/changeset/base/254098 Log: MFC 253176,253179: make sure the rxbuf->flags is cleared when the RX ring is reset Approved by: re Modified: releng/9.2/sys/dev/ixgbe/ixgbe.c Directory Properties: releng/9.2/sys/ (props changed) releng/9.2/sys/dev/ (props changed) releng/9.2/sys/dev/ixgbe/ (props changed) Modified: releng/9.2/sys/dev/ixgbe/ixgbe.c == --- releng/9.2/sys/dev/ixgbe/ixgbe.cThu Aug 8 17:21:59 2013 (r254097) +++ releng/9.2/sys/dev/ixgbe/ixgbe.cThu Aug 8 18:16:13 2013 (r254098) @@ -3929,6 +3929,7 @@ ixgbe_free_receive_ring(struct rx_ring * rxbuf->buf->m_flags |= M_PKTHDR; m_freem(rxbuf->buf); rxbuf->buf = NULL; + rxbuf->flags = 0; } } } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r254097 - stable/9/sys/dev/ixgbe
Author: jfv Date: Thu Aug 8 17:21:59 2013 New Revision: 254097 URL: http://svnweb.freebsd.org/changeset/base/254097 Log: Clearing the rxbuf flags got lost along the way... adding it back. Modified: stable/9/sys/dev/ixgbe/ixgbe.c Modified: stable/9/sys/dev/ixgbe/ixgbe.c == --- stable/9/sys/dev/ixgbe/ixgbe.c Thu Aug 8 17:20:09 2013 (r254096) +++ stable/9/sys/dev/ixgbe/ixgbe.c Thu Aug 8 17:21:59 2013 (r254097) @@ -3929,6 +3929,7 @@ ixgbe_free_receive_ring(struct rx_ring * rxbuf->buf->m_flags |= M_PKTHDR; m_freem(rxbuf->buf); rxbuf->buf = NULL; + rxbuf->flags = 0; } } } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r254009 - releng/9.2/sys/dev/e1000
Author: jfv Date: Tue Aug 6 21:16:00 2013 New Revision: 254009 URL: http://svnweb.freebsd.org/changeset/base/254009 Log: When the igb driver is static there are cases when early interrupts occur, resulting in a panic in refresh_mbufs, to prevent this add a check to the interrupt handler for DRV_RUNNING. Approved by: re Modified: releng/9.2/sys/dev/e1000/if_igb.c Directory Properties: releng/9.2/sys/ (props changed) releng/9.2/sys/dev/ (props changed) releng/9.2/sys/dev/e1000/ (props changed) Modified: releng/9.2/sys/dev/e1000/if_igb.c == --- releng/9.2/sys/dev/e1000/if_igb.c Tue Aug 6 21:01:38 2013 (r254008) +++ releng/9.2/sys/dev/e1000/if_igb.c Tue Aug 6 21:16:00 2013 (r254009) @@ -1572,6 +1572,10 @@ igb_msix_que(void *arg) u32 newitr = 0; boolmore_rx; + /* Ignore spurious interrupts */ + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) + return; + E1000_WRITE_REG(&adapter->hw, E1000_EIMC, que->eims); ++que->irqs; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r254008 - in head/sys/dev: e1000 ixgbe
Author: jfv Date: Tue Aug 6 21:01:38 2013 New Revision: 254008 URL: http://svnweb.freebsd.org/changeset/base/254008 Log: Make the various driver MSIX setup routines fallback to MSI more gracefully. This change was suggested by Marius Strobl, thank you. PR: kern/181016 MFC after: ASAP Modified: head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_igb.c head/sys/dev/ixgbe/ixgbe.c head/sys/dev/ixgbe/ixv.c Modified: head/sys/dev/e1000/if_em.c == --- head/sys/dev/e1000/if_em.c Tue Aug 6 20:04:44 2013(r254007) +++ head/sys/dev/e1000/if_em.c Tue Aug 6 21:01:38 2013(r254008) @@ -2750,7 +2750,7 @@ static int em_setup_msix(struct adapter *adapter) { device_t dev = adapter->dev; - int val = 0; + int val; /* ** Setup MSI/X for Hartwell: tests have shown @@ -2764,17 +2764,17 @@ em_setup_msix(struct adapter *adapter) int rid = PCIR_BAR(EM_MSIX_BAR); adapter->msix_mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); - if (!adapter->msix_mem) { + if (adapter->msix_mem == NULL) { /* May not be enabled */ device_printf(adapter->dev, "Unable to map MSIX table \n"); goto msi; } val = pci_msix_count(dev); - /* We only need 3 vectors */ - if (val > 3) + /* We only need/want 3 vectors */ + if (val >= 3) val = 3; - if ((val != 3) && (val != 5)) { + else { bus_release_resource(dev, SYS_RES_MEMORY, PCIR_BAR(EM_MSIX_BAR), adapter->msix_mem); adapter->msix_mem = NULL; @@ -2787,14 +2787,13 @@ em_setup_msix(struct adapter *adapter) device_printf(adapter->dev, "Using MSIX interrupts " "with %d vectors\n", val); + return (val); } - - return (val); + /* Fall through to MSI */ } msi: - val = pci_msi_count(dev); - if (val == 1 && pci_alloc_msi(dev, &val) == 0) { - adapter->msix = 1; + val = 1; + if (pci_alloc_msi(dev, &val) == 0) { device_printf(adapter->dev,"Using an MSI interrupt\n"); return (val); } Modified: head/sys/dev/e1000/if_igb.c == --- head/sys/dev/e1000/if_igb.c Tue Aug 6 20:04:44 2013(r254007) +++ head/sys/dev/e1000/if_igb.c Tue Aug 6 21:01:38 2013(r254008) @@ -2842,24 +2842,19 @@ igb_setup_msix(struct adapter *adapter) goto msi; /* First try MSI/X */ + msgs = pci_msix_count(dev); + if (msgs == 0) + goto msi; rid = PCIR_BAR(IGB_MSIX_BAR); adapter->msix_mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); - if (!adapter->msix_mem) { + if (adapter->msix_mem == NULL) { /* May not be enabled */ device_printf(adapter->dev, "Unable to map MSIX table \n"); goto msi; } - msgs = pci_msix_count(dev); - if (msgs == 0) { /* system has msix disabled */ - bus_release_resource(dev, SYS_RES_MEMORY, - PCIR_BAR(IGB_MSIX_BAR), adapter->msix_mem); - adapter->msix_mem = NULL; - goto msi; - } - /* Figure out a reasonable auto config value */ queues = (mp_ncpus > (msgs-1)) ? (msgs-1) : mp_ncpus; @@ -2902,20 +2897,27 @@ igb_setup_msix(struct adapter *adapter) "MSIX Configuration Problem, " "%d vectors configured, but %d queues wanted!\n", msgs, want); - return (0); + goto msi; } - if ((msgs) && pci_alloc_msix(dev, &msgs) == 0) { + if (pci_alloc_msix(dev, &msgs) == 0) { device_printf(adapter->dev, "Using MSIX interrupts with %d vectors\n", msgs); adapter->num_queues = queues; return (msgs); } + /* Fallback to MSI configuration */ msi: - msgs = pci_msi_count(dev); - if (msgs == 1 && pci_alloc_msi(dev, &msgs) == 0) { + if (adapter->msix_mem != NULL) { + bus_release_resource(dev, SYS_RES_MEMORY, + PCIR_BAR(IGB_MSIX_BAR), adapter->msix_mem); + adapter->msix_mem = NULL; + } + msgs = 1; + if (pci_alloc_msi(de
svn commit: r254003 - stable/9/sys/dev/e1000
Author: jfv Date: Tue Aug 6 18:20:31 2013 New Revision: 254003 URL: http://svnweb.freebsd.org/changeset/base/254003 Log: When the igb driver is static there are cases when early interrupts occur, resulting in a panic in refresh_mbufs, to prevent this add a check in the interrupt handler for DRV_RUNNING. Modified: stable/9/sys/dev/e1000/if_igb.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) Modified: stable/9/sys/dev/e1000/if_igb.c == --- stable/9/sys/dev/e1000/if_igb.c Tue Aug 6 18:00:53 2013 (r254002) +++ stable/9/sys/dev/e1000/if_igb.c Tue Aug 6 18:20:31 2013 (r254003) @@ -1572,6 +1572,10 @@ igb_msix_que(void *arg) u32 newitr = 0; boolmore_rx; + /* Ignore spurious interrupts */ + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) + return; + E1000_WRITE_REG(&adapter->hw, E1000_EIMC, que->eims); ++que->irqs; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r254002 - head/sys/dev/e1000
Author: jfv Date: Tue Aug 6 18:00:53 2013 New Revision: 254002 URL: http://svnweb.freebsd.org/changeset/base/254002 Log: When the igb driver is static there are cases when early interrupts occur, resulting in a panic in refresh_mbufs, to prevent this add a check in the interrupt handler for DRV_RUNNING. MFC after: 1 day (critical for 9.2) Modified: head/sys/dev/e1000/if_igb.c Modified: head/sys/dev/e1000/if_igb.c == --- head/sys/dev/e1000/if_igb.c Tue Aug 6 17:22:06 2013(r254001) +++ head/sys/dev/e1000/if_igb.c Tue Aug 6 18:00:53 2013(r254002) @@ -1572,6 +1572,10 @@ igb_msix_que(void *arg) u32 newitr = 0; boolmore_rx; + /* Ignore spurious interrupts */ + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) + return; + E1000_WRITE_REG(&adapter->hw, E1000_EIMC, que->eims); ++que->irqs; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r254001 - releng/9.2/sys/dev/ixgbe
Author: jfv Date: Tue Aug 6 17:22:06 2013 New Revision: 254001 URL: http://svnweb.freebsd.org/changeset/base/254001 Log: MFC r253865: Fixes to RX_COPY optimization code allowing the removal of rearm_queues routine used in the local_timer. r253965: Correct the queue mask bit clearing in the link irq handler. Approved by: re Modified: releng/9.2/sys/dev/ixgbe/ixgbe.c Directory Properties: releng/9.2/sys/ (props changed) releng/9.2/sys/dev/ (props changed) releng/9.2/sys/dev/ixgbe/ (props changed) Modified: releng/9.2/sys/dev/ixgbe/ixgbe.c == --- releng/9.2/sys/dev/ixgbe/ixgbe.cTue Aug 6 17:11:12 2013 (r254000) +++ releng/9.2/sys/dev/ixgbe/ixgbe.cTue Aug 6 17:22:06 2013 (r254001) @@ -45,7 +45,7 @@ int ixgbe_display_debug_stat /* * Driver version */ -char ixgbe_driver_version[] = "2.5.13"; +char ixgbe_driver_version[] = "2.5.15"; /* * PCI Device ID Table @@ -297,6 +297,7 @@ TUNABLE_INT("hw.ixgbe.rxd", &ixgbe_rxd); ** doing so you are on your own :) */ static int allow_unsupported_sfp = FALSE; +TUNABLE_INT("hw.ixgbe.unsupported_sfp", &allow_unsupported_sfp); /* ** HW RSC control: @@ -1071,7 +1072,7 @@ ixgbe_init_locked(struct adapter *adapte u32 rxdctl, rxctrl; mtx_assert(&adapter->core_mtx, MA_OWNED); - INIT_DEBUGOUT("ixgbe_init: begin"); + INIT_DEBUGOUT("ixgbe_init_locked: begin"); hw->adapter_stopped = FALSE; ixgbe_stop_adapter(hw); callout_stop(&adapter->timer); @@ -1382,23 +1383,6 @@ ixgbe_disable_queue(struct adapter *adap } } -static inline void -ixgbe_rearm_queues(struct adapter *adapter, u64 queues) -{ - u32 mask; - - if (adapter->hw.mac.type == ixgbe_mac_82598EB) { - mask = (IXGBE_EIMS_RTX_QUEUE & queues); - IXGBE_WRITE_REG(&adapter->hw, IXGBE_EICS, mask); - } else { - mask = (queues & 0x); - IXGBE_WRITE_REG(&adapter->hw, IXGBE_EICS_EX(0), mask); - mask = (queues >> 32); - IXGBE_WRITE_REG(&adapter->hw, IXGBE_EICS_EX(1), mask); - } -} - - static void ixgbe_handle_que(void *context, int pending) { @@ -1506,6 +1490,10 @@ ixgbe_msix_que(void *arg) boolmore; u32 newitr = 0; + /* Protect against spurious interrupts */ + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) + return; + ixgbe_disable_queue(adapter, que->msix); ++que->irqs; @@ -1592,6 +1580,8 @@ ixgbe_msix_link(void *arg) /* First get the cause */ reg_eicr = IXGBE_READ_REG(hw, IXGBE_EICS); + /* Be sure the queue bits are not cleared */ + reg_eicr &= ~IXGBE_EICR_RTX_QUEUE; /* Clear interrupt with write */ IXGBE_WRITE_REG(hw, IXGBE_EICR, reg_eicr); @@ -2067,7 +2057,6 @@ ixgbe_local_timer(void *arg) goto watchdog; out: - ixgbe_rearm_queues(adapter, adapter->que_mask); callout_reset(&adapter->timer, hz, ixgbe_local_timer, adapter); return; @@ -3201,7 +3190,7 @@ ixgbe_free_transmit_buffers(struct tx_ri struct ixgbe_tx_buf *tx_buffer; int i; - INIT_DEBUGOUT("free_transmit_ring: begin"); + INIT_DEBUGOUT("ixgbe_free_transmit_ring: begin"); if (txr->tx_buffers == NULL) return; @@ -4004,11 +3993,13 @@ ixgbe_setup_receive_ring(struct rx_ring addr = PNMB(slot + sj, &paddr); netmap_load_map(rxr->ptag, rxbuf->pmap, addr); - /* Update descriptor */ + /* Update descriptor and the cached value */ rxr->rx_base[j].read.pkt_addr = htole64(paddr); + rxbuf->addr = htole64(paddr); continue; } #endif /* DEV_NETMAP */ + rxbuf->flags = 0; rxbuf->buf = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, adapter->rx_mbuf_sz); if (rxbuf->buf == NULL) { @@ -4025,8 +4016,9 @@ ixgbe_setup_receive_ring(struct rx_ring goto fail; bus_dmamap_sync(rxr->ptag, rxbuf->pmap, BUS_DMASYNC_PREREAD); - /* Update descriptor */ + /* Update the descriptor and the cached value */ rxr->rx_base[j].read.pkt_addr = htole64(seg[0].ds_addr); + rxbuf->addr = htole64(seg[0].ds_addr); } @@ -4243,6 +4235,8 @@ ixgbe_free_receive_structures(struct ada { struct rx_ring *rxr = adapter->rx_rings; + INIT_DEBUGOUT("ixgbe_free
svn commit: r254000 - stable/9/sys/dev/ixgbe
Author: jfv Date: Tue Aug 6 17:11:12 2013 New Revision: 254000 URL: http://svnweb.freebsd.org/changeset/base/254000 Log: MFC r253865: Fixes to RX_COPY optimization code allowing the removal of the rearm_queues routine used in local_timer. r253965: Correct the queue mask bit clearing in the link interrupt handler. Approved by: re Modified: stable/9/sys/dev/ixgbe/ixgbe.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) Modified: stable/9/sys/dev/ixgbe/ixgbe.c == --- stable/9/sys/dev/ixgbe/ixgbe.c Tue Aug 6 17:10:52 2013 (r253999) +++ stable/9/sys/dev/ixgbe/ixgbe.c Tue Aug 6 17:11:12 2013 (r254000) @@ -45,7 +45,7 @@ int ixgbe_display_debug_stat /* * Driver version */ -char ixgbe_driver_version[] = "2.5.13"; +char ixgbe_driver_version[] = "2.5.15"; /* * PCI Device ID Table @@ -297,6 +297,7 @@ TUNABLE_INT("hw.ixgbe.rxd", &ixgbe_rxd); ** doing so you are on your own :) */ static int allow_unsupported_sfp = FALSE; +TUNABLE_INT("hw.ixgbe.unsupported_sfp", &allow_unsupported_sfp); /* ** HW RSC control: @@ -1071,7 +1072,7 @@ ixgbe_init_locked(struct adapter *adapte u32 rxdctl, rxctrl; mtx_assert(&adapter->core_mtx, MA_OWNED); - INIT_DEBUGOUT("ixgbe_init: begin"); + INIT_DEBUGOUT("ixgbe_init_locked: begin"); hw->adapter_stopped = FALSE; ixgbe_stop_adapter(hw); callout_stop(&adapter->timer); @@ -1382,23 +1383,6 @@ ixgbe_disable_queue(struct adapter *adap } } -static inline void -ixgbe_rearm_queues(struct adapter *adapter, u64 queues) -{ - u32 mask; - - if (adapter->hw.mac.type == ixgbe_mac_82598EB) { - mask = (IXGBE_EIMS_RTX_QUEUE & queues); - IXGBE_WRITE_REG(&adapter->hw, IXGBE_EICS, mask); - } else { - mask = (queues & 0x); - IXGBE_WRITE_REG(&adapter->hw, IXGBE_EICS_EX(0), mask); - mask = (queues >> 32); - IXGBE_WRITE_REG(&adapter->hw, IXGBE_EICS_EX(1), mask); - } -} - - static void ixgbe_handle_que(void *context, int pending) { @@ -1506,6 +1490,10 @@ ixgbe_msix_que(void *arg) boolmore; u32 newitr = 0; + /* Protect against spurious interrupts */ + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) + return; + ixgbe_disable_queue(adapter, que->msix); ++que->irqs; @@ -1592,6 +1580,8 @@ ixgbe_msix_link(void *arg) /* First get the cause */ reg_eicr = IXGBE_READ_REG(hw, IXGBE_EICS); + /* Be sure the queue bits are not cleared */ + reg_eicr &= ~IXGBE_EICR_RTX_QUEUE; /* Clear interrupt with write */ IXGBE_WRITE_REG(hw, IXGBE_EICR, reg_eicr); @@ -2067,7 +2057,6 @@ ixgbe_local_timer(void *arg) goto watchdog; out: - ixgbe_rearm_queues(adapter, adapter->que_mask); callout_reset(&adapter->timer, hz, ixgbe_local_timer, adapter); return; @@ -3201,7 +3190,7 @@ ixgbe_free_transmit_buffers(struct tx_ri struct ixgbe_tx_buf *tx_buffer; int i; - INIT_DEBUGOUT("free_transmit_ring: begin"); + INIT_DEBUGOUT("ixgbe_free_transmit_ring: begin"); if (txr->tx_buffers == NULL) return; @@ -4004,11 +3993,13 @@ ixgbe_setup_receive_ring(struct rx_ring addr = PNMB(slot + sj, &paddr); netmap_load_map(rxr->ptag, rxbuf->pmap, addr); - /* Update descriptor */ + /* Update descriptor and the cached value */ rxr->rx_base[j].read.pkt_addr = htole64(paddr); + rxbuf->addr = htole64(paddr); continue; } #endif /* DEV_NETMAP */ + rxbuf->flags = 0; rxbuf->buf = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, adapter->rx_mbuf_sz); if (rxbuf->buf == NULL) { @@ -4025,8 +4016,9 @@ ixgbe_setup_receive_ring(struct rx_ring goto fail; bus_dmamap_sync(rxr->ptag, rxbuf->pmap, BUS_DMASYNC_PREREAD); - /* Update descriptor */ + /* Update the descriptor and the cached value */ rxr->rx_base[j].read.pkt_addr = htole64(seg[0].ds_addr); + rxbuf->addr = htole64(seg[0].ds_addr); } @@ -4243,6 +4235,8 @@ ixgbe_free_receive_structures(struct ada { struct rx_ring *rxr = adapter->rx_rings; + INIT_DEBUGOUT("ixgbe_free_re
svn commit: r253965 - head/sys/dev/ixgbe
Author: jfv Date: Mon Aug 5 16:16:50 2013 New Revision: 253965 URL: http://svnweb.freebsd.org/changeset/base/253965 Log: Correct a fat-finger in the last delta. MFC after: ASAP Modified: head/sys/dev/ixgbe/ixgbe.c Modified: head/sys/dev/ixgbe/ixgbe.c == --- head/sys/dev/ixgbe/ixgbe.c Mon Aug 5 12:55:23 2013(r253964) +++ head/sys/dev/ixgbe/ixgbe.c Mon Aug 5 16:16:50 2013(r253965) @@ -1581,7 +1581,7 @@ ixgbe_msix_link(void *arg) /* First get the cause */ reg_eicr = IXGBE_READ_REG(hw, IXGBE_EICS); /* Be sure the queue bits are not cleared */ - reg_eicr = ~IXGBE_EICR_RTX_QUEUE; + reg_eicr &= ~IXGBE_EICR_RTX_QUEUE; /* Clear interrupt with write */ IXGBE_WRITE_REG(hw, IXGBE_EICR, reg_eicr); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r253865 - head/sys/dev/ixgbe
Author: jfv Date: Thu Aug 1 20:10:16 2013 New Revision: 253865 URL: http://svnweb.freebsd.org/changeset/base/253865 Log: A number of important fixes: - mbuf reused after an RX_COPY optimized operation can sometimes have a bogus cached address, resulting in TCP hangs. Add critical save points to the cached address. Thanks to Michael and the team at Verisign for finding this problem. - A couple more spots where the rxbuf->flags member should be cleared just to be sure no incorrect RX_COPY state is left around. Thanks to Adrian for tracking these down. - Remove the rearm_queues function from the driver, this was found to be responsible for some out-of-order packets by Verisign, and was always a bandaid, with the other fixes in this delta the bandaid can finally be removed. - In the other/link interrupt handler the entire state of the EICS register was being writen back into EICR (which clears causes and thus re-enables those interrupts), this was wrong, so now mask off the queue portion of the register value, so we only clear the other/link interrupt we intend. Marc from Verisign found this. - Make the SFP+ unsupported option tuneable now, by customer request. - Finally, just a couple of minor DEBUG string fixes. I want to call out and thank all the participants in the 10G community/Intel calls for helping track down these problems and make the driver better for everyone! MFC after:3 days, these are critical fixes for 9.2! Modified: head/sys/dev/ixgbe/ixgbe.c Modified: head/sys/dev/ixgbe/ixgbe.c == --- head/sys/dev/ixgbe/ixgbe.c Thu Aug 1 19:37:11 2013(r253864) +++ head/sys/dev/ixgbe/ixgbe.c Thu Aug 1 20:10:16 2013(r253865) @@ -45,7 +45,7 @@ int ixgbe_display_debug_stat /* * Driver version */ -char ixgbe_driver_version[] = "2.5.13"; +char ixgbe_driver_version[] = "2.5.15"; /* * PCI Device ID Table @@ -297,6 +297,7 @@ TUNABLE_INT("hw.ixgbe.rxd", &ixgbe_rxd); ** doing so you are on your own :) */ static int allow_unsupported_sfp = FALSE; +TUNABLE_INT("hw.ixgbe.unsupported_sfp", &allow_unsupported_sfp); /* ** HW RSC control: @@ -1071,7 +1072,7 @@ ixgbe_init_locked(struct adapter *adapte u32 rxdctl, rxctrl; mtx_assert(&adapter->core_mtx, MA_OWNED); - INIT_DEBUGOUT("ixgbe_init: begin"); + INIT_DEBUGOUT("ixgbe_init_locked: begin"); hw->adapter_stopped = FALSE; ixgbe_stop_adapter(hw); callout_stop(&adapter->timer); @@ -1382,23 +1383,6 @@ ixgbe_disable_queue(struct adapter *adap } } -static inline void -ixgbe_rearm_queues(struct adapter *adapter, u64 queues) -{ - u32 mask; - - if (adapter->hw.mac.type == ixgbe_mac_82598EB) { - mask = (IXGBE_EIMS_RTX_QUEUE & queues); - IXGBE_WRITE_REG(&adapter->hw, IXGBE_EICS, mask); - } else { - mask = (queues & 0x); - IXGBE_WRITE_REG(&adapter->hw, IXGBE_EICS_EX(0), mask); - mask = (queues >> 32); - IXGBE_WRITE_REG(&adapter->hw, IXGBE_EICS_EX(1), mask); - } -} - - static void ixgbe_handle_que(void *context, int pending) { @@ -1506,6 +1490,10 @@ ixgbe_msix_que(void *arg) boolmore; u32 newitr = 0; + /* Protect against spurious interrupts */ + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) + return; + ixgbe_disable_queue(adapter, que->msix); ++que->irqs; @@ -1592,6 +1580,8 @@ ixgbe_msix_link(void *arg) /* First get the cause */ reg_eicr = IXGBE_READ_REG(hw, IXGBE_EICS); + /* Be sure the queue bits are not cleared */ + reg_eicr = ~IXGBE_EICR_RTX_QUEUE; /* Clear interrupt with write */ IXGBE_WRITE_REG(hw, IXGBE_EICR, reg_eicr); @@ -2067,7 +2057,6 @@ ixgbe_local_timer(void *arg) goto watchdog; out: - ixgbe_rearm_queues(adapter, adapter->que_mask); callout_reset(&adapter->timer, hz, ixgbe_local_timer, adapter); return; @@ -3201,7 +3190,7 @@ ixgbe_free_transmit_buffers(struct tx_ri struct ixgbe_tx_buf *tx_buffer; int i; - INIT_DEBUGOUT("free_transmit_ring: begin"); + INIT_DEBUGOUT("ixgbe_free_transmit_ring: begin"); if (txr->tx_buffers == NULL) return; @@ -4005,11 +3994,13 @@ ixgbe_setup_receive_ring(struct rx_ring addr = PNMB(slot + sj, &paddr); netmap_load_map(rxr->ptag, rxbuf->pmap, addr); - /* Update descriptor */ +
svn commit: r253475 - in head/sys/dev: ahci ata ata/chipsets ichsmb ichwd
Author: jfv Date: Fri Jul 19 21:37:40 2013 New Revision: 253475 URL: http://svnweb.freebsd.org/changeset/base/253475 Log: Add new Coleto Creek device support: SATA, SMBus, and Watchdog devices. MFC after: 1 week Modified: head/sys/dev/ahci/ahci.c head/sys/dev/ata/ata-pci.h head/sys/dev/ata/chipsets/ata-intel.c head/sys/dev/ichsmb/ichsmb_pci.c head/sys/dev/ichwd/ichwd.c head/sys/dev/ichwd/ichwd.h Modified: head/sys/dev/ahci/ahci.c == --- head/sys/dev/ahci/ahci.cFri Jul 19 21:33:24 2013(r253474) +++ head/sys/dev/ahci/ahci.cFri Jul 19 21:37:40 2013(r253475) @@ -196,6 +196,7 @@ static struct { {0x1e078086, 0x00, "Intel Panther Point", 0}, {0x1e0e8086, 0x00, "Intel Panther Point", 0}, {0x1e0f8086, 0x00, "Intel Panther Point", 0}, + {0x23a38086, 0x00, "Intel Coleto Creek",0}, {0x8c028086, 0x00, "Intel Lynx Point", 0}, {0x8c038086, 0x00, "Intel Lynx Point", 0}, {0x8c048086, 0x00, "Intel Lynx Point", 0}, Modified: head/sys/dev/ata/ata-pci.h == --- head/sys/dev/ata/ata-pci.h Fri Jul 19 21:33:24 2013(r253474) +++ head/sys/dev/ata/ata-pci.h Fri Jul 19 21:37:40 2013(r253475) @@ -274,6 +274,10 @@ struct ata_pci_controller { #define ATA_ISCH0x811a8086 #define ATA_DH89XXCC0x23238086 +#define ATA_COLETOCRK_AH1 0x23a38086 +#define ATA_COLETOCRK_S10x23a18086 +#define ATA_COLETOCRK_S20x23a68086 + #define ATA_ITE_ID 0x1283 #define ATA_IT8211F 0x82111283 #define ATA_IT8212F 0x82121283 Modified: head/sys/dev/ata/chipsets/ata-intel.c == --- head/sys/dev/ata/chipsets/ata-intel.c Fri Jul 19 21:33:24 2013 (r253474) +++ head/sys/dev/ata/chipsets/ata-intel.c Fri Jul 19 21:37:40 2013 (r253475) @@ -226,6 +226,9 @@ ata_intel_probe(device_t dev) { ATA_I31244, 0, 0, 2, ATA_SA150, "31244" }, { ATA_ISCH, 0, 0, 1, ATA_UDMA5, "SCH" }, { ATA_DH89XXCC, 0, INTEL_AHCI, 0, ATA_SA300, "DH89xxCC" }, + { ATA_COLETOCRK_S1, 0, INTEL_6CH2, 0, ATA_SA300, "COLETOCRK" }, + { ATA_COLETOCRK_S2, 0, INTEL_6CH2, 0, ATA_SA300, "COLETOCRK" }, + { ATA_COLETOCRK_AH1,0, INTEL_AHCI, 0, ATA_SA300, "COLETOCRK" }, { 0, 0, 0, 0, 0, 0}}; if (pci_get_vendor(dev) != ATA_INTEL_ID) Modified: head/sys/dev/ichsmb/ichsmb_pci.c == --- head/sys/dev/ichsmb/ichsmb_pci.cFri Jul 19 21:33:24 2013 (r253474) +++ head/sys/dev/ichsmb/ichsmb_pci.cFri Jul 19 21:37:40 2013 (r253475) @@ -85,6 +85,7 @@ __FBSDID("$FreeBSD$"); #define ID_PATSBURG0x1d228086 #define ID_CPT 0x1c228086 #define ID_PPT 0x1e228086 +#define ID_COLETOCRK 0x23B08086 #define ID_LPT 0x8c228086 #define PCIS_SERIALBUS_SMBUS_PROGIF0x00 @@ -192,6 +193,9 @@ ichsmb_pci_probe(device_t dev) case ID_LPT: device_set_desc(dev, "Intel Lynx Point SMBus controller"); break; + case ID_COLETOCRK: + device_set_desc(dev, "Intel Coleto Creek SMBus controller"); + break; default: return (ENXIO); } Modified: head/sys/dev/ichwd/ichwd.c == --- head/sys/dev/ichwd/ichwd.c Fri Jul 19 21:33:24 2013(r253474) +++ head/sys/dev/ichwd/ichwd.c Fri Jul 19 21:37:40 2013(r253475) @@ -195,6 +195,7 @@ static struct ichwd_device ichwd_devices { DEVICEID_LPT1, "Intel Lynx Point watchdog timer", 10 }, { DEVICEID_LPT2, "Intel Lynx Point watchdog timer", 10 }, { DEVICEID_DH89XXCC_LPC, "Intel DH89xxCC watchdog timer", 10 }, + { DEVICEID_COLETOCRK_LPC, "Intel Coleto Creek watchdog timer", 10 }, { 0, NULL, 0 }, }; Modified: head/sys/dev/ichwd/ichwd.h == --- head/sys/dev/ichwd/ichwd.h Fri Jul 19 21:33:24 2013(r253474) +++ head/sys/dev/ichwd/ichwd.h Fri Jul 19 21:37:40 2013(r253475) @@ -126,6 +126,7 @@ struct ichwd_softc { #define DEVICEID_PPT30 0x1e5e #define DEVICEID_PPT31 0x1e5f #define DEVICEID_DH89XXCC_LPC 0x2310 +#define DEVICEID_COLETOCRK_LPC 0x2390 #define DEVICEID_82801AA 0x2410 #define DEVICEID_82801AB 0x2420 #define DEVICEID_82801BA 0x2440 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-al
svn commit: r253374 - in stable/9/sys: dev/e1000 dev/ixgbe modules/em modules/igb
Author: jfv Date: Mon Jul 15 23:27:48 2013 New Revision: 253374 URL: http://svnweb.freebsd.org/changeset/base/253374 Log: MFC: r253284, r253285, r253303: Correct the Intel network driver module builds. They were not defining INET or INET6, and in the case of ixgbe this will cause a panic in the TSO setup code, but in all cases the ioctl behavior is different, this change makes the module and static consistent. Approved by: re Modified: stable/9/sys/dev/e1000/if_em.c stable/9/sys/dev/e1000/if_igb.c stable/9/sys/dev/e1000/if_lem.c stable/9/sys/dev/ixgbe/ixgbe.c stable/9/sys/dev/ixgbe/ixv.c stable/9/sys/modules/em/Makefile stable/9/sys/modules/igb/Makefile Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/dev/e1000/if_em.c == --- stable/9/sys/dev/e1000/if_em.c Mon Jul 15 23:12:42 2013 (r253373) +++ stable/9/sys/dev/e1000/if_em.c Mon Jul 15 23:27:48 2013 (r253374) @@ -32,10 +32,11 @@ **/ /*$FreeBSD$*/ -#ifdef HAVE_KERNEL_OPTION_HEADERS -#include "opt_device_polling.h" #include "opt_inet.h" #include "opt_inet6.h" + +#ifdef HAVE_KERNEL_OPTION_HEADERS +#include "opt_device_polling.h" #endif #include Modified: stable/9/sys/dev/e1000/if_igb.c == --- stable/9/sys/dev/e1000/if_igb.c Mon Jul 15 23:12:42 2013 (r253373) +++ stable/9/sys/dev/e1000/if_igb.c Mon Jul 15 23:27:48 2013 (r253374) @@ -33,10 +33,11 @@ /*$FreeBSD$*/ -#ifdef HAVE_KERNEL_OPTION_HEADERS -#include "opt_device_polling.h" #include "opt_inet.h" #include "opt_inet6.h" + +#ifdef HAVE_KERNEL_OPTION_HEADERS +#include "opt_device_polling.h" #include "opt_altq.h" #endif Modified: stable/9/sys/dev/e1000/if_lem.c == --- stable/9/sys/dev/e1000/if_lem.c Mon Jul 15 23:12:42 2013 (r253373) +++ stable/9/sys/dev/e1000/if_lem.c Mon Jul 15 23:27:48 2013 (r253374) @@ -32,10 +32,11 @@ **/ /*$FreeBSD$*/ -#ifdef HAVE_KERNEL_OPTION_HEADERS -#include "opt_device_polling.h" #include "opt_inet.h" #include "opt_inet6.h" + +#ifdef HAVE_KERNEL_OPTION_HEADERS +#include "opt_device_polling.h" #endif #include Modified: stable/9/sys/dev/ixgbe/ixgbe.c == --- stable/9/sys/dev/ixgbe/ixgbe.c Mon Jul 15 23:12:42 2013 (r253373) +++ stable/9/sys/dev/ixgbe/ixgbe.c Mon Jul 15 23:27:48 2013 (r253374) @@ -33,11 +33,8 @@ /*$FreeBSD$*/ -#ifdef HAVE_KERNEL_OPTION_HEADERS #include "opt_inet.h" #include "opt_inet6.h" -#endif - #include "ixgbe.h" /* Modified: stable/9/sys/dev/ixgbe/ixv.c == --- stable/9/sys/dev/ixgbe/ixv.cMon Jul 15 23:12:42 2013 (r253373) +++ stable/9/sys/dev/ixgbe/ixv.cMon Jul 15 23:27:48 2013 (r253374) @@ -32,11 +32,8 @@ **/ /*$FreeBSD$*/ -#ifdef HAVE_KERNEL_OPTION_HEADERS #include "opt_inet.h" #include "opt_inet6.h" -#endif - #include "ixv.h" /* Modified: stable/9/sys/modules/em/Makefile == --- stable/9/sys/modules/em/MakefileMon Jul 15 23:12:42 2013 (r253373) +++ stable/9/sys/modules/em/MakefileMon Jul 15 23:27:48 2013 (r253374) @@ -1,7 +1,10 @@ # $FreeBSD$ + +.include + .PATH: ${.CURDIR}/../../dev/e1000 KMOD= if_em -SRCS= device_if.h bus_if.h pci_if.h opt_inet.h +SRCS= device_if.h bus_if.h pci_if.h opt_inet.h opt_inet6.h SRCS+= $(CORE_SRC) $(LEGACY_SRC) SRCS += $(COMMON_SHARED) $(LEGACY_SHARED) $(PCIE_SHARED) CORE_SRC = if_em.c e1000_osdep.c @@ -18,4 +21,16 @@ CFLAGS += -I${.CURDIR}/../../dev/e1000 # DEVICE_POLLING for a non-interrupt-driven method #CFLAGS += -DDEVICE_POLLING +.if !defined(KERNBUILDDIR) +.if ${MK_INET_SUPPORT} != "no" +opt_inet.h: + @echo "#define INET 1" > ${.TARGET} +.endif + +.if ${MK_INET6_SUPPORT} != "no" +opt_inet6.h: + @echo "#define INET6 1" > ${.TARGET} +.endif +.endif + .include Modified: stable/9/sys/modules/igb/Makefile == --- stable/9/sys/modules/igb/Makefile Mon Jul 15 23:12:42 2013
svn commit: r253303 - in head/sys: dev/e1000 modules/em modules/igb
Author: jfv Date: Fri Jul 12 22:36:26 2013 New Revision: 253303 URL: http://svnweb.freebsd.org/changeset/base/253303 Log: Change the E1000 driver option header handling to match the ixgbe driver. As it was, when building them as a module INET and INET6 are not defined. In these drivers it does not cause a panic, however it does result in different behavior in the ioctl routine when you are using a module vs static, and I think the behavior should be the same. MFC after: 3 days Modified: head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_igb.c head/sys/dev/e1000/if_lem.c head/sys/modules/em/Makefile head/sys/modules/igb/Makefile Modified: head/sys/dev/e1000/if_em.c == --- head/sys/dev/e1000/if_em.c Fri Jul 12 22:16:43 2013(r253302) +++ head/sys/dev/e1000/if_em.c Fri Jul 12 22:36:26 2013(r253303) @@ -32,10 +32,11 @@ **/ /*$FreeBSD$*/ -#ifdef HAVE_KERNEL_OPTION_HEADERS -#include "opt_device_polling.h" #include "opt_inet.h" #include "opt_inet6.h" + +#ifdef HAVE_KERNEL_OPTION_HEADERS +#include "opt_device_polling.h" #endif #include Modified: head/sys/dev/e1000/if_igb.c == --- head/sys/dev/e1000/if_igb.c Fri Jul 12 22:16:43 2013(r253302) +++ head/sys/dev/e1000/if_igb.c Fri Jul 12 22:36:26 2013(r253303) @@ -33,10 +33,11 @@ /*$FreeBSD$*/ -#ifdef HAVE_KERNEL_OPTION_HEADERS -#include "opt_device_polling.h" #include "opt_inet.h" #include "opt_inet6.h" + +#ifdef HAVE_KERNEL_OPTION_HEADERS +#include "opt_device_polling.h" #include "opt_altq.h" #endif Modified: head/sys/dev/e1000/if_lem.c == --- head/sys/dev/e1000/if_lem.c Fri Jul 12 22:16:43 2013(r253302) +++ head/sys/dev/e1000/if_lem.c Fri Jul 12 22:36:26 2013(r253303) @@ -32,10 +32,11 @@ **/ /*$FreeBSD$*/ -#ifdef HAVE_KERNEL_OPTION_HEADERS -#include "opt_device_polling.h" #include "opt_inet.h" #include "opt_inet6.h" + +#ifdef HAVE_KERNEL_OPTION_HEADERS +#include "opt_device_polling.h" #endif #include Modified: head/sys/modules/em/Makefile == --- head/sys/modules/em/MakefileFri Jul 12 22:16:43 2013 (r253302) +++ head/sys/modules/em/MakefileFri Jul 12 22:36:26 2013 (r253303) @@ -1,7 +1,10 @@ # $FreeBSD$ + +.include + .PATH: ${.CURDIR}/../../dev/e1000 KMOD= if_em -SRCS= device_if.h bus_if.h pci_if.h opt_inet.h +SRCS= device_if.h bus_if.h pci_if.h opt_inet.h opt_inet6.h SRCS+= $(CORE_SRC) $(LEGACY_SRC) SRCS += $(COMMON_SHARED) $(LEGACY_SHARED) $(PCIE_SHARED) CORE_SRC = if_em.c e1000_osdep.c @@ -18,4 +21,16 @@ CFLAGS += -I${.CURDIR}/../../dev/e1000 # DEVICE_POLLING for a non-interrupt-driven method #CFLAGS += -DDEVICE_POLLING +.if !defined(KERNBUILDDIR) +.if ${MK_INET_SUPPORT} != "no" +opt_inet.h: + @echo "#define INET 1" > ${.TARGET} +.endif + +.if ${MK_INET6_SUPPORT} != "no" +opt_inet6.h: + @echo "#define INET6 1" > ${.TARGET} +.endif +.endif + .include Modified: head/sys/modules/igb/Makefile == --- head/sys/modules/igb/Makefile Fri Jul 12 22:16:43 2013 (r253302) +++ head/sys/modules/igb/Makefile Fri Jul 12 22:36:26 2013 (r253303) @@ -1,7 +1,10 @@ #$FreeBSD$ + +.include + .PATH: ${.CURDIR}/../../dev/e1000 KMOD= if_igb -SRCS= device_if.h bus_if.h pci_if.h opt_inet.h +SRCS= device_if.h bus_if.h pci_if.h opt_inet.h opt_inet6.h SRCS+= if_igb.c $(SHARED_SRCS) SHARED_SRCS = e1000_api.c e1000_phy.c e1000_nvm.c e1000_mac.c e1000_manage.c SHARED_SRCS += e1000_80003es2lan.c e1000_82542.c e1000_82541.c e1000_82543.c @@ -20,4 +23,16 @@ CFLAGS += -I${.CURDIR}/../../dev/e1000 - # ALTQ. #CFLAGS += -DIGB_LEGACY_TX +.if !defined(KERNBUILDDIR) +.if ${MK_INET_SUPPORT} != "no" +opt_inet.h: + @echo "#define INET 1" > ${.TARGET} +.endif + +.if ${MK_INET6_SUPPORT} != "no" +opt_inet6.h: + @echo "#define INET6 1" > ${.TARGET} +.endif +.endif + .include ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r253285 - head/sys/dev/ixgbe
Author: jfv Date: Fri Jul 12 21:21:15 2013 New Revision: 253285 URL: http://svnweb.freebsd.org/changeset/base/253285 Log: Opps, need to change the VF code as well. MFC after:ASAP Modified: head/sys/dev/ixgbe/ixv.c Modified: head/sys/dev/ixgbe/ixv.c == --- head/sys/dev/ixgbe/ixv.cFri Jul 12 21:14:42 2013(r253284) +++ head/sys/dev/ixgbe/ixv.cFri Jul 12 21:21:15 2013(r253285) @@ -32,11 +32,8 @@ **/ /*$FreeBSD$*/ -#ifdef HAVE_KERNEL_OPTION_HEADERS #include "opt_inet.h" #include "opt_inet6.h" -#endif - #include "ixv.h" /* ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r253284 - head/sys/dev/ixgbe
Author: jfv Date: Fri Jul 12 21:14:42 2013 New Revision: 253284 URL: http://svnweb.freebsd.org/changeset/base/253284 Log: Remove the conditional define around the option headers, when building the driver as a module the result of the present system results in INET and INET6 being undefined, and will cause the panic in ixgbe_tso_setup(). The Makefile in the module directory now renders the conditional in the source unnecessary and wrong. MFC after: ASAP - the panic as a module must not get into 9.2 Modified: head/sys/dev/ixgbe/ixgbe.c Modified: head/sys/dev/ixgbe/ixgbe.c == --- head/sys/dev/ixgbe/ixgbe.c Fri Jul 12 20:06:52 2013(r253283) +++ head/sys/dev/ixgbe/ixgbe.c Fri Jul 12 21:14:42 2013(r253284) @@ -33,11 +33,8 @@ /*$FreeBSD$*/ -#ifdef HAVE_KERNEL_OPTION_HEADERS #include "opt_inet.h" #include "opt_inet6.h" -#endif - #include "ixgbe.h" /* ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r253179 - head/sys/dev/ixgbe
Author: jfv Date: Thu Jul 11 03:44:06 2013 New Revision: 253179 URL: http://svnweb.freebsd.org/changeset/base/253179 Log: Fix my last commit, flags rather than flag... duh. MFC after: 2 days Modified: head/sys/dev/ixgbe/ixgbe.c Modified: head/sys/dev/ixgbe/ixgbe.c == --- head/sys/dev/ixgbe/ixgbe.c Thu Jul 11 02:10:23 2013(r253178) +++ head/sys/dev/ixgbe/ixgbe.c Thu Jul 11 03:44:06 2013(r253179) @@ -3943,7 +3943,7 @@ ixgbe_free_receive_ring(struct rx_ring * rxbuf->buf->m_flags |= M_PKTHDR; m_freem(rxbuf->buf); rxbuf->buf = NULL; - rxbuf->flag = 0; + rxbuf->flags = 0; } } } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r253176 - head/sys/dev/ixgbe
Author: jfv Date: Wed Jul 10 23:14:24 2013 New Revision: 253176 URL: http://svnweb.freebsd.org/changeset/base/253176 Log: Fix to a panic found internally, bad pointer during rxeof processing. Thanks for John Baldwin for catching this. Not clearing the flag member of the rxbuf could result in a NULL mbuf pointer being used. MFC after:2 days (this needs to get into 9.2!) Modified: head/sys/dev/ixgbe/ixgbe.c Modified: head/sys/dev/ixgbe/ixgbe.c == --- head/sys/dev/ixgbe/ixgbe.c Wed Jul 10 22:45:07 2013(r253175) +++ head/sys/dev/ixgbe/ixgbe.c Wed Jul 10 23:14:24 2013(r253176) @@ -3943,6 +3943,7 @@ ixgbe_free_receive_ring(struct rx_ring * rxbuf->buf->m_flags |= M_PKTHDR; m_freem(rxbuf->buf); rxbuf->buf = NULL; + rxbuf->flag = 0; } } } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r252899 - stable/9/sys/dev/e1000
Author: jfv Date: Sat Jul 6 22:34:42 2013 New Revision: 252899 URL: http://svnweb.freebsd.org/changeset/base/252899 Log: MFC e1000 driver revisions: 248906,248908,249074,249339,249509 250108,250109,250168,250413,250414 Modified: stable/9/sys/dev/e1000/README stable/9/sys/dev/e1000/if_em.c stable/9/sys/dev/e1000/if_igb.c stable/9/sys/dev/e1000/if_igb.h stable/9/sys/dev/e1000/if_lem.c Directory Properties: stable/9/sys/dev/e1000/ (props changed) Modified: stable/9/sys/dev/e1000/README == --- stable/9/sys/dev/e1000/README Sat Jul 6 21:38:55 2013 (r252898) +++ stable/9/sys/dev/e1000/README Sat Jul 6 22:34:42 2013 (r252899) @@ -389,7 +389,7 @@ For general information and support, go http://support.intel.com If an issue is identified, support is through email only at: -freebsd...@mailbox.intel.com +free...@intel.com License Modified: stable/9/sys/dev/e1000/if_em.c == --- stable/9/sys/dev/e1000/if_em.c Sat Jul 6 21:38:55 2013 (r252898) +++ stable/9/sys/dev/e1000/if_em.c Sat Jul 6 22:34:42 2013 (r252899) @@ -94,7 +94,7 @@ int em_display_debug_stats = 0; /* * Driver version: */ -char em_driver_version[] = "7.3.7"; +char em_driver_version[] = "7.3.8"; /* * PCI Device ID Table @@ -2141,12 +2141,37 @@ em_set_promisc(struct adapter *adapter) static void em_disable_promisc(struct adapter *adapter) { - u32 reg_rctl; + struct ifnet*ifp = adapter->ifp; + u32 reg_rctl; + int mcnt = 0; reg_rctl = E1000_READ_REG(&adapter->hw, E1000_RCTL); - reg_rctl &= (~E1000_RCTL_UPE); - reg_rctl &= (~E1000_RCTL_MPE); + if (ifp->if_flags & IFF_ALLMULTI) + mcnt = MAX_NUM_MULTICAST_ADDRESSES; + else { + struct ifmultiaddr *ifma; +#if __FreeBSD_version < 80 + IF_ADDR_LOCK(ifp); +#else + if_maddr_rlock(ifp); +#endif + TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { + if (ifma->ifma_addr->sa_family != AF_LINK) + continue; + if (mcnt == MAX_NUM_MULTICAST_ADDRESSES) + break; + mcnt++; + } +#if __FreeBSD_version < 80 + IF_ADDR_UNLOCK(ifp); +#else + if_maddr_runlock(ifp); +#endif + } + /* Don't disable if in MAX groups */ + if (mcnt < MAX_NUM_MULTICAST_ADDRESSES) + reg_rctl &= (~E1000_RCTL_MPE); reg_rctl &= (~E1000_RCTL_SBP); E1000_WRITE_REG(&adapter->hw, E1000_RCTL, reg_rctl); } @@ -4295,11 +4320,12 @@ em_initialize_receive_unit(struct adapte E1000_WRITE_REG(hw, E1000_RFCTL, E1000_RFCTL_ACK_DIS); } - if (ifp->if_capenable & IFCAP_RXCSUM) { - rxcsum = E1000_READ_REG(hw, E1000_RXCSUM); - rxcsum |= (E1000_RXCSUM_IPOFL | E1000_RXCSUM_TUOFL); - E1000_WRITE_REG(hw, E1000_RXCSUM, rxcsum); - } + rxcsum = E1000_READ_REG(hw, E1000_RXCSUM); + if (ifp->if_capenable & IFCAP_RXCSUM) + rxcsum |= E1000_RXCSUM_TUOFL; + else + rxcsum &= ~E1000_RXCSUM_TUOFL; + E1000_WRITE_REG(hw, E1000_RXCSUM, rxcsum); /* ** XXX TEMPORARY WORKAROUND: on some systems with 82573 @@ -4603,31 +4629,23 @@ em_fixup_rx(struct rx_ring *rxr) static void em_receive_checksum(struct e1000_rx_desc *rx_desc, struct mbuf *mp) { + mp->m_pkthdr.csum_flags = 0; + /* Ignore Checksum bit is set */ - if (rx_desc->status & E1000_RXD_STAT_IXSM) { - mp->m_pkthdr.csum_flags = 0; + if (rx_desc->status & E1000_RXD_STAT_IXSM) return; - } - - if (rx_desc->status & E1000_RXD_STAT_IPCS) { - /* Did it pass? */ - if (!(rx_desc->errors & E1000_RXD_ERR_IPE)) { - /* IP Checksum Good */ - mp->m_pkthdr.csum_flags = CSUM_IP_CHECKED; - mp->m_pkthdr.csum_flags |= CSUM_IP_VALID; - } else { - mp->m_pkthdr.csum_flags = 0; - } - } + if (rx_desc->errors & (E1000_RXD_ERR_TCPE | E1000_RXD_ERR_IPE)) + return; - if (rx_desc->status & E1000_RXD_STAT_TCPCS) { - /* Did it pass? */ - if (!(rx_desc->errors & E1000_RXD_ERR_TCPE)) { - mp->m_pkthdr.csum_flags |= - (CSUM_DATA_VALID | CSUM_PSEUD
svn commit: r252898 - in stable/9/sys: conf dev/ixgbe modules/ixgbe
Author: jfv Date: Sat Jul 6 21:38:55 2013 New Revision: 252898 URL: http://svnweb.freebsd.org/changeset/base/252898 Log: MFC ixgbe driver revisions 248901, 250108, and 251964 Added: stable/9/sys/dev/ixgbe/ixgbe_dcb.c - copied unchanged from r251964, head/sys/dev/ixgbe/ixgbe_dcb.c stable/9/sys/dev/ixgbe/ixgbe_dcb.h - copied unchanged from r251964, head/sys/dev/ixgbe/ixgbe_dcb.h stable/9/sys/dev/ixgbe/ixgbe_dcb_82598.c - copied unchanged from r251964, head/sys/dev/ixgbe/ixgbe_dcb_82598.c stable/9/sys/dev/ixgbe/ixgbe_dcb_82598.h - copied unchanged from r251964, head/sys/dev/ixgbe/ixgbe_dcb_82598.h stable/9/sys/dev/ixgbe/ixgbe_dcb_82599.c - copied unchanged from r251964, head/sys/dev/ixgbe/ixgbe_dcb_82599.c stable/9/sys/dev/ixgbe/ixgbe_dcb_82599.h - copied unchanged from r251964, head/sys/dev/ixgbe/ixgbe_dcb_82599.h Modified: stable/9/sys/conf/files stable/9/sys/dev/ixgbe/README stable/9/sys/dev/ixgbe/ixgbe.c stable/9/sys/dev/ixgbe/ixgbe.h stable/9/sys/dev/ixgbe/ixgbe_82598.c stable/9/sys/dev/ixgbe/ixgbe_82599.c stable/9/sys/dev/ixgbe/ixgbe_api.c stable/9/sys/dev/ixgbe/ixgbe_api.h stable/9/sys/dev/ixgbe/ixgbe_common.c stable/9/sys/dev/ixgbe/ixgbe_common.h stable/9/sys/dev/ixgbe/ixgbe_osdep.h stable/9/sys/dev/ixgbe/ixgbe_phy.c stable/9/sys/dev/ixgbe/ixgbe_phy.h stable/9/sys/dev/ixgbe/ixgbe_type.h stable/9/sys/dev/ixgbe/ixgbe_vf.c stable/9/sys/dev/ixgbe/ixgbe_x540.c stable/9/sys/dev/ixgbe/ixgbe_x540.h stable/9/sys/modules/ixgbe/Makefile Directory Properties: stable/9/sys/conf/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) stable/9/sys/modules/ixgbe/ (props changed) Modified: stable/9/sys/conf/files == --- stable/9/sys/conf/files Sat Jul 6 20:39:44 2013(r252897) +++ stable/9/sys/conf/files Sat Jul 6 21:38:55 2013(r252898) @@ -1463,6 +1463,12 @@ dev/ixgbe/ixgbe_82599.c optional ixgbe compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_x540.c optional ixgbe inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" +dev/ixgbe/ixgbe_dcb.c optional ixgbe inet \ + compile-with "${NORMAL_C} -I$S/dev/ixgbe" +dev/ixgbe/ixgbe_dcb_82598.coptional ixgbe inet \ + compile-with "${NORMAL_C} -I$S/dev/ixgbe" +dev/ixgbe/ixgbe_dcb_82599.coptional ixgbe inet \ + compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/jme/if_jme.c optional jme pci dev/joy/joy.c optional joy dev/joy/joy_isa.c optional joy isa Modified: stable/9/sys/dev/ixgbe/README == --- stable/9/sys/dev/ixgbe/README Sat Jul 6 20:39:44 2013 (r252897) +++ stable/9/sys/dev/ixgbe/README Sat Jul 6 21:38:55 2013 (r252898) @@ -2,7 +2,7 @@ FreeBSD Driver for Intel(R) Ethernet 10 /*$FreeBSD$*/ -November 12, 2010 +Jun 18, 2013 Contents @@ -18,8 +18,8 @@ Contents Overview -This file describes the FreeBSD* driver for the Intel(R) Ethernet 10 Gigabit -Family of Adapters. Driver has been developed for use with FreeBSD 7.2 or later. +This file describes the FreeBSD* driver for the +Intel(R) Ethernet 10 Gigabit Family of Adapters. For questions related to hardware requirements, refer to the documentation supplied with your Intel 10GbE adapter. All hardware requirements listed @@ -42,7 +42,7 @@ optics, or is an Intel(R) Ethernet Serve Intel optics and/or the direct attach cables listed below. When 82599-based SFP+ devices are connected back to back, they should be set to -the same Speed setting via Ethtool. Results may vary if you mix speed settings. +the same Speed setting. Results may vary if you mix speed settings. SupplierType Part Numbers @@ -70,7 +70,12 @@ Finisar DUAL RATE 1G/10G SFP+ LR (No Avago DUAL RATE 1G/10G SFP+ LR (No Bail)AFCT-701SDZ-IN1 Finistar 1000BASE-T SFPFCLF8522P2BTL Avago 1000BASE-T SFPABCU-5710RZ - + +NOTE: As of driver version 2.5.13 it is possible to allow the operation +of unsupported modules by setting the static variable 'allow_unsupported_sfp' +to TRUE and rebuilding the driver. If problems occur please assure that they +can be reproduced with fully supported optics first. + 82599-based adapters support all passive and active limiting direct attach cables that comply with SFF-8431 v4.1 and SFF-8472 v10.4 specifications. @@ -224,14 +229,7 @@ all 10 Gigabit adapters. When there is a choice run on a 64bit OS rather than 32, it makes a significant difference in improvement. - The default scheduler SCHED_4BSD is not smart about SMP localit
svn commit: r251964 - in head/sys: conf dev/ixgbe modules/ixgbe
Author: jfv Date: Tue Jun 18 21:28:19 2013 New Revision: 251964 URL: http://svnweb.freebsd.org/changeset/base/251964 Log: Add quad port probe support, this gives the admin proper information about the slot (which should be a PCIE Gen 3 slot for this adapter) by looking back thru the PCI parent devices to the slot device. The fix above also corrects the bandwidth display to GT/s rather than the incorrect Gb/s Next, allow the use of ALTQ if you select the compile option IXGBE_LEGACY_TX. Allow the use of 'unsupported' optic modules by a compile option as well. Add a phy reset capability into the stop code, this is so a static configured driver will still behave properly when taken down (not being able to unload it). This revision synchronizes the shared code with Intel internal current code, and note that it now includes DCB supporting code, this was necessitated by some internal changes with the code, but it also will provide the opportunity to develop this feature in the core driver down the road. I have edited the README to get rid of some of the worse anachronisms in it as well, its by no means as robust as I might wish at this point however. Oh, I also have included some conditional stuff in the code so it will be compatible in both the 9.X and 10 environments. Performance has been a focus in recent changes and I believe this revision driver will perform very well in most workloads. MFC after: 2 weeks Added: head/sys/dev/ixgbe/ixgbe_dcb.c (contents, props changed) head/sys/dev/ixgbe/ixgbe_dcb.h (contents, props changed) head/sys/dev/ixgbe/ixgbe_dcb_82598.c (contents, props changed) head/sys/dev/ixgbe/ixgbe_dcb_82598.h (contents, props changed) head/sys/dev/ixgbe/ixgbe_dcb_82599.c (contents, props changed) head/sys/dev/ixgbe/ixgbe_dcb_82599.h (contents, props changed) Modified: head/sys/conf/files head/sys/dev/ixgbe/README head/sys/dev/ixgbe/ixgbe.c head/sys/dev/ixgbe/ixgbe.h head/sys/dev/ixgbe/ixgbe_82598.c head/sys/dev/ixgbe/ixgbe_82599.c head/sys/dev/ixgbe/ixgbe_api.c head/sys/dev/ixgbe/ixgbe_api.h head/sys/dev/ixgbe/ixgbe_common.c head/sys/dev/ixgbe/ixgbe_common.h head/sys/dev/ixgbe/ixgbe_osdep.h head/sys/dev/ixgbe/ixgbe_phy.c head/sys/dev/ixgbe/ixgbe_phy.h head/sys/dev/ixgbe/ixgbe_type.h head/sys/dev/ixgbe/ixgbe_vf.c head/sys/dev/ixgbe/ixgbe_x540.c head/sys/dev/ixgbe/ixgbe_x540.h head/sys/modules/ixgbe/Makefile Modified: head/sys/conf/files == --- head/sys/conf/files Tue Jun 18 21:24:07 2013(r251963) +++ head/sys/conf/files Tue Jun 18 21:28:19 2013(r251964) @@ -1685,6 +1685,12 @@ dev/ixgbe/ixgbe_82599.c optional ixgbe compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_x540.c optional ixgbe inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" +dev/ixgbe/ixgbe_dcb.c optional ixgbe inet \ + compile-with "${NORMAL_C} -I$S/dev/ixgbe" +dev/ixgbe/ixgbe_dcb_82598.coptional ixgbe inet \ + compile-with "${NORMAL_C} -I$S/dev/ixgbe" +dev/ixgbe/ixgbe_dcb_82599.coptional ixgbe inet \ + compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/jme/if_jme.c optional jme pci dev/joy/joy.c optional joy dev/joy/joy_isa.c optional joy isa Modified: head/sys/dev/ixgbe/README == --- head/sys/dev/ixgbe/README Tue Jun 18 21:24:07 2013(r251963) +++ head/sys/dev/ixgbe/README Tue Jun 18 21:28:19 2013(r251964) @@ -2,7 +2,7 @@ FreeBSD Driver for Intel(R) Ethernet 10 /*$FreeBSD$*/ -November 12, 2010 +Jun 18, 2013 Contents @@ -18,8 +18,8 @@ Contents Overview -This file describes the FreeBSD* driver for the Intel(R) Ethernet 10 Gigabit -Family of Adapters. Driver has been developed for use with FreeBSD 7.2 or later. +This file describes the FreeBSD* driver for the +Intel(R) Ethernet 10 Gigabit Family of Adapters. For questions related to hardware requirements, refer to the documentation supplied with your Intel 10GbE adapter. All hardware requirements listed @@ -42,7 +42,7 @@ optics, or is an Intel(R) Ethernet Serve Intel optics and/or the direct attach cables listed below. When 82599-based SFP+ devices are connected back to back, they should be set to -the same Speed setting via Ethtool. Results may vary if you mix speed settings. +the same Speed setting. Results may vary if you mix speed settings. SupplierType Part Numbers @@ -70,7 +70,12 @@ Finisar DUAL RATE 1G/10G SFP+ LR (No Avago DUAL RATE 1G/10G SFP+ LR (No Bail)AFCT-701SDZ-IN1 Finistar 1000BASE-T SFPFCLF8522P2BTL Avag
svn commit: r249509 - head/sys/dev/e1000
Author: jfv Date: Mon Apr 15 17:01:42 2013 New Revision: 249509 URL: http://svnweb.freebsd.org/changeset/base/249509 Log: Corrections to the RX checksum code, make sure its disabled as well as enabled when necessary. And simplify the checksum routine itself, adding UDP bit to the test. Thanks to Kevin Lo for pointing out the problems and code suggestions. Modified: head/sys/dev/e1000/if_em.c Modified: head/sys/dev/e1000/if_em.c == --- head/sys/dev/e1000/if_em.c Mon Apr 15 16:09:24 2013(r249508) +++ head/sys/dev/e1000/if_em.c Mon Apr 15 17:01:42 2013(r249509) @@ -4322,11 +4322,12 @@ em_initialize_receive_unit(struct adapte E1000_WRITE_REG(hw, E1000_RFCTL, E1000_RFCTL_ACK_DIS); } - if (ifp->if_capenable & IFCAP_RXCSUM) { - rxcsum = E1000_READ_REG(hw, E1000_RXCSUM); - rxcsum |= (E1000_RXCSUM_IPOFL | E1000_RXCSUM_TUOFL); - E1000_WRITE_REG(hw, E1000_RXCSUM, rxcsum); - } + rxcsum = E1000_READ_REG(hw, E1000_RXCSUM); + if (ifp->if_capenable & IFCAP_RXCSUM) + rxcsum |= E1000_RXCSUM_TUOFL; + else + rxcsum &= ~E1000_RXCSUM_TUOFL; + E1000_WRITE_REG(hw, E1000_RXCSUM, rxcsum); /* ** XXX TEMPORARY WORKAROUND: on some systems with 82573 @@ -4644,31 +4645,23 @@ em_fixup_rx(struct rx_ring *rxr) static void em_receive_checksum(struct e1000_rx_desc *rx_desc, struct mbuf *mp) { + mp->m_pkthdr.csum_flags = 0; + /* Ignore Checksum bit is set */ - if (rx_desc->status & E1000_RXD_STAT_IXSM) { - mp->m_pkthdr.csum_flags = 0; + if (rx_desc->status & E1000_RXD_STAT_IXSM) return; - } - - if (rx_desc->status & E1000_RXD_STAT_IPCS) { - /* Did it pass? */ - if (!(rx_desc->errors & E1000_RXD_ERR_IPE)) { - /* IP Checksum Good */ - mp->m_pkthdr.csum_flags = CSUM_IP_CHECKED; - mp->m_pkthdr.csum_flags |= CSUM_IP_VALID; - } else { - mp->m_pkthdr.csum_flags = 0; - } - } + if (rx_desc->errors & (E1000_RXD_ERR_TCPE | E1000_RXD_ERR_IPE)) + return; - if (rx_desc->status & E1000_RXD_STAT_TCPCS) { - /* Did it pass? */ - if (!(rx_desc->errors & E1000_RXD_ERR_TCPE)) { - mp->m_pkthdr.csum_flags |= - (CSUM_DATA_VALID | CSUM_PSEUDO_HDR); - mp->m_pkthdr.csum_data = htons(0x); - } + /* IP Checksum Good? */ + if (rx_desc->status & E1000_RXD_STAT_IPCS) + mp->m_pkthdr.csum_flags = (CSUM_IP_CHECKED | CSUM_IP_VALID); + + /* TCP or UDP checksum */ + if (rx_desc->status & (E1000_RXD_STAT_TCPCS | E1000_RXD_STAT_UDPCS)) { + mp->m_pkthdr.csum_flags |= (CSUM_DATA_VALID | CSUM_PSEUDO_HDR); + mp->m_pkthdr.csum_data = htons(0x); } } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r249339 - head/sys/dev/e1000
Author: jfv Date: Wed Apr 10 17:51:39 2013 New Revision: 249339 URL: http://svnweb.freebsd.org/changeset/base/249339 Log: Simplify allocate_legacy code, txr pointer was breaking LEGACY compile, thanks to Nick Rogers for pointing this out. Modified: head/sys/dev/e1000/if_igb.c Modified: head/sys/dev/e1000/if_igb.c == --- head/sys/dev/e1000/if_igb.c Wed Apr 10 17:51:15 2013(r249338) +++ head/sys/dev/e1000/if_igb.c Wed Apr 10 17:51:39 2013(r249339) @@ -2474,7 +2474,6 @@ igb_allocate_legacy(struct adapter *adap { device_tdev = adapter->dev; struct igb_queue*que = adapter->queues; - struct tx_ring *txr = adapter->tx_rings; int error, rid = 0; /* Turn off all interrupts */ @@ -2494,7 +2493,7 @@ igb_allocate_legacy(struct adapter *adap } #ifndef IGB_LEGACY_TX - TASK_INIT(&txr->txq_task, 0, igb_deferred_mq_start, txr); + TASK_INIT(&que->txr->txq_task, 0, igb_deferred_mq_start, que->txr); #endif /* ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r249074 - head/sys/dev/e1000
Author: jfv Date: Wed Apr 3 23:39:54 2013 New Revision: 249074 URL: http://svnweb.freebsd.org/changeset/base/249074 Log: Correct the multicast handling in the E1000 drivers as was done in ixgbe, thanks to Mike Karels for this fix. When exiting promiscuous mode MPE bit was being unconditionally cleared, this should not be done if we are in MAX multicast groups. Modified: head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_igb.c head/sys/dev/e1000/if_lem.c Modified: head/sys/dev/e1000/if_em.c == --- head/sys/dev/e1000/if_em.c Wed Apr 3 23:11:15 2013(r249073) +++ head/sys/dev/e1000/if_em.c Wed Apr 3 23:39:54 2013(r249074) @@ -94,7 +94,7 @@ int em_display_debug_stats = 0; /* * Driver version: */ -char em_driver_version[] = "7.3.7"; +char em_driver_version[] = "7.3.8"; /* * PCI Device ID Table @@ -2133,12 +2133,37 @@ em_set_promisc(struct adapter *adapter) static void em_disable_promisc(struct adapter *adapter) { - u32 reg_rctl; + struct ifnet*ifp = adapter->ifp; + u32 reg_rctl; + int mcnt = 0; reg_rctl = E1000_READ_REG(&adapter->hw, E1000_RCTL); - reg_rctl &= (~E1000_RCTL_UPE); - reg_rctl &= (~E1000_RCTL_MPE); + if (ifp->if_flags & IFF_ALLMULTI) + mcnt = MAX_NUM_MULTICAST_ADDRESSES; + else { + struct ifmultiaddr *ifma; +#if __FreeBSD_version < 80 + IF_ADDR_LOCK(ifp); +#else + if_maddr_rlock(ifp); +#endif + TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { + if (ifma->ifma_addr->sa_family != AF_LINK) + continue; + if (mcnt == MAX_NUM_MULTICAST_ADDRESSES) + break; + mcnt++; + } +#if __FreeBSD_version < 80 + IF_ADDR_UNLOCK(ifp); +#else + if_maddr_runlock(ifp); +#endif + } + /* Don't disable if in MAX groups */ + if (mcnt < MAX_NUM_MULTICAST_ADDRESSES) + reg_rctl &= (~E1000_RCTL_MPE); reg_rctl &= (~E1000_RCTL_SBP); E1000_WRITE_REG(&adapter->hw, E1000_RCTL, reg_rctl); } Modified: head/sys/dev/e1000/if_igb.c == --- head/sys/dev/e1000/if_igb.c Wed Apr 3 23:11:15 2013(r249073) +++ head/sys/dev/e1000/if_igb.c Wed Apr 3 23:39:54 2013(r249074) @@ -100,7 +100,7 @@ int igb_display_debug_stats = 0; /* * Driver version: */ -char igb_driver_version[] = "version - 2.3.9"; +char igb_driver_version[] = "version - 2.3.10"; /* @@ -374,9 +374,9 @@ SYSCTL_INT(_hw_igb, OID_AUTO, header_spl "Enable receive mbuf header split"); /* -** This will autoconfigure based on -** the number of CPUs and max supported MSI-X messages -** if left at 0. +** This will autoconfigure based on the +** number of CPUs and max supported +** MSIX messages if left at 0. */ static int igb_num_queues = 0; TUNABLE_INT("hw.igb.num_queues", &igb_num_queues); @@ -2096,7 +2096,9 @@ static void igb_disable_promisc(struct adapter *adapter) { struct e1000_hw *hw = &adapter->hw; + struct ifnet*ifp = adapter->ifp; u32 reg; + int mcnt = 0; if (adapter->vf_ifp) { e1000_promisc_set_vf(hw, e1000_promisc_disabled); @@ -2104,7 +2106,31 @@ igb_disable_promisc(struct adapter *adap } reg = E1000_READ_REG(hw, E1000_RCTL); reg &= (~E1000_RCTL_UPE); - reg &= (~E1000_RCTL_MPE); + if (ifp->if_flags & IFF_ALLMULTI) + mcnt = MAX_NUM_MULTICAST_ADDRESSES; + else { + struct ifmultiaddr *ifma; +#if __FreeBSD_version < 80 + IF_ADDR_LOCK(ifp); +#else + if_maddr_rlock(ifp); +#endif + TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { + if (ifma->ifma_addr->sa_family != AF_LINK) + continue; + if (mcnt == MAX_NUM_MULTICAST_ADDRESSES) + break; + mcnt++; + } +#if __FreeBSD_version < 80 + IF_ADDR_UNLOCK(ifp); +#else + if_maddr_runlock(ifp); +#endif + } + /* Don't disable if in MAX groups */ + if (mcnt < MAX_NUM_MULTICAST_ADDRESSES) + reg &= (~E1000_RCTL_MPE);
svn commit: r248908 - head/sys/dev/e1000
Author: jfv Date: Fri Mar 29 18:46:13 2013 New Revision: 248908 URL: http://svnweb.freebsd.org/changeset/base/248908 Log: Change the define in the header to eliminate unnecessary data when using LEGACY TX. Modified: head/sys/dev/e1000/if_igb.h Modified: head/sys/dev/e1000/if_igb.h == --- head/sys/dev/e1000/if_igb.h Fri Mar 29 18:43:10 2013(r248907) +++ head/sys/dev/e1000/if_igb.h Fri Mar 29 18:46:13 2013(r248908) @@ -297,7 +297,7 @@ struct tx_ring { u32 next_to_clean; volatile u16tx_avail; struct igb_tx_buffer*tx_buffers; -#if __FreeBSD_version >= 80 +#ifndef IGB_LEGACY_TX struct buf_ring *br; struct task txq_task; #endif ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r248906 - in head/sys: dev/e1000 modules/igb
Author: jfv Date: Fri Mar 29 18:25:45 2013 New Revision: 248906 URL: http://svnweb.freebsd.org/changeset/base/248906 Log: Change defines in the igb driver to allow an easier selection of the older if_start/non-multiqueue interface from the stack. This is not the default, but can be turned on in the Makefile now regardless of the OS level to allow either testing or use of ALTQ. MFC after: one week Modified: head/sys/dev/e1000/if_igb.c head/sys/modules/igb/Makefile Modified: head/sys/dev/e1000/if_igb.c == --- head/sys/dev/e1000/if_igb.c Fri Mar 29 18:22:15 2013(r248905) +++ head/sys/dev/e1000/if_igb.c Fri Mar 29 18:25:45 2013(r248906) @@ -42,7 +42,7 @@ #include #include -#if __FreeBSD_version >= 80 +#ifndef IGB_LEGACY_TX #include #endif #include @@ -179,7 +179,7 @@ static int igb_detach(device_t); static int igb_shutdown(device_t); static int igb_suspend(device_t); static int igb_resume(device_t); -#if __FreeBSD_version >= 80 +#ifndef IGB_LEGACY_TX static int igb_mq_start(struct ifnet *, struct mbuf *); static int igb_mq_start_locked(struct ifnet *, struct tx_ring *); static voidigb_qflush(struct ifnet *); @@ -850,7 +850,7 @@ igb_resume(device_t dev) (ifp->if_drv_flags & IFF_DRV_RUNNING) && adapter->link_active) { for (int i = 0; i < adapter->num_queues; i++, txr++) { IGB_TX_LOCK(txr); -#if __FreeBSD_version >= 80 +#ifndef IGB_LEGACY_TX /* Process the stack queue only if not depleted */ if (((txr->queue_status & IGB_QUEUE_DEPLETED) == 0) && !drbr_empty(ifp, txr->br)) @@ -868,7 +868,7 @@ igb_resume(device_t dev) } -#if __FreeBSD_version < 80 +#ifdef IGB_LEGACY_TX /* * Transmit entry point @@ -946,7 +946,7 @@ igb_start(struct ifnet *ifp) return; } -#else /* __FreeBSD_version >= 80 */ +#else /* ~IGB_LEGACY_TX */ /* ** Multiqueue Transmit Entry: @@ -1061,7 +1061,7 @@ igb_qflush(struct ifnet *ifp) } if_qflush(ifp); } -#endif /* __FreeBSD_version >= 80 */ +#endif /* ~IGB_LEGACY_TX */ /* * Ioctl entry point @@ -1387,7 +1387,7 @@ igb_handle_que(void *context, int pendin IGB_TX_LOCK(txr); igb_txeof(txr); -#if __FreeBSD_version >= 80 +#ifndef IGB_LEGACY_TX /* Process the stack queue only if not depleted */ if (((txr->queue_status & IGB_QUEUE_DEPLETED) == 0) && !drbr_empty(ifp, txr->br)) @@ -1438,7 +1438,7 @@ igb_handle_link_locked(struct adapter *a if ((ifp->if_drv_flags & IFF_DRV_RUNNING) && adapter->link_active) { for (int i = 0; i < adapter->num_queues; i++, txr++) { IGB_TX_LOCK(txr); -#if __FreeBSD_version >= 80 +#ifndef IGB_LEGACY_TX /* Process the stack queue only if not depleted */ if (((txr->queue_status & IGB_QUEUE_DEPLETED) == 0) && !drbr_empty(ifp, txr->br)) @@ -1540,7 +1540,7 @@ igb_poll(struct ifnet *ifp, enum poll_cm do { more = igb_txeof(txr); } while (loop-- && more); -#if __FreeBSD_version >= 80 +#ifndef IGB_LEGACY_TX if (!drbr_empty(ifp, txr->br)) igb_mq_start_locked(ifp, txr); #else @@ -1575,7 +1575,7 @@ igb_msix_que(void *arg) IGB_TX_LOCK(txr); igb_txeof(txr); -#if __FreeBSD_version >= 80 +#ifndef IGB_LEGACY_TX /* Process the stack queue only if not depleted */ if (((txr->queue_status & IGB_QUEUE_DEPLETED) == 0) && !drbr_empty(ifp, txr->br)) @@ -2466,7 +2466,7 @@ igb_allocate_legacy(struct adapter *adap return (ENXIO); } -#if __FreeBSD_version >= 80 +#ifndef IGB_LEGACY_TX TASK_INIT(&txr->txq_task, 0, igb_deferred_mq_start, txr); #endif @@ -2550,7 +2550,7 @@ igb_allocate_msix(struct adapter *adapte i,igb_last_bind_cpu); igb_last_bind_cpu = CPU_NEXT(igb_last_bind_cpu); } -#if __FreeBSD_version >= 80 +#ifndef IGB_LEGACY_TX TASK_INIT(&que->txr->txq_task, 0, igb_deferred_mq_start, que->txr); #endif @@ -2776,7 +2776,7 @@ igb_free_pci_resources(struct adapter *a for (int i = 0; i < adapter->num_queues; i++, que++) { if (que->tq != NULL) { -#if __FreeBSD_version >= 80 +#ifndef IGB_LEGACY_TX taskqueue_drain(que->tq, &que->txr->txq_task); #endif taskqueue_drain(que->tq, &que->que_task); @@ -3086,7 +3086,7 @@ igb_setup_interface(device_t
svn commit: r248901 - head/sys/dev/ixgbe
Author: jfv Date: Fri Mar 29 18:03:00 2013 New Revision: 248901 URL: http://svnweb.freebsd.org/changeset/base/248901 Log: Two small fixes: Set promiscuous code was unconditionally turning off multicast when turning off promiscuous mode, this should only be done when there are less than MAX groups. Thanks to Mike Karels for this correction. Second, the overtmp interrupt setup/detection was wrong, correcting it. MFC after:one week Modified: head/sys/dev/ixgbe/ixgbe.c Modified: head/sys/dev/ixgbe/ixgbe.c == --- head/sys/dev/ixgbe/ixgbe.c Fri Mar 29 18:00:07 2013(r248900) +++ head/sys/dev/ixgbe/ixgbe.c Fri Mar 29 18:03:00 2013(r248901) @@ -47,7 +47,7 @@ int ixgbe_display_debug_stat /* * Driver version */ -char ixgbe_driver_version[] = "2.5.7 - HEAD"; +char ixgbe_driver_version[] = "2.5.8 - HEAD"; /* * PCI Device ID Table @@ -1639,11 +1639,11 @@ ixgbe_msix_link(void *arg) /* Check for over temp condition */ if ((hw->mac.type == ixgbe_mac_X540) && - (reg_eicr & IXGBE_EICR_GPI_SDP0)) { + (reg_eicr & IXGBE_EICR_TS)) { device_printf(adapter->dev, "\nCRITICAL: OVER TEMP!! " "PHY IS SHUT DOWN!!\n"); device_printf(adapter->dev, "System shutdown required\n"); - IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_GPI_SDP0); + IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_TS); } IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMS, IXGBE_EIMS_OTHER); @@ -1892,10 +1892,34 @@ ixgbe_set_promisc(struct adapter *adapte { u_int32_t reg_rctl; struct ifnet *ifp = adapter->ifp; + int mcnt = 0; reg_rctl = IXGBE_READ_REG(&adapter->hw, IXGBE_FCTRL); reg_rctl &= (~IXGBE_FCTRL_UPE); - reg_rctl &= (~IXGBE_FCTRL_MPE); + if (ifp->if_flags & IFF_ALLMULTI) + mcnt = MAX_NUM_MULTICAST_ADDRESSES; + else { + struct ifmultiaddr *ifma; +#if __FreeBSD_version < 80 + IF_ADDR_LOCK(ifp); +#else + if_maddr_rlock(ifp); +#endif + TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { + if (ifma->ifma_addr->sa_family != AF_LINK) + continue; + if (mcnt == MAX_NUM_MULTICAST_ADDRESSES) + break; + mcnt++; + } +#if __FreeBSD_version < 80 + IF_ADDR_UNLOCK(ifp); +#else + if_maddr_runlock(ifp); +#endif + } + if (mcnt < MAX_NUM_MULTICAST_ADDRESSES) + reg_rctl &= (~IXGBE_FCTRL_MPE); IXGBE_WRITE_REG(&adapter->hw, IXGBE_FCTRL, reg_rctl); if (ifp->if_flags & IFF_PROMISC) { @@ -4734,11 +4758,11 @@ ixgbe_setup_vlan_hw_support(struct adapt static void ixgbe_enable_intr(struct adapter *adapter) { - struct ixgbe_hw *hw = &adapter->hw; - struct ix_queue *que = adapter->queues; - u32 mask = (IXGBE_EIMS_ENABLE_MASK & ~IXGBE_EIMS_RTX_QUEUE); - + struct ixgbe_hw *hw = &adapter->hw; + struct ix_queue *que = adapter->queues; + u32 mask, fwsm; + mask = (IXGBE_EIMS_ENABLE_MASK & ~IXGBE_EIMS_RTX_QUEUE); /* Enable Fan Failure detection */ if (hw->device_id == IXGBE_DEV_ID_82598AT) mask |= IXGBE_EIMS_GPI_SDP1; @@ -4755,6 +4779,10 @@ ixgbe_enable_intr(struct adapter *adapte break; case ixgbe_mac_X540: mask |= IXGBE_EIMS_ECC; + /* Detect if Thermal Sensor is enabled */ + fwsm = IXGBE_READ_REG(hw, IXGBE_FWSM); + if (fwsm & IXGBE_FWSM_TS_ENABLED) + mask |= IXGBE_EIMS_TS; #ifdef IXGBE_FDIR mask |= IXGBE_EIMS_FLOW_DIR; #endif ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r248292 - stable/9/sys/dev/e1000
Author: jfv Date: Thu Mar 14 22:55:59 2013 New Revision: 248292 URL: http://svnweb.freebsd.org/changeset/base/248292 Log: MFC of the E1000 drivers including revisions: r238765 | luigi | 2012-07-25 04:28:15 -0700 (Wed, 25 Jul 2012) | 7 lines Use legacy interrupts as a default. This gives up to 10% speedup when used in qemu (and this driver is for non-PCIe cards, so probably its largest use is in virtualized environments). r238770 | luigi | 2012-07-25 05:51:33 -0700 (Wed, 25 Jul 2012) | 4 lines remove some extra testing code that slipped into the previous commit r238953 | jfv | 2012-07-31 11:44:10 -0700 (Tue, 31 Jul 2012) | 6 lines Clean up some unused leftover code from em Make IRQ style a tuneable Fix lock handling in the interrupt handler r238981 | sbruno | 2012-08-01 17:00:34 -0700 (Wed, 01 Aug 2012) | 9 lines CPU_NEXT() already handles wrapping around to the beginning. Also, in a system with sparse CPU IDs, you can have a valid CPU ID > mp_ncpus (e.g. if you have two CPUs 0 and 4, with mp_maxid == 4 and mp_ncpus == 2). r239105 | jfv | 2012-08-06 13:44:05 -0700 (Mon, 06 Aug 2012) | 5 lines Correct the mq_start routine to avoid out-of-order packet delivery, always enqueue when possible. Also correct the DEPLETED test as multiple bits might be set. Thanks to Randall Stewart for the changes! r239109 | jfv | 2012-08-06 15:43:49 -0700 (Mon, 06 Aug 2012) | 6 lines Make the polling interface in igb able to handle multiqueue, and correct the rxdone handling. Update the polling man page to include igb as well. r239304 | jfv | 2012-08-15 10:12:40 -0700 (Wed, 15 Aug 2012) | 10 lines Customer report of a panic on boot due to the old "m_getjcl:invalid cluster type" that occurred some time back with the igb driver. This happens often when booting over the net. I believe the NIC hardware is left in a warm state when handed over to the driver, and a stray RX interrupt happens earlier than the code is prepared for it to happen. This change was verified to fix the problem, its kind of a bandaid... but it is similar to what was done in the igb code. r240693 | gavin | 2012-09-19 05:27:23 -0700 (Wed, 19 Sep 2012) | 5 lines Switch some PCI register reads from using magic numbers to using the names defined in pcireg.h r241856 | eadler | 2012-10-21 20:41:14 -0700 (Sun, 21 Oct 2012) | 7 lines Now that device disabling is generic, remove extraneous code from the device drivers that used to provide this feature. r241885 | eadler | 2012-10-22 06:06:09 -0700 (Mon, 22 Oct 2012) | 7 lines This isn't functionally identical. In some cases a hint to disable unit 0 would in fact disable all units. This reverts r241856 r243570 | glebius | 2012-11-26 12:03:57 -0800 (Mon, 26 Nov 2012) | 14 lines drbr_enqueue() awlays consumes mbuf, no matter did it fail or not. The mbuf pointer is no longer valid, so can't be reused after. Fix igb_mq_start() where mbuf pointer was used after drbr_enqueue(). This eventually leads us to all invocations of igb_mq_start_locked() called with third argument as NULL. This allows us to simplify this function. r245334 | smh | 2013-01-12 08:05:55 -0800 (Sat, 12 Jan 2013) | 9 lines Fixed mbuf free when receive structures fail to allocate. This prevents quad igb card on high core machines, without any nmbcluster or igb queue tuning wedging the boot process if all nics are configured. r246128 | sbz | 2013-01-30 10:01:20 -0800 (Wed, 30 Jan 2013) | 5 lines Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on device_method_t arrays r246482 | rrs | 2013-02-07 07:20:54 -0800 (Thu, 07 Feb 2013) | 30 lines This fixes a out-of-order problem with several of the newer drivers. The basic problem was that the driver was pulling the mbuf off the drbr ring and then when sending with xmit(), encounting a full transmit ring. Thus the lower layer
svn commit: r248287 - in stable/9/sys: dev/ixgbe net sys
Author: jfv Date: Thu Mar 14 21:39:39 2013 New Revision: 248287 URL: http://svnweb.freebsd.org/changeset/base/248287 Log: MFC of the ixgbe driver including the follow revisions: 235547,235964,241616,241646,241856,241885,242403, 242421,243714,243716,243718,243721,243724,243725, 243728,243729,243733,243735,243736,243741,243833, 244514,246128,246482,247035,247056,247822,247823 Note: 246482 includes only the changes in the ixgbe driver and the buf_ring supporting code in if_var.h and buf_ring.h igb and em will be seperate commits, and non-Intel drivers can commit the changes at will. Reviewed by:rss, jhb Modified: stable/9/sys/dev/ixgbe/LICENSE stable/9/sys/dev/ixgbe/ixgbe.c (contents, props changed) stable/9/sys/dev/ixgbe/ixgbe.h stable/9/sys/dev/ixgbe/ixgbe_82598.c stable/9/sys/dev/ixgbe/ixgbe_82599.c stable/9/sys/dev/ixgbe/ixgbe_82599.h stable/9/sys/dev/ixgbe/ixgbe_api.c stable/9/sys/dev/ixgbe/ixgbe_api.h stable/9/sys/dev/ixgbe/ixgbe_common.c stable/9/sys/dev/ixgbe/ixgbe_common.h stable/9/sys/dev/ixgbe/ixgbe_mbx.h stable/9/sys/dev/ixgbe/ixgbe_osdep.h stable/9/sys/dev/ixgbe/ixgbe_phy.c stable/9/sys/dev/ixgbe/ixgbe_phy.h stable/9/sys/dev/ixgbe/ixgbe_type.h stable/9/sys/dev/ixgbe/ixgbe_vf.c stable/9/sys/dev/ixgbe/ixgbe_vf.h stable/9/sys/dev/ixgbe/ixgbe_x540.c stable/9/sys/dev/ixgbe/ixgbe_x540.h stable/9/sys/dev/ixgbe/ixv.c stable/9/sys/net/if_var.h stable/9/sys/sys/buf_ring.h Directory Properties: stable/9/sys/dev/ixgbe/ (props changed) stable/9/sys/net/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/9/sys/dev/ixgbe/LICENSE == --- stable/9/sys/dev/ixgbe/LICENSE Thu Mar 14 21:21:14 2013 (r248286) +++ stable/9/sys/dev/ixgbe/LICENSE Thu Mar 14 21:39:39 2013 (r248287) @@ -1,6 +1,6 @@ /** - Copyright (c) 2001-2011, Intel Corporation + Copyright (c) 2001-2013, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without Modified: stable/9/sys/dev/ixgbe/ixgbe.c == --- stable/9/sys/dev/ixgbe/ixgbe.c Thu Mar 14 21:21:14 2013 (r248286) +++ stable/9/sys/dev/ixgbe/ixgbe.c Thu Mar 14 21:39:39 2013 (r248287) @@ -1,6 +1,6 @@ /** - Copyright (c) 2001-2012, Intel Corporation + Copyright (c) 2001-2013, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -47,7 +47,7 @@ int ixgbe_display_debug_stat /* * Driver version */ -char ixgbe_driver_version[] = "2.4.8"; +char ixgbe_driver_version[] = "2.5.7 - STABLE/9"; /* * PCI Device ID Table @@ -83,7 +83,7 @@ static ixgbe_vendor_info_t ixgbe_vendor_ {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP_SF2, 0, 0, 0}, {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP_FCOE, 0, 0, 0}, {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599EN_SFP, 0, 0, 0}, - {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X540T1, 0, 0, 0}, + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP_SF_QP, 0, 0, 0}, {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X540T, 0, 0, 0}, /* required last entry */ {0, 0, 0, 0, 0} @@ -104,16 +104,16 @@ static int ixgbe_probe(device_t); static int ixgbe_attach(device_t); static int ixgbe_detach(device_t); static int ixgbe_shutdown(device_t); -#if __FreeBSD_version >= 80 +#ifdef IXGBE_LEGACY_TX +static void ixgbe_start(struct ifnet *); +static void ixgbe_start_locked(struct tx_ring *, struct ifnet *); +#else /* ! IXGBE_LEGACY_TX */ static int ixgbe_mq_start(struct ifnet *, struct mbuf *); static int ixgbe_mq_start_locked(struct ifnet *, struct tx_ring *, struct mbuf *); static voidixgbe_qflush(struct ifnet *); static voidixgbe_deferred_mq_start(void *, int); -#else -static void ixgbe_start(struct ifnet *); -static void ixgbe_start_locked(struct tx_ring *, struct ifnet *); -#endif +#endif /* IXGBE_LEGACY_TX */ static int ixgbe_ioctl(struct ifnet *, u_long, caddr_t); static voidixgbe_init(void *); static voidixgbe_init_locked(struct adapter *); @@ -150,7 +150,7 @@ static void ixgbe_enable_intr(struct static void ixgbe_disable_intr(struct adapter *); static void ixgbe_update_stats_counters(struct adapter *); static boolixgbe_txeof(struct tx_ring *); -static boolixgbe_rxeof(struct ix_queue *, int); +static bool
svn commit: r247823 - head/sys/dev/ixgbe
Author: jfv Date: Mon Mar 4 23:15:07 2013 New Revision: 247823 URL: http://svnweb.freebsd.org/changeset/base/247823 Log: Fix a small, but important bug, a task drain was mistakenly being compiled only when setting LEGACY_TX, this means you would not get the drain when needed on detach!! Thanks to Bryan Venteicher (bry...@freebsd.org) for catching this little gremlin!! :) Modified: head/sys/dev/ixgbe/ixgbe.c Modified: head/sys/dev/ixgbe/ixgbe.c == --- head/sys/dev/ixgbe/ixgbe.c Mon Mar 4 23:07:40 2013(r247822) +++ head/sys/dev/ixgbe/ixgbe.c Mon Mar 4 23:15:07 2013(r247823) @@ -654,7 +654,7 @@ ixgbe_detach(device_t dev) for (int i = 0; i < adapter->num_queues; i++, que++, txr++) { if (que->tq) { -#ifdef IXGBE_LEGACY_TX +#ifndef IXGBE_LEGACY_TX taskqueue_drain(que->tq, &txr->txq_task); #endif taskqueue_drain(que->tq, &que->que_task); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r247822 - head/sys/dev/ixgbe
Author: jfv Date: Mon Mar 4 23:07:40 2013 New Revision: 247822 URL: http://svnweb.freebsd.org/changeset/base/247822 Log: First, sync to internal shared code, and then Fixes: - flow control - don't override user value on re-init - fix to make 1G optics work correctly - change to interrupt enabling - some bits were incorrect for certain hardware. - certain stats fixes, remove a duplicate increment of ierror, thanks to Scott Long for pointing these out. - shared code link interface changed, requiring some core code changes to accomodate this. - add an m_adj() to ETHER_ALIGN on the recieve side, this was requested by Mike Karels, thanks Mike. - Multicast code corrections also thanks to Mike Karels. Modified: head/sys/dev/ixgbe/LICENSE head/sys/dev/ixgbe/ixgbe.c head/sys/dev/ixgbe/ixgbe_82598.c head/sys/dev/ixgbe/ixgbe_82599.c head/sys/dev/ixgbe/ixgbe_82599.h head/sys/dev/ixgbe/ixgbe_api.c head/sys/dev/ixgbe/ixgbe_api.h head/sys/dev/ixgbe/ixgbe_common.c head/sys/dev/ixgbe/ixgbe_common.h head/sys/dev/ixgbe/ixgbe_mbx.h head/sys/dev/ixgbe/ixgbe_osdep.h head/sys/dev/ixgbe/ixgbe_phy.c head/sys/dev/ixgbe/ixgbe_phy.h head/sys/dev/ixgbe/ixgbe_type.h head/sys/dev/ixgbe/ixgbe_vf.c head/sys/dev/ixgbe/ixgbe_vf.h head/sys/dev/ixgbe/ixgbe_x540.c head/sys/dev/ixgbe/ixgbe_x540.h head/sys/dev/ixgbe/ixv.c Modified: head/sys/dev/ixgbe/LICENSE == --- head/sys/dev/ixgbe/LICENSE Mon Mar 4 22:41:49 2013(r247821) +++ head/sys/dev/ixgbe/LICENSE Mon Mar 4 23:07:40 2013(r247822) @@ -1,6 +1,6 @@ /** - Copyright (c) 2001-2011, Intel Corporation + Copyright (c) 2001-2013, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without Modified: head/sys/dev/ixgbe/ixgbe.c == --- head/sys/dev/ixgbe/ixgbe.c Mon Mar 4 22:41:49 2013(r247821) +++ head/sys/dev/ixgbe/ixgbe.c Mon Mar 4 23:07:40 2013(r247822) @@ -1,6 +1,6 @@ /** - Copyright (c) 2001-2012, Intel Corporation + Copyright (c) 2001-2013, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -47,7 +47,7 @@ int ixgbe_display_debug_stat /* * Driver version */ -char ixgbe_driver_version[] = "2.5.0"; +char ixgbe_driver_version[] = "2.5.7 - HEAD"; /* * PCI Device ID Table @@ -83,7 +83,7 @@ static ixgbe_vendor_info_t ixgbe_vendor_ {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP_SF2, 0, 0, 0}, {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP_FCOE, 0, 0, 0}, {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599EN_SFP, 0, 0, 0}, - {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X540T1, 0, 0, 0}, + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP_SF_QP, 0, 0, 0}, {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X540T, 0, 0, 0}, /* required last entry */ {0, 0, 0, 0, 0} @@ -216,7 +216,6 @@ static device_method_t ixgbe_methods[] = DEVMETHOD(device_attach, ixgbe_attach), DEVMETHOD(device_detach, ixgbe_detach), DEVMETHOD(device_shutdown, ixgbe_shutdown), - DEVMETHOD_END }; @@ -596,6 +595,9 @@ ixgbe_attach(device_t dev) "PCIE, or x4 PCIE 2 slot is required.\n"); } + /* Set an initial default flow control value */ + adapter->fc = ixgbe_fc_full; + /* let hardware know driver is loaded */ ctrl_ext = IXGBE_READ_REG(hw, IXGBE_CTRL_EXT); ctrl_ext |= IXGBE_CTRL_EXT_DRV_LOAD; @@ -1310,7 +1312,7 @@ ixgbe_init_locked(struct adapter *adapte tmp = IXGBE_LOW_DV(frame); hw->fc.low_water[0] = IXGBE_BT2KB(tmp); - adapter->fc = hw->fc.requested_mode = ixgbe_fc_full; + hw->fc.requested_mode = adapter->fc; hw->fc.pause_time = IXGBE_FC_PAUSE; hw->fc.send_xon = TRUE; } @@ -1680,7 +1682,7 @@ ixgbe_media_status(struct ifnet * ifp, s ifmr->ifm_active |= IFM_100_TX | IFM_FDX; break; case IXGBE_LINK_SPEED_1GB_FULL: - ifmr->ifm_active |= adapter->optics | IFM_FDX; + ifmr->ifm_active |= IFM_1000_SX | IFM_FDX; break; case IXGBE_LINK_SPEED_10GB_FULL: ifmr->ifm_active |= adapter->optics
svn commit: r247505 - head/sys/modules/ixgbe
Author: jfv Date: Thu Feb 28 22:48:00 2013 New Revision: 247505 URL: http://svnweb.freebsd.org/changeset/base/247505 Log: Change the ixgbe module name to if_ixgbe to conform to the usual naming convention. Modified: head/sys/modules/ixgbe/Makefile Modified: head/sys/modules/ixgbe/Makefile == --- head/sys/modules/ixgbe/Makefile Thu Feb 28 22:31:26 2013 (r247504) +++ head/sys/modules/ixgbe/Makefile Thu Feb 28 22:48:00 2013 (r247505) @@ -4,7 +4,7 @@ .PATH: ${.CURDIR}/../../dev/ixgbe -KMOD= ixgbe +KMOD= if_ixgbe SRCS= device_if.h bus_if.h pci_if.h SRCS += opt_inet.h opt_inet6.h SRCS+= ixgbe.c ixv.c ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r247501 - stable/8/sys/dev/ixgbe
Author: jfv Date: Thu Feb 28 21:55:57 2013 New Revision: 247501 URL: http://svnweb.freebsd.org/changeset/base/247501 Log: MFC of the ixgbe driver including revisions: 217556,219902,228276,229767,229939,230572,231796,232238, 234137,234229,235547,235964,236627,236729,238149,239940, 240155,240366,240968,241037,241616,241646,241856,241885, 242403,242421,243714,243716,243718,243721,243724,243725, 243728,243729,243733,243735,243736,243741,243833,243857, 244514,245952,246128,246482,247035,247056 Modified: stable/8/sys/dev/ixgbe/ixgbe.c (contents, props changed) stable/8/sys/dev/ixgbe/ixgbe.h stable/8/sys/dev/ixgbe/ixgbe_82598.c stable/8/sys/dev/ixgbe/ixgbe_82598.h (contents, props changed) stable/8/sys/dev/ixgbe/ixgbe_82599.c stable/8/sys/dev/ixgbe/ixgbe_api.c stable/8/sys/dev/ixgbe/ixgbe_api.h stable/8/sys/dev/ixgbe/ixgbe_common.c stable/8/sys/dev/ixgbe/ixgbe_common.h stable/8/sys/dev/ixgbe/ixgbe_osdep.h stable/8/sys/dev/ixgbe/ixgbe_phy.c stable/8/sys/dev/ixgbe/ixgbe_type.h stable/8/sys/dev/ixgbe/ixgbe_vf.c stable/8/sys/dev/ixgbe/ixgbe_x540.c (contents, props changed) stable/8/sys/dev/ixgbe/ixv.c Directory Properties: stable/8/sys/dev/ixgbe/ (props changed) stable/8/sys/dev/ixgbe/ixgbe_82599.h (props changed) stable/8/sys/dev/ixgbe/ixgbe_x540.h (props changed) Modified: stable/8/sys/dev/ixgbe/ixgbe.c == --- stable/8/sys/dev/ixgbe/ixgbe.c Thu Feb 28 21:32:47 2013 (r247500) +++ stable/8/sys/dev/ixgbe/ixgbe.c Thu Feb 28 21:55:57 2013 (r247501) @@ -1,6 +1,6 @@ /** - Copyright (c) 2001-2012, Intel Corporation + Copyright (c) 2001-2013, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -47,7 +47,7 @@ int ixgbe_display_debug_stat /* * Driver version */ -char ixgbe_driver_version[] = "2.4.5"; +char ixgbe_driver_version[] = "2.5.0 - 8"; /* * PCI Device ID Table @@ -80,8 +80,10 @@ static ixgbe_vendor_info_t ixgbe_vendor_ {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_T3_LOM, 0, 0, 0}, {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_COMBO_BACKPLANE, 0, 0, 0}, {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_BACKPLANE_FCOE, 0, 0, 0}, + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP_SF2, 0, 0, 0}, {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP_FCOE, 0, 0, 0}, {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599EN_SFP, 0, 0, 0}, + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X540T1, 0, 0, 0}, {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X540T, 0, 0, 0}, /* required last entry */ {0, 0, 0, 0, 0} @@ -102,16 +104,16 @@ static int ixgbe_probe(device_t); static int ixgbe_attach(device_t); static int ixgbe_detach(device_t); static int ixgbe_shutdown(device_t); -#if __FreeBSD_version >= 80 +#ifdef IXGBE_LEGACY_TX +static void ixgbe_start(struct ifnet *); +static void ixgbe_start_locked(struct tx_ring *, struct ifnet *); +#else /* ! IXGBE_LEGACY_TX */ static int ixgbe_mq_start(struct ifnet *, struct mbuf *); static int ixgbe_mq_start_locked(struct ifnet *, struct tx_ring *, struct mbuf *); static voidixgbe_qflush(struct ifnet *); static voidixgbe_deferred_mq_start(void *, int); -#else -static void ixgbe_start(struct ifnet *); -static void ixgbe_start_locked(struct tx_ring *, struct ifnet *); -#endif +#endif /* IXGBE_LEGACY_TX */ static int ixgbe_ioctl(struct ifnet *, u_long, caddr_t); static voidixgbe_init(void *); static voidixgbe_init_locked(struct adapter *); @@ -148,7 +150,7 @@ static void ixgbe_enable_intr(struct static void ixgbe_disable_intr(struct adapter *); static void ixgbe_update_stats_counters(struct adapter *); static boolixgbe_txeof(struct tx_ring *); -static boolixgbe_rxeof(struct ix_queue *, int); +static boolixgbe_rxeof(struct ix_queue *); static voidixgbe_rx_checksum(u32, struct mbuf *, u32); static void ixgbe_set_promisc(struct adapter *); static void ixgbe_set_multi(struct adapter *); @@ -161,10 +163,10 @@ static intixgbe_set_thermal_test(SYSCTL static int ixgbe_dma_malloc(struct adapter *, bus_size_t, struct ixgbe_dma_alloc *, int); static void ixgbe_dma_free(struct adapter *, struct ixgbe_dma_alloc *); -static voidixgbe_add_rx_process_limit(struct adapter *, const char *, - const char *, int *, int); -static boolixgbe_tx_ctx_setup(struct tx_ring *, struct mbuf *); -static boolixgbe_tso_setup(struct tx_ring *, struct mbuf *, u32 *)
svn commit: r247451 - stable/8/sys/conf
Author: jfv Date: Thu Feb 28 08:19:55 2013 New Revision: 247451 URL: http://svnweb.freebsd.org/changeset/base/247451 Log: Remove DEV_NETMAP from stable/8 options, this was suggested and approved by the owner, although there is code in some drivers in support of it, the feature itself is not fully supported in this release. Modified: stable/8/sys/conf/options Modified: stable/8/sys/conf/options == --- stable/8/sys/conf/options Thu Feb 28 08:11:36 2013(r247450) +++ stable/8/sys/conf/options Thu Feb 28 08:19:55 2013(r247451) @@ -682,7 +682,6 @@ ISAPNP opt_isa.h # various 'device presence' options. DEV_BPFopt_bpf.h -DEV_NETMAP opt_global.h DEV_MCAopt_mca.h DEV_CARP opt_carp.h DEV_PTYopt_tty.h ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r247430 - in stable/8/sys: conf dev/e1000 modules/em modules/igb
Author: jfv Date: Thu Feb 28 00:22:04 2013 New Revision: 247430 URL: http://svnweb.freebsd.org/changeset/base/247430 Log: MFC of the E1000 drivers to STABLE/8, this includes the follow revisions plus a few tweaks: 196969,196970,211516,214646,215781,215789,215808,215910,223350, 223482,223831,228281,228393,229939,231796,232238,234665,235256, 236406,238148,238151,238214,238765,238770,238953,238981,239105, 239109,239304,240518,240693,240968,241037,241856,241885,243570, 243857,245334,246128,246482,247064 Added: stable/8/sys/dev/e1000/e1000_i210.c - copied, changed from r238148, head/sys/dev/e1000/e1000_i210.c stable/8/sys/dev/e1000/e1000_i210.h - copied, changed from r238148, head/sys/dev/e1000/e1000_i210.h Modified: stable/8/sys/conf/files stable/8/sys/dev/e1000/e1000_82541.c stable/8/sys/dev/e1000/e1000_82543.c stable/8/sys/dev/e1000/e1000_82571.c stable/8/sys/dev/e1000/e1000_82575.c stable/8/sys/dev/e1000/e1000_82575.h stable/8/sys/dev/e1000/e1000_api.c stable/8/sys/dev/e1000/e1000_api.h stable/8/sys/dev/e1000/e1000_defines.h stable/8/sys/dev/e1000/e1000_hw.h stable/8/sys/dev/e1000/e1000_ich8lan.c stable/8/sys/dev/e1000/e1000_ich8lan.h stable/8/sys/dev/e1000/e1000_mac.c stable/8/sys/dev/e1000/e1000_mac.h stable/8/sys/dev/e1000/e1000_manage.c stable/8/sys/dev/e1000/e1000_manage.h stable/8/sys/dev/e1000/e1000_nvm.c stable/8/sys/dev/e1000/e1000_nvm.h stable/8/sys/dev/e1000/e1000_osdep.h stable/8/sys/dev/e1000/e1000_phy.c stable/8/sys/dev/e1000/e1000_phy.h stable/8/sys/dev/e1000/e1000_regs.h stable/8/sys/dev/e1000/if_em.c (contents, props changed) stable/8/sys/dev/e1000/if_igb.c (contents, props changed) stable/8/sys/dev/e1000/if_igb.h stable/8/sys/dev/e1000/if_lem.c stable/8/sys/modules/em/Makefile stable/8/sys/modules/igb/Makefile Directory Properties: stable/8/sys/dev/e1000/ (props changed) Modified: stable/8/sys/conf/files == --- stable/8/sys/conf/files Thu Feb 28 00:18:56 2013(r247429) +++ stable/8/sys/conf/files Thu Feb 28 00:22:04 2013(r247430) @@ -920,6 +920,8 @@ dev/e1000/e1000_82575.c optional em | i compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_ich8lan.c optional em | igb \ compile-with "${NORMAL_C} -I$S/dev/e1000" +dev/e1000/e1000_i210.c optional em | igb \ + compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_api.c optional em | igb \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_mac.c optional em | igb \ Modified: stable/8/sys/dev/e1000/e1000_82541.c == --- stable/8/sys/dev/e1000/e1000_82541.cThu Feb 28 00:18:56 2013 (r247429) +++ stable/8/sys/dev/e1000/e1000_82541.cThu Feb 28 00:22:04 2013 (r247430) @@ -642,7 +642,7 @@ static s32 e1000_check_for_link_82541(st * of MAC speed/duplex configuration. So we only need to * configure Collision Distance in the MAC. */ - e1000_config_collision_dist_generic(hw); + mac->ops.config_collision_dist(hw); /* * Configure Flow Control now that Auto-Neg has completed. Modified: stable/8/sys/dev/e1000/e1000_82543.c == --- stable/8/sys/dev/e1000/e1000_82543.cThu Feb 28 00:18:56 2013 (r247429) +++ stable/8/sys/dev/e1000/e1000_82543.cThu Feb 28 00:22:04 2013 (r247430) @@ -1126,7 +1126,7 @@ static s32 e1000_setup_copper_link_82543 DEBUGOUT("Valid link established!!!\n"); /* Config the MAC and PHY after link is up */ if (hw->mac.type == e1000_82544) { - e1000_config_collision_dist_generic(hw); + hw->mac.ops.config_collision_dist(hw); } else { ret_val = e1000_config_mac_to_phy_82543(hw); if (ret_val) @@ -1160,7 +1160,7 @@ static s32 e1000_setup_fiber_link_82543( /* Take the link out of reset */ ctrl &= ~E1000_CTRL_LRST; - e1000_config_collision_dist_generic(hw); + hw->mac.ops.config_collision_dist(hw); ret_val = e1000_commit_fc_settings_generic(hw); if (ret_val) @@ -1259,7 +1259,7 @@ static s32 e1000_check_for_copper_link_8 * settings. */ if (mac->type == e1000_82544) - e1000_config_collision_dist_generic(hw); + hw->mac.ops.config_collision_dist(hw); else { ret_val = e1000_config_mac_to_phy_82543(hw); if (ret_val) { @@ -1433,7 +1433,7 @@ static s32 e1000_config_mac_to_phy_82543 if (phy_data & M88E1000_PSSR_DPLX) ctrl |= E1000_CTRL_FD; - e1000_config_collision_dist_generic(hw); +
svn commit: r247064 - head/sys/dev/e1000
Author: jfv Date: Thu Feb 21 00:25:45 2013 New Revision: 247064 URL: http://svnweb.freebsd.org/changeset/base/247064 Log: Refresh on the shared code for the E1000 drivers. - bear with me, there are lots of white space changes, I would not do them, but I am a mere consumer of this stuff and if these drivers are to stay in shape they need to be taken. em driver changes: support for the new i217/i218 interfaces igb driver changes: - TX mq start has a quick turnaround to the stack - Link/media handling improvement - When link status changes happen the current flow control state will now be displayed. - A few white space/style changes. lem driver changes: - the shared code uncovered a bogus write to the RLPML register (which does not exist in this hardware) in the vlan code,this is removed. Modified: head/sys/dev/e1000/e1000_82571.c head/sys/dev/e1000/e1000_82575.c head/sys/dev/e1000/e1000_82575.h head/sys/dev/e1000/e1000_api.c head/sys/dev/e1000/e1000_api.h head/sys/dev/e1000/e1000_defines.h head/sys/dev/e1000/e1000_hw.h head/sys/dev/e1000/e1000_i210.c head/sys/dev/e1000/e1000_i210.h head/sys/dev/e1000/e1000_ich8lan.c head/sys/dev/e1000/e1000_ich8lan.h head/sys/dev/e1000/e1000_mac.c head/sys/dev/e1000/e1000_mac.h head/sys/dev/e1000/e1000_manage.c head/sys/dev/e1000/e1000_nvm.c head/sys/dev/e1000/e1000_nvm.h head/sys/dev/e1000/e1000_osdep.h head/sys/dev/e1000/e1000_phy.c head/sys/dev/e1000/e1000_phy.h head/sys/dev/e1000/e1000_regs.h head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_igb.c head/sys/dev/e1000/if_lem.c Modified: head/sys/dev/e1000/e1000_82571.c == --- head/sys/dev/e1000/e1000_82571.cWed Feb 20 23:26:14 2013 (r247063) +++ head/sys/dev/e1000/e1000_82571.cThu Feb 21 00:25:45 2013 (r247064) @@ -1,6 +1,6 @@ /** - Copyright (c) 2001-2011, Intel Corporation + Copyright (c) 2001-2013, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -32,8 +32,7 @@ **/ /*$FreeBSD$*/ -/* - * 82571EB Gigabit Ethernet Controller +/* 82571EB Gigabit Ethernet Controller * 82571EB Gigabit Ethernet Controller (Copper) * 82571EB Gigabit Ethernet Controller (Fiber) * 82571EB Dual Port Gigabit Mezzanine Adapter @@ -51,9 +50,6 @@ #include "e1000_api.h" -static s32 e1000_init_phy_params_82571(struct e1000_hw *hw); -static s32 e1000_init_nvm_params_82571(struct e1000_hw *hw); -static s32 e1000_init_mac_params_82571(struct e1000_hw *hw); static s32 e1000_acquire_nvm_82571(struct e1000_hw *hw); static void e1000_release_nvm_82571(struct e1000_hw *hw); static s32 e1000_write_nvm_82571(struct e1000_hw *hw, u16 offset, @@ -78,7 +74,6 @@ static s32 e1000_get_hw_semaphore_82571 static s32 e1000_fix_nvm_checksum_82571(struct e1000_hw *hw); static s32 e1000_get_phy_id_82571(struct e1000_hw *hw); static void e1000_put_hw_semaphore_82571(struct e1000_hw *hw); -static s32 e1000_get_hw_semaphore_82573(struct e1000_hw *hw); static void e1000_put_hw_semaphore_82573(struct e1000_hw *hw); static s32 e1000_get_hw_semaphore_82574(struct e1000_hw *hw); static void e1000_put_hw_semaphore_82574(struct e1000_hw *hw); @@ -99,13 +94,13 @@ static void e1000_power_down_phy_copper_ static s32 e1000_init_phy_params_82571(struct e1000_hw *hw) { struct e1000_phy_info *phy = &hw->phy; - s32 ret_val = E1000_SUCCESS; + s32 ret_val; DEBUGFUNC("e1000_init_phy_params_82571"); if (hw->phy.media_type != e1000_media_type_copper) { phy->type = e1000_phy_none; - goto out; + return E1000_SUCCESS; } phy->addr = 1; @@ -165,8 +160,7 @@ static s32 e1000_init_phy_params_82571(s phy->ops.set_d3_lplu_state = e1000_set_d3_lplu_state_82574; break; default: - ret_val = -E1000_ERR_PHY; - goto out; + return -E1000_ERR_PHY; break; } @@ -174,7 +168,7 @@ static s32 e1000_init_phy_params_82571(s ret_val = e1000_get_phy_id_82571(hw); if (ret_val) { DEBUGOUT("Error getting PHY ID\n"); - goto out; + return ret_val; } /* Verify phy id */ @@ -201,7 +195,6 @@ static s32 e1000_init_phy_params_82571(s if (ret_val) DEBUGOUT1("PHY ID unknown: type = 0x%08x\n", phy->id); -out: return ret_val; } @@ -241,8 +234,7 @@ static s32 e1000_init_nvm_params_82571(s if (((eecd >> 15) & 0x3) == 0x3) { nvm->type = e1000_nvm_flash_hw; nvm->w
svn commit: r244983 - in head/sys/dev: ahci ata ata/chipsets
Author: jfv Date: Wed Jan 2 22:26:46 2013 New Revision: 244983 URL: http://svnweb.freebsd.org/changeset/base/244983 Log: Add Intel Lynx Point PCH SATA Controller Device IDs Modified: head/sys/dev/ahci/ahci.c head/sys/dev/ata/ata-pci.h head/sys/dev/ata/chipsets/ata-intel.c Modified: head/sys/dev/ahci/ahci.c == --- head/sys/dev/ahci/ahci.cWed Jan 2 22:14:18 2013(r244982) +++ head/sys/dev/ahci/ahci.cWed Jan 2 22:26:46 2013(r244983) @@ -179,6 +179,14 @@ static struct { {0x1e078086, 0x00, "Intel Panther Point", 0}, {0x1e0e8086, 0x00, "Intel Panther Point", 0}, {0x1e0f8086, 0x00, "Intel Panther Point", 0}, + {0x8c028086, 0x00, "Intel Lynx Point", 0}, + {0x8c038086, 0x00, "Intel Lynx Point", 0}, + {0x8c048086, 0x00, "Intel Lynx Point", 0}, + {0x8c058086, 0x00, "Intel Lynx Point", 0}, + {0x8c068086, 0x00, "Intel Lynx Point", 0}, + {0x8c078086, 0x00, "Intel Lynx Point", 0}, + {0x8c0e8086, 0x00, "Intel Lynx Point", 0}, + {0x8c0f8086, 0x00, "Intel Lynx Point", 0}, {0x23238086, 0x00, "Intel DH89xxCC",0}, {0x2360197b, 0x00, "JMicron JMB360",0}, {0x2361197b, 0x00, "JMicron JMB361",AHCI_Q_NOFORCE}, Modified: head/sys/dev/ata/ata-pci.h == --- head/sys/dev/ata/ata-pci.h Wed Jan 2 22:14:18 2013(r244982) +++ head/sys/dev/ata/ata-pci.h Wed Jan 2 22:26:46 2013(r244983) @@ -260,6 +260,19 @@ struct ata_pci_controller { #define ATA_PPT_R5 0x1e0e8086 #define ATA_PPT_R6 0x1e0f8086 +#define ATA_LPT_S1 0x8c008086 +#define ATA_LPT_S2 0x8c018086 +#define ATA_LPT_AH10x8c028086 +#define ATA_LPT_AH20x8c038086 +#define ATA_LPT_R1 0x8c048086 +#define ATA_LPT_R2 0x8c058086 +#define ATA_LPT_R3 0x8c068086 +#define ATA_LPT_R4 0x8c078086 +#define ATA_LPT_S3 0x8c088086 +#define ATA_LPT_S4 0x8c098086 +#define ATA_LPT_R5 0x8c0e8086 +#define ATA_LPT_R6 0x8c0f8086 + #define ATA_I31244 0x32008086 #define ATA_ISCH0x811a8086 #define ATA_DH89XXCC0x23238086 Modified: head/sys/dev/ata/chipsets/ata-intel.c == --- head/sys/dev/ata/chipsets/ata-intel.c Wed Jan 2 22:14:18 2013 (r244982) +++ head/sys/dev/ata/chipsets/ata-intel.c Wed Jan 2 22:26:46 2013 (r244983) @@ -211,6 +211,18 @@ ata_intel_probe(device_t dev) { ATA_PPT_S4, 0, INTEL_6CH2, 0, ATA_SA300, "Panther Point" }, { ATA_PPT_R5, 0, INTEL_AHCI, 0, ATA_SA300, "Panther Point" }, { ATA_PPT_R6, 0, INTEL_AHCI, 0, ATA_SA300, "Panther Point" }, + { ATA_LPT_S1, 0, INTEL_6CH, 0, ATA_SA300, "Lynx Point" }, + { ATA_LPT_S2, 0, INTEL_6CH, 0, ATA_SA300, "Lynx Point" }, + { ATA_LPT_AH1, 0, INTEL_AHCI, 0, ATA_SA300, "Lynx Point" }, + { ATA_LPT_AH2, 0, INTEL_AHCI, 0, ATA_SA300, "Lynx Point" }, + { ATA_LPT_R1, 0, INTEL_AHCI, 0, ATA_SA300, "Lynx Point" }, + { ATA_LPT_R2, 0, INTEL_AHCI, 0, ATA_SA300, "Lynx Point" }, + { ATA_LPT_R3, 0, INTEL_AHCI, 0, ATA_SA300, "Lynx Point" }, + { ATA_LPT_R4, 0, INTEL_AHCI, 0, ATA_SA300, "Lynx Point" }, + { ATA_LPT_S3, 0, INTEL_6CH2, 0, ATA_SA300, "Lynx Point" }, + { ATA_LPT_S4, 0, INTEL_6CH2, 0, ATA_SA300, "Lynx Point" }, + { ATA_LPT_R5, 0, INTEL_AHCI, 0, ATA_SA300, "Lynx Point" }, + { ATA_LPT_R6, 0, INTEL_AHCI, 0, ATA_SA300, "Lynx Point" }, { ATA_I31244, 0, 0, 2, ATA_SA150, "31244" }, { ATA_ISCH, 0, 0, 1, ATA_UDMA5, "SCH" }, { ATA_DH89XXCC, 0, INTEL_AHCI, 0, ATA_SA300, "DH89xxCC" }, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r244981 - head/sys/dev/ichsmb
Author: jfv Date: Wed Jan 2 22:01:26 2013 New Revision: 244981 URL: http://svnweb.freebsd.org/changeset/base/244981 Log: Add Intel Lynx Point PCH SMBus Device IDs Modified: head/sys/dev/ichsmb/ichsmb_pci.c Modified: head/sys/dev/ichsmb/ichsmb_pci.c == --- head/sys/dev/ichsmb/ichsmb_pci.cWed Jan 2 21:56:58 2013 (r244980) +++ head/sys/dev/ichsmb/ichsmb_pci.cWed Jan 2 22:01:26 2013 (r244981) @@ -85,6 +85,7 @@ __FBSDID("$FreeBSD$"); #define ID_PATSBURG0x1d228086 #define ID_CPT 0x1c228086 #define ID_PPT 0x1e228086 +#define ID_LPT 0x8c228086 #define PCIS_SERIALBUS_SMBUS_PROGIF0x00 @@ -188,6 +189,9 @@ ichsmb_pci_probe(device_t dev) case ID_PPT: device_set_desc(dev, "Intel Panther Point SMBus controller"); break; + case ID_LPT: + device_set_desc(dev, "Intel Lynx Point SMBus controller"); + break; default: return (ENXIO); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r244980 - head/sys/dev/sound/pci/hda
Author: jfv Date: Wed Jan 2 21:56:58 2013 New Revision: 244980 URL: http://svnweb.freebsd.org/changeset/base/244980 Log: Add Intel Lynx Point PCH HD Audio Device IDs Modified: head/sys/dev/sound/pci/hda/hdac.c head/sys/dev/sound/pci/hda/hdac.h Modified: head/sys/dev/sound/pci/hda/hdac.c == --- head/sys/dev/sound/pci/hda/hdac.c Wed Jan 2 21:54:37 2013 (r244979) +++ head/sys/dev/sound/pci/hda/hdac.c Wed Jan 2 21:56:58 2013 (r244980) @@ -81,6 +81,8 @@ static const struct { { HDA_INTEL_CPT, "Intel Cougar Point", 0, 0 }, { HDA_INTEL_PATSBURG,"Intel Patsburg", 0, 0 }, { HDA_INTEL_PPT1,"Intel Panther Point", 0, 0 }, + { HDA_INTEL_LPT1,"Intel Lynx Point",0, 0 }, + { HDA_INTEL_LPT2,"Intel Lynx Point",0, 0 }, { HDA_INTEL_82801F, "Intel 82801F",0, 0 }, { HDA_INTEL_63XXESB, "Intel 631x/632xESB", 0, 0 }, { HDA_INTEL_82801G, "Intel 82801G",0, 0 }, Modified: head/sys/dev/sound/pci/hda/hdac.h == --- head/sys/dev/sound/pci/hda/hdac.h Wed Jan 2 21:54:37 2013 (r244979) +++ head/sys/dev/sound/pci/hda/hdac.h Wed Jan 2 21:56:58 2013 (r244980) @@ -54,6 +54,8 @@ #define HDA_INTEL_PCH HDA_MODEL_CONSTRUCT(INTEL, 0x3b56) #define HDA_INTEL_PCH2 HDA_MODEL_CONSTRUCT(INTEL, 0x3b57) #define HDA_INTEL_SCH HDA_MODEL_CONSTRUCT(INTEL, 0x811b) +#define HDA_INTEL_LPT1 HDA_MODEL_CONSTRUCT(INTEL, 0x8c20) +#define HDA_INTEL_LPT2 HDA_MODEL_CONSTRUCT(INTEL, 0x8c21) #define HDA_INTEL_ALL HDA_MODEL_CONSTRUCT(INTEL, 0x) /* Nvidia */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r244977 - head/sys/dev/ichwd
Author: jfv Date: Wed Jan 2 21:45:20 2013 New Revision: 244977 URL: http://svnweb.freebsd.org/changeset/base/244977 Log: Add support for new Intel Lynx Point PCH - Watchdog Timer Device IDs Modified: head/sys/dev/ichwd/ichwd.c head/sys/dev/ichwd/ichwd.h Modified: head/sys/dev/ichwd/ichwd.c == --- head/sys/dev/ichwd/ichwd.c Wed Jan 2 21:27:32 2013(r244976) +++ head/sys/dev/ichwd/ichwd.c Wed Jan 2 21:45:20 2013(r244977) @@ -191,6 +191,9 @@ static struct ichwd_device ichwd_devices { DEVICEID_PPT29,"Intel Panther Point watchdog timer", 10 }, { DEVICEID_PPT30,"Intel Panther Point watchdog timer", 10 }, { DEVICEID_PPT31,"Intel Panther Point watchdog timer", 10 }, + { DEVICEID_LPT0, "Intel Lynx Point watchdog timer", 10 }, + { DEVICEID_LPT1, "Intel Lynx Point watchdog timer", 10 }, + { DEVICEID_LPT2, "Intel Lynx Point watchdog timer", 10 }, { DEVICEID_DH89XXCC_LPC, "Intel DH89xxCC watchdog timer", 10 }, { 0, NULL, 0 }, }; Modified: head/sys/dev/ichwd/ichwd.h == --- head/sys/dev/ichwd/ichwd.h Wed Jan 2 21:27:32 2013(r244976) +++ head/sys/dev/ichwd/ichwd.h Wed Jan 2 21:45:20 2013(r244977) @@ -177,6 +177,38 @@ struct ichwd_softc { #define DEVICEID_3400 0x3b12 #define DEVICEID_3420 0x3b14 #define DEVICEID_3450 0x3b16 +#define DEVICEID_LPT0 0x8c40 +#define DEVICEID_LPT1 0x8c41 +#define DEVICEID_LPT2 0x8c42 +#define DEVICEID_LPT3 0x8c43 +#define DEVICEID_LPT4 0x8c44 +#define DEVICEID_LPT5 0x8c45 +#define DEVICEID_LPT6 0x8c46 +#define DEVICEID_LPT7 0x8c47 +#define DEVICEID_LPT8 0x8c48 +#define DEVICEID_LPT9 0x8c49 +#define DEVICEID_LPT10 0x8c4a +#define DEVICEID_LPT11 0x8c4b +#define DEVICEID_LPT12 0x8c4c +#define DEVICEID_LPT13 0x8c4d +#define DEVICEID_LPT14 0x8c4e +#define DEVICEID_LPT15 0x8c4f +#define DEVICEID_LPT16 0x8c50 +#define DEVICEID_LPT17 0x8c51 +#define DEVICEID_LPT18 0x8c52 +#define DEVICEID_LPT19 0x8c53 +#define DEVICEID_LPT20 0x8c54 +#define DEVICEID_LPT21 0x8c55 +#define DEVICEID_LPT22 0x8c56 +#define DEVICEID_LPT23 0x8c57 +#define DEVICEID_LPT24 0x8c58 +#define DEVICEID_LPT25 0x8c59 +#define DEVICEID_LPT26 0x8c5a +#define DEVICEID_LPT27 0x8c5b +#define DEVICEID_LPT28 0x8c5c +#define DEVICEID_LPT29 0x8c5d +#define DEVICEID_LPT30 0x8c5e +#define DEVICEID_LPT31 0x8c5f /* ICH LPC Interface Bridge Registers (ICH5 and older) */ #define ICH_GEN_STA0xd4 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r243833 - head/sys/dev/ixgbe
Author: jfv Date: Mon Dec 3 21:38:02 2012 New Revision: 243833 URL: http://svnweb.freebsd.org/changeset/base/243833 Log: Remove the sysctl process_limit interface, after some thought I've decided its overkill,a simple tuneable for each RX and TX limit, and then init sets the ring values based on that, should be sufficient. More importantly, fix a bug causing a panic, when changing the define style to IXGBE_LEGACY_TX a taskqueue init was inadvertently set #ifdef when it should be #ifndef. Modified: head/sys/dev/ixgbe/ixgbe.c Modified: head/sys/dev/ixgbe/ixgbe.c == --- head/sys/dev/ixgbe/ixgbe.c Mon Dec 3 19:55:00 2012(r243832) +++ head/sys/dev/ixgbe/ixgbe.c Mon Dec 3 21:38:02 2012(r243833) @@ -2329,7 +2329,7 @@ ixgbe_allocate_msix(struct adapter *adap if (adapter->num_queues > 1) bus_bind_intr(dev, que->res, i); -#ifdef IXGBE_LEGACY_TX +#ifndef IXGBE_LEGACY_TX TASK_INIT(&txr->txq_task, 0, ixgbe_deferred_mq_start, txr); #endif TASK_INIT(&que->que_task, 0, ixgbe_handle_que, que); @@ -3082,6 +3082,9 @@ ixgbe_initialize_transmit_units(struct a txr->txd_cmd = IXGBE_TXD_CMD_IFCS; txr->queue_status = IXGBE_QUEUE_IDLE; + /* Set the processing limit */ + txr->process_limit = ixgbe_tx_process_limit; + /* Disable Head Writeback */ switch (hw->mac.type) { case ixgbe_mac_82598EB: @@ -4130,6 +4133,9 @@ ixgbe_initialize_receive_units(struct ad /* Setup the HW Rx Head and Tail Descriptor Pointers */ IXGBE_WRITE_REG(hw, IXGBE_RDH(i), 0); IXGBE_WRITE_REG(hw, IXGBE_RDT(i), 0); + + /* Set the processing limit */ + rxr->process_limit = ixgbe_rx_process_limit; } if (adapter->hw.mac.type != ixgbe_mac_82598EB) { @@ -5173,23 +5179,6 @@ ixgbe_sysctl_tdt_handler(SYSCTL_HANDLER_ return 0; } -/** ixgbe_sysctl_tx_process_limit - Handler function - * Set the limit value for TX processing - */ -static int -ixgbe_sysctl_tx_process_limit(SYSCTL_HANDLER_ARGS) -{ - int error; - - struct tx_ring *txr = ((struct tx_ring *)oidp->oid_arg1); - if (!txr) return 0; - - error = sysctl_handle_int(oidp, &ixgbe_tx_process_limit, 0, req); - if (error || !req->newptr) - return error; - return 0; -} - /** ixgbe_sysctl_rdh_handler - Handler function * Retrieves the RDH value from the hardware */ @@ -5226,23 +5215,6 @@ ixgbe_sysctl_rdt_handler(SYSCTL_HANDLER_ return 0; } -/** ixgbe_sysctl_rx_process_limit - Handler function - * Set the limit value for RX processing - */ -static int -ixgbe_sysctl_rx_process_limit(SYSCTL_HANDLER_ARGS) -{ - int error; - - struct rx_ring *rxr = ((struct rx_ring *)oidp->oid_arg1); - if (!rxr) return 0; - - error = sysctl_handle_int(oidp, &ixgbe_rx_process_limit, 0, req); - if (error || !req->newptr) - return error; - return 0; -} - static int ixgbe_sysctl_interrupt_rate_handler(SYSCTL_HANDLER_ARGS) { @@ -5330,10 +5302,6 @@ ixgbe_add_hw_stats(struct adapter *adapt CTLTYPE_UINT | CTLFLAG_RD, txr, sizeof(txr), ixgbe_sysctl_tdt_handler, "IU", "Transmit Descriptor Tail"); - SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "tx_process_limit", - CTLTYPE_UINT | CTLFLAG_RD, txr, sizeof(txr), - ixgbe_sysctl_tx_process_limit, "IU", - "Transmit Process Limit"); SYSCTL_ADD_ULONG(ctx, queue_list, OID_AUTO, "tso_tx", CTLFLAG_RD, &txr->tso_tx, "TSO"); @@ -5369,10 +5337,6 @@ ixgbe_add_hw_stats(struct adapter *adapt CTLTYPE_UINT | CTLFLAG_RD, rxr, sizeof(rxr), ixgbe_sysctl_rdt_handler, "IU", "Receive Descriptor Tail"); - SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "rx_process_limit", - CTLTYPE_UINT | CTLFLAG_RD, rxr, sizeof(rxr), - ixgbe_sysctl_rx_process_limit, "IU", - "Receive Process Limit"); SYSCTL_ADD_UQUAD(ctx, queue_list, OID_AUTO, "rx_packets", CTLFLAG_RD, &rxr->rx_packets, "Queue Packets Received"); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r243741 - head/sys/dev/ixgbe
Author: jfv Date: Sat Dec 1 01:24:40 2012 New Revision: 243741 URL: http://svnweb.freebsd.org/changeset/base/243741 Log: Patch #12 OK, I said there was only 11 patches, but unfortunately the revamped sysctl code did not work, and needed a change. This makes the limit get set at the time that all sysctl stats are created and is actually more elegant imho anyway. Modified: head/sys/dev/ixgbe/ixgbe.c Modified: head/sys/dev/ixgbe/ixgbe.c == --- head/sys/dev/ixgbe/ixgbe.c Sat Dec 1 01:16:40 2012(r243740) +++ head/sys/dev/ixgbe/ixgbe.c Sat Dec 1 01:24:40 2012(r243741) @@ -163,8 +163,6 @@ static int ixgbe_set_thermal_test(SYSCTL static int ixgbe_dma_malloc(struct adapter *, bus_size_t, struct ixgbe_dma_alloc *, int); static void ixgbe_dma_free(struct adapter *, struct ixgbe_dma_alloc *); -static voidixgbe_add_process_limit(struct adapter *, const char *, - const char *, u16 *, u16); static int ixgbe_tx_ctx_setup(struct tx_ring *, struct mbuf *, u32 *, u32 *); static int ixgbe_tso_setup(struct tx_ring *, @@ -3070,11 +3068,6 @@ ixgbe_initialize_transmit_units(struct a u64 tdba = txr->txdma.dma_paddr; u32 txctrl; - /* Sysctl for limiting work done in tx clean */ - ixgbe_add_process_limit(adapter, "tx_processing_limit", - "max number of packets to process", &txr->process_limit, - ixgbe_tx_process_limit); - IXGBE_WRITE_REG(hw, IXGBE_TDBAL(i), (tdba & 0xULL)); IXGBE_WRITE_REG(hw, IXGBE_TDBAH(i), (tdba >> 32)); @@ -4119,11 +4112,6 @@ ixgbe_initialize_receive_units(struct ad for (int i = 0; i < adapter->num_queues; i++, rxr++) { u64 rdba = rxr->rxdma.dma_paddr; - /* Sysctl for limiting work done in rx clean */ - ixgbe_add_process_limit(adapter, "rx_processing_limit", - "max number of packets to process", &rxr->process_limit, - ixgbe_rx_process_limit); - /* Setup the Base and Length of the Rx Descriptor Ring */ IXGBE_WRITE_REG(hw, IXGBE_RDBAL(i), (rdba & 0xULL)); @@ -5185,6 +5173,23 @@ ixgbe_sysctl_tdt_handler(SYSCTL_HANDLER_ return 0; } +/** ixgbe_sysctl_tx_process_limit - Handler function + * Set the limit value for TX processing + */ +static int +ixgbe_sysctl_tx_process_limit(SYSCTL_HANDLER_ARGS) +{ + int error; + + struct tx_ring *txr = ((struct tx_ring *)oidp->oid_arg1); + if (!txr) return 0; + + error = sysctl_handle_int(oidp, &ixgbe_tx_process_limit, 0, req); + if (error || !req->newptr) + return error; + return 0; +} + /** ixgbe_sysctl_rdh_handler - Handler function * Retrieves the RDH value from the hardware */ @@ -5221,6 +5226,23 @@ ixgbe_sysctl_rdt_handler(SYSCTL_HANDLER_ return 0; } +/** ixgbe_sysctl_rx_process_limit - Handler function + * Set the limit value for RX processing + */ +static int +ixgbe_sysctl_rx_process_limit(SYSCTL_HANDLER_ARGS) +{ + int error; + + struct rx_ring *rxr = ((struct rx_ring *)oidp->oid_arg1); + if (!rxr) return 0; + + error = sysctl_handle_int(oidp, &ixgbe_rx_process_limit, 0, req); + if (error || !req->newptr) + return error; + return 0; +} + static int ixgbe_sysctl_interrupt_rate_handler(SYSCTL_HANDLER_ARGS) { @@ -5308,6 +5330,10 @@ ixgbe_add_hw_stats(struct adapter *adapt CTLTYPE_UINT | CTLFLAG_RD, txr, sizeof(txr), ixgbe_sysctl_tdt_handler, "IU", "Transmit Descriptor Tail"); + SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "tx_process_limit", + CTLTYPE_UINT | CTLFLAG_RD, txr, sizeof(txr), + ixgbe_sysctl_tx_process_limit, "IU", + "Transmit Process Limit"); SYSCTL_ADD_ULONG(ctx, queue_list, OID_AUTO, "tso_tx", CTLFLAG_RD, &txr->tso_tx, "TSO"); @@ -5343,6 +5369,10 @@ ixgbe_add_hw_stats(struct adapter *adapt CTLTYPE_UINT | CTLFLAG_RD, rxr, sizeof(rxr), ixgbe_sysctl_rdt_handler, "IU", "Receive Descriptor Tail"); + SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "rx_process_limit", + CTLTYPE_UINT | CTLFLAG_RD, rxr, sizeof(rxr), + ixgbe_sysctl_rx_process_limit, "IU", + "Receive Process Limit"); SYSCTL_ADD_UQUAD(ctx, queue_list, OID_AUTO, "rx_p
svn commit: r243736 - head/sys/dev/ixgbe
Author: jfv Date: Sat Dec 1 00:11:24 2012 New Revision: 243736 URL: http://svnweb.freebsd.org/changeset/base/243736 Log: Patch #11 - The final patch: this one greatly improves the TX hot path by getting rid of index calculations and simply managing pointers. Much of the creative code is due to my coworker here at Intel, Alex Duyck, thanks Alex! Also, this whole series of patches was given the critical eye of Gleb Smirnoff and is all the better for it, thanks Gleb! Modified: head/sys/dev/ixgbe/ixgbe.c head/sys/dev/ixgbe/ixgbe.h Modified: head/sys/dev/ixgbe/ixgbe.c == --- head/sys/dev/ixgbe/ixgbe.c Sat Dec 1 00:03:58 2012(r243735) +++ head/sys/dev/ixgbe/ixgbe.c Sat Dec 1 00:11:24 2012(r243736) @@ -47,7 +47,7 @@ int ixgbe_display_debug_stat /* * Driver version */ -char ixgbe_driver_version[] = "2.5.0 - 10"; +char ixgbe_driver_version[] = "2.5.0"; /* * PCI Device ID Table @@ -1740,7 +1740,7 @@ ixgbe_xmit(struct tx_ring *txr, struct m struct adapter *adapter = txr->adapter; u32 olinfo_status = 0, cmd_type_len; int i, j, error, nsegs; - int first, last = 0; + int first; boolremap = TRUE; struct mbuf *m_head; bus_dma_segment_t segs[adapter->num_segs]; @@ -1847,13 +1847,9 @@ retry: txd->read.cmd_type_len = htole32(txr->txd_cmd | cmd_type_len |seglen); txd->read.olinfo_status = htole32(olinfo_status); - last = i; /* descriptor that will get completion IRQ */ if (++i == txr->num_desc) i = 0; - - txbuf->m_head = NULL; - txbuf->eop_index = -1; } txd->read.cmd_type_len |= @@ -1872,9 +1868,9 @@ retry: txbuf->map = map; bus_dmamap_sync(txr->txtag, map, BUS_DMASYNC_PREWRITE); -/* Set the index of the descriptor that will be marked done */ +/* Set the EOP descriptor that will be marked done */ txbuf = &txr->tx_buffers[first]; - txbuf->eop_index = last; + txbuf->eop = txd; bus_dmamap_sync(txr->txdma.dma_tag, txr->txdma.dma_map, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); @@ -3023,8 +3019,8 @@ ixgbe_setup_transmit_ring(struct tx_ring netmap_load_map(txr->txtag, txbuf->map, NMB(slot + si)); } #endif /* DEV_NETMAP */ - /* Clear the EOP index */ - txbuf->eop_index = -1; + /* Clear the EOP descriptor pointer */ + txbuf->eop = NULL; } #ifdef IXGBE_FDIR @@ -3083,7 +3079,7 @@ ixgbe_initialize_transmit_units(struct a (tdba & 0xULL)); IXGBE_WRITE_REG(hw, IXGBE_TDBAH(i), (tdba >> 32)); IXGBE_WRITE_REG(hw, IXGBE_TDLEN(i), - adapter->num_tx_desc * sizeof(struct ixgbe_legacy_tx_desc)); + adapter->num_tx_desc * sizeof(union ixgbe_adv_tx_desc)); /* Setup the HW Tx Head and Tail descriptor pointers */ IXGBE_WRITE_REG(hw, IXGBE_TDH(i), 0); @@ -3320,8 +3316,8 @@ ixgbe_tx_ctx_setup(struct tx_ring *txr, *olinfo_status |= IXGBE_TXD_POPTS_TXSM << 8; /* Now copy bits into descriptor */ - TXD->vlan_macip_lens |= htole32(vlan_macip_lens); - TXD->type_tucmd_mlhl |= htole32(type_tucmd_mlhl); + TXD->vlan_macip_lens = htole32(vlan_macip_lens); + TXD->type_tucmd_mlhl = htole32(type_tucmd_mlhl); TXD->seqnum_seed = htole32(0); TXD->mss_l4len_idx = htole32(0); @@ -3423,12 +3419,12 @@ ixgbe_tso_setup(struct tx_ring *txr, str vlan_macip_lens |= ehdrlen << IXGBE_ADVTXD_MACLEN_SHIFT; vlan_macip_lens |= ip_hlen; - TXD->vlan_macip_lens |= htole32(vlan_macip_lens); + TXD->vlan_macip_lens = htole32(vlan_macip_lens); /* ADV DTYPE TUCMD */ type_tucmd_mlhl |= IXGBE_ADVTXD_DCMD_DEXT | IXGBE_ADVTXD_DTYP_CTXT; type_tucmd_mlhl |= IXGBE_ADVTXD_TUCMD_L4T_TCP; - TXD->type_tucmd_mlhl |= htole32(type_tucmd_mlhl); + TXD->type_tucmd_mlhl = htole32(type_tucmd_mlhl); /* MSS L4LEN IDX */ mss_l4len_idx |= (mp->m_pkthdr.tso_segsz << IXGBE_ADVTXD_MSS_SHIFT); @@ -3535,11 +3531,12 @@ ixgbe_atr(struct tx_ring *txr, struct mb static bool ixgbe_txeof(struct tx_ring *txr) { - struct adapter *adapter = txr->adapter; - struct ifnet*ifp = adapter->ifp; - u32 first, last, done, processed; - struct ixgbe_tx_buf *tx_buffer; - struct ixgbe_legacy_tx_desc *tx_desc,
svn commit: r243735 - head/sys/dev/ixgbe
Author: jfv Date: Sat Dec 1 00:03:58 2012 New Revision: 243735 URL: http://svnweb.freebsd.org/changeset/base/243735 Log: Patch #10 Performance - this changes the protocol offload interface and code in the TX path,making it tighter and hopefully more efficient. Modified: head/sys/dev/ixgbe/ixgbe.c Modified: head/sys/dev/ixgbe/ixgbe.c == --- head/sys/dev/ixgbe/ixgbe.c Sat Dec 1 00:02:31 2012(r243734) +++ head/sys/dev/ixgbe/ixgbe.c Sat Dec 1 00:03:58 2012(r243735) @@ -47,7 +47,7 @@ int ixgbe_display_debug_stat /* * Driver version */ -char ixgbe_driver_version[] = "2.5.0 - 9"; +char ixgbe_driver_version[] = "2.5.0 - 10"; /* * PCI Device ID Table @@ -165,8 +165,10 @@ static int ixgbe_dma_malloc(struct adapt static void ixgbe_dma_free(struct adapter *, struct ixgbe_dma_alloc *); static voidixgbe_add_process_limit(struct adapter *, const char *, const char *, u16 *, u16); -static boolixgbe_tx_ctx_setup(struct tx_ring *, struct mbuf *); -static boolixgbe_tso_setup(struct tx_ring *, struct mbuf *, u32 *, u32 *); +static int ixgbe_tx_ctx_setup(struct tx_ring *, + struct mbuf *, u32 *, u32 *); +static int ixgbe_tso_setup(struct tx_ring *, + struct mbuf *, u32 *, u32 *); static voidixgbe_set_ivar(struct adapter *, u8, u8, s8); static voidixgbe_configure_ivars(struct adapter *); static u8 *ixgbe_mc_array_itr(struct ixgbe_hw *, u8 **, u32 *); @@ -1737,7 +1739,6 @@ ixgbe_xmit(struct tx_ring *txr, struct m { struct adapter *adapter = txr->adapter; u32 olinfo_status = 0, cmd_type_len; - u32 paylen = 0; int i, j, error, nsegs; int first, last = 0; boolremap = TRUE; @@ -1814,16 +1815,12 @@ retry: ** Set up the appropriate offload context ** this will consume the first descriptor */ - if (m_head->m_pkthdr.csum_flags & CSUM_TSO) { - if (ixgbe_tso_setup(txr, m_head, &paylen, &olinfo_status)) { - cmd_type_len |= IXGBE_ADVTXD_DCMD_TSE; - olinfo_status |= IXGBE_TXD_POPTS_TXSM << 8; - olinfo_status |= paylen << IXGBE_ADVTXD_PAYLEN_SHIFT; - ++txr->tso_tx; - } else - return (ENXIO); - } else if (ixgbe_tx_ctx_setup(txr, m_head)) - olinfo_status |= IXGBE_TXD_POPTS_TXSM << 8; + error = ixgbe_tx_ctx_setup(txr, m_head, &cmd_type_len, &olinfo_status); + if (__predict_false(error)) { + if (error == ENOBUFS) + *m_headp = NULL; + return (error); + } #ifdef IXGBE_FDIR /* Do the flow director magic */ @@ -1835,10 +1832,6 @@ retry: } } #endif -/* Record payload length */ - if (paylen == 0) - olinfo_status |= m_head->m_pkthdr.len << - IXGBE_ADVTXD_PAYLEN_SHIFT; i = txr->next_avail_desc; for (j = 0; j < nsegs; j++) { @@ -3218,31 +3211,37 @@ ixgbe_free_transmit_buffers(struct tx_ri /* * - * Advanced Context Descriptor setup for VLAN or CSUM + * Advanced Context Descriptor setup for VLAN, CSUM or TSO * **/ -static bool -ixgbe_tx_ctx_setup(struct tx_ring *txr, struct mbuf *mp) +static int +ixgbe_tx_ctx_setup(struct tx_ring *txr, struct mbuf *mp, +u32 *cmd_type_len, u32 *olinfo_status) { struct ixgbe_adv_tx_context_desc *TXD; - struct ixgbe_tx_buf*tx_buffer; - u32 vlan_macip_lens = 0, type_tucmd_mlhl = 0; struct ether_vlan_header *eh; struct ip *ip; struct ip6_hdr *ip6; - int ehdrlen, ip_hlen = 0; + u32 vlan_macip_lens = 0, type_tucmd_mlhl = 0; + int ehdrlen, ip_hlen = 0; u16 etype; u8 ipproto = 0; - booloffload = TRUE; - int ctxd = txr->next_avail_desc; - u16 vtag = 0; - + int offload = TRUE; + int ctxd = txr->next_avail_desc; + u16 vtag = 0; + + /* First check if TSO is to be used */ + if (mp->m_pkthdr.csum_flags & CSUM_TSO) + return (ixgbe_tso_setup(txr, mp, cmd_type_len, olinfo_status)); if ((mp->m_pkthdr.csum_flags & CSUM_OFFLOAD) == 0) offload = FALSE; - tx_buffer = &txr->tx_buffers[ctxd]; + /* Indicate the whole packet as payload when not doing TSO */ + *olinfo_status |= mp->m_pkthdr.l
svn commit: r243733 - head/sys/dev/ixgbe
Author: jfv Date: Fri Nov 30 23:54:57 2012 New Revision: 243733 URL: http://svnweb.freebsd.org/changeset/base/243733 Log: Patch #9 Performance - improve the tx dma failure path, similar to a change done in igb long ago. Modified: head/sys/dev/ixgbe/ixgbe.c Modified: head/sys/dev/ixgbe/ixgbe.c == --- head/sys/dev/ixgbe/ixgbe.c Fri Nov 30 23:52:45 2012(r243732) +++ head/sys/dev/ixgbe/ixgbe.c Fri Nov 30 23:54:57 2012(r243733) @@ -47,7 +47,7 @@ int ixgbe_display_debug_stat /* * Driver version */ -char ixgbe_driver_version[] = "2.5.0 - 8"; +char ixgbe_driver_version[] = "2.5.0 - 9"; /* * PCI Device ID Table @@ -1740,6 +1740,7 @@ ixgbe_xmit(struct tx_ring *txr, struct m u32 paylen = 0; int i, j, error, nsegs; int first, last = 0; + boolremap = TRUE; struct mbuf *m_head; bus_dma_segment_t segs[adapter->num_segs]; bus_dmamap_tmap; @@ -1767,42 +1768,38 @@ ixgbe_xmit(struct tx_ring *txr, struct m /* * Map the packet for DMA. */ +retry: error = bus_dmamap_load_mbuf_sg(txr->txtag, map, *m_headp, segs, &nsegs, BUS_DMA_NOWAIT); - if (error == EFBIG) { + if (__predict_false(error)) { struct mbuf *m; - m = m_defrag(*m_headp, M_DONTWAIT); - if (m == NULL) { - adapter->mbuf_defrag_failed++; - m_freem(*m_headp); - *m_headp = NULL; - return (ENOBUFS); - } - *m_headp = m; - - /* Try it again */ - error = bus_dmamap_load_mbuf_sg(txr->txtag, map, - *m_headp, segs, &nsegs, BUS_DMA_NOWAIT); - - if (error == ENOMEM) { + switch (error) { + case EFBIG: + /* Try it again? - one try */ + if (remap == TRUE) { + remap = FALSE; + m = m_defrag(*m_headp, M_NOWAIT); + if (m == NULL) { + adapter->mbuf_defrag_failed++; + m_freem(*m_headp); + *m_headp = NULL; + return (ENOBUFS); + } + *m_headp = m; + goto retry; + } else + return (error); + case ENOMEM: txr->no_tx_dma_setup++; return (error); - } else if (error != 0) { + default: txr->no_tx_dma_setup++; m_freem(*m_headp); *m_headp = NULL; return (error); } - } else if (error == ENOMEM) { - txr->no_tx_dma_setup++; - return (error); - } else if (error != 0) { - txr->no_tx_dma_setup++; - m_freem(*m_headp); - *m_headp = NULL; - return (error); } /* Make certain there are enough descriptors */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r243729 - head/sys/dev/ixgbe
Author: jfv Date: Fri Nov 30 23:45:55 2012 New Revision: 243729 URL: http://svnweb.freebsd.org/changeset/base/243729 Log: Patch #8 Performance changes - this one improves locality, moving some counters and data to the ring struct from the adapter struct, also compressing some data in the move. Modified: head/sys/dev/ixgbe/ixgbe.c head/sys/dev/ixgbe/ixgbe.h Modified: head/sys/dev/ixgbe/ixgbe.c == --- head/sys/dev/ixgbe/ixgbe.c Fri Nov 30 23:28:01 2012(r243728) +++ head/sys/dev/ixgbe/ixgbe.c Fri Nov 30 23:45:55 2012(r243729) @@ -47,7 +47,7 @@ int ixgbe_display_debug_stat /* * Driver version */ -char ixgbe_driver_version[] = "2.5.0 - 7"; +char ixgbe_driver_version[] = "2.5.0 - 8"; /* * PCI Device ID Table @@ -164,7 +164,7 @@ static int ixgbe_dma_malloc(struct adapt struct ixgbe_dma_alloc *, int); static void ixgbe_dma_free(struct adapter *, struct ixgbe_dma_alloc *); static voidixgbe_add_process_limit(struct adapter *, const char *, - const char *, int *, int); + const char *, u16 *, u16); static boolixgbe_tx_ctx_setup(struct tx_ring *, struct mbuf *); static boolixgbe_tso_setup(struct tx_ring *, struct mbuf *, u32 *, u32 *); static voidixgbe_set_ivar(struct adapter *, u8, u8, s8); @@ -1787,19 +1787,19 @@ ixgbe_xmit(struct tx_ring *txr, struct m *m_headp, segs, &nsegs, BUS_DMA_NOWAIT); if (error == ENOMEM) { - adapter->no_tx_dma_setup++; + txr->no_tx_dma_setup++; return (error); } else if (error != 0) { - adapter->no_tx_dma_setup++; + txr->no_tx_dma_setup++; m_freem(*m_headp); *m_headp = NULL; return (error); } } else if (error == ENOMEM) { - adapter->no_tx_dma_setup++; + txr->no_tx_dma_setup++; return (error); } else if (error != 0) { - adapter->no_tx_dma_setup++; + txr->no_tx_dma_setup++; m_freem(*m_headp); *m_headp = NULL; return (error); @@ -1822,7 +1822,7 @@ ixgbe_xmit(struct tx_ring *txr, struct m cmd_type_len |= IXGBE_ADVTXD_DCMD_TSE; olinfo_status |= IXGBE_TXD_POPTS_TXSM << 8; olinfo_status |= paylen << IXGBE_ADVTXD_PAYLEN_SHIFT; - ++adapter->tso_tx; + ++txr->tso_tx; } else return (ENXIO); } else if (ixgbe_tx_ctx_setup(txr, m_head)) @@ -1859,7 +1859,7 @@ ixgbe_xmit(struct tx_ring *txr, struct m txd->read.olinfo_status = htole32(olinfo_status); last = i; /* descriptor that will get completion IRQ */ - if (++i == adapter->num_tx_desc) + if (++i == txr->num_desc) i = 0; txbuf->m_head = NULL; @@ -2816,6 +2816,7 @@ ixgbe_allocate_queues(struct adapter *ad txr = &adapter->tx_rings[i]; txr->adapter = adapter; txr->me = i; + txr->num_desc = adapter->num_tx_desc; /* Initialize the TX side lock */ snprintf(txr->mtx_name, sizeof(txr->mtx_name), "%s:tx(%d)", @@ -2862,6 +2863,7 @@ ixgbe_allocate_queues(struct adapter *ad /* Set up some basics */ rxr->adapter = adapter; rxr->me = i; + rxr->num_desc = adapter->num_rx_desc; /* Initialize the RX side lock */ snprintf(rxr->mtx_name, sizeof(rxr->mtx_name), "%s:rx(%d)", @@ -3007,7 +3009,7 @@ ixgbe_setup_transmit_ring(struct tx_ring /* Free any existing tx buffers. */ txbuf = txr->tx_buffers; - for (i = 0; i < adapter->num_tx_desc; i++, txbuf++) { + for (i = 0; i < txr->num_desc; i++, txbuf++) { if (txbuf->m_head != NULL) { bus_dmamap_sync(txr->txtag, txbuf->map, BUS_DMASYNC_POSTWRITE); @@ -3226,7 +3228,6 @@ ixgbe_free_transmit_buffers(struct tx_ri static bool ixgbe_tx_ctx_setup(struct tx_ring *txr, struct mbuf *mp) { - struct adapter *adapter = txr->adapter; struct ixgbe_adv_tx_context_desc *TXD; struct ixgbe_tx_buf*tx_buffer; u32 vlan_macip_lens = 0, type_tucmd_mlhl = 0; @@ -3329,7 +3330,7 @@ ixgbe_tx_ctx_setup(struct tx_ring *txr, tx_buffer->eop_index = -1; /* We've co
svn commit: r243728 - head/sys/dev/ixgbe
Author: jfv Date: Fri Nov 30 23:28:01 2012 New Revision: 243728 URL: http://svnweb.freebsd.org/changeset/base/243728 Log: Patch #7 This is primarily about processing limit control. - add a limit for both RX and TX, change the default to 256 - change the sysctl usage to be common, and now to be called during init for each ring. - the TX limit is not yet used, but the changes in the last patch in this series uses the value. - the motivation behind these changes is to improve data locality in the final code. - rxeof interface changes since it now gets limit from the ring struct Modified: head/sys/dev/ixgbe/ixgbe.c head/sys/dev/ixgbe/ixgbe.h Modified: head/sys/dev/ixgbe/ixgbe.c == --- head/sys/dev/ixgbe/ixgbe.c Fri Nov 30 23:21:55 2012(r243727) +++ head/sys/dev/ixgbe/ixgbe.c Fri Nov 30 23:28:01 2012(r243728) @@ -47,7 +47,7 @@ int ixgbe_display_debug_stat /* * Driver version */ -char ixgbe_driver_version[] = "2.5.0 - 6"; +char ixgbe_driver_version[] = "2.5.0 - 7"; /* * PCI Device ID Table @@ -150,7 +150,7 @@ static void ixgbe_enable_intr(struct static void ixgbe_disable_intr(struct adapter *); static void ixgbe_update_stats_counters(struct adapter *); static boolixgbe_txeof(struct tx_ring *); -static boolixgbe_rxeof(struct ix_queue *, int); +static boolixgbe_rxeof(struct ix_queue *); static voidixgbe_rx_checksum(u32, struct mbuf *, u32); static void ixgbe_set_promisc(struct adapter *); static void ixgbe_set_multi(struct adapter *); @@ -163,7 +163,7 @@ static int ixgbe_set_thermal_test(SYSCTL static int ixgbe_dma_malloc(struct adapter *, bus_size_t, struct ixgbe_dma_alloc *, int); static void ixgbe_dma_free(struct adapter *, struct ixgbe_dma_alloc *); -static voidixgbe_add_rx_process_limit(struct adapter *, const char *, +static voidixgbe_add_process_limit(struct adapter *, const char *, const char *, int *, int); static boolixgbe_tx_ctx_setup(struct tx_ring *, struct mbuf *); static boolixgbe_tso_setup(struct tx_ring *, struct mbuf *, u32 *, u32 *); @@ -246,9 +246,13 @@ static int ixgbe_max_interrupt_rate = (4 TUNABLE_INT("hw.ixgbe.max_interrupt_rate", &ixgbe_max_interrupt_rate); /* How many packets rxeof tries to clean at a time */ -static int ixgbe_rx_process_limit = 128; +static int ixgbe_rx_process_limit = 256; TUNABLE_INT("hw.ixgbe.rx_process_limit", &ixgbe_rx_process_limit); +/* How many packets txeof tries to clean at a time */ +static int ixgbe_tx_process_limit = 256; +TUNABLE_INT("hw.ixgbe.tx_process_limit", &ixgbe_tx_process_limit); + /* ** Smart speed setting, default to on ** this only works as a compile option @@ -563,11 +567,6 @@ ixgbe_attach(device_t dev) if (ixgbe_setup_interface(dev, adapter) != 0) goto err_late; - /* Sysctl for limiting the amount of work done in the taskqueue */ - ixgbe_add_rx_process_limit(adapter, "rx_processing_limit", - "max number of rx packets to process", &adapter->rx_process_limit, - ixgbe_rx_process_limit); - /* Initialize statistics */ ixgbe_update_stats_counters(adapter); @@ -1410,7 +1409,7 @@ ixgbe_handle_que(void *context, int pend boolmore; if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - more = ixgbe_rxeof(que, adapter->rx_process_limit); + more = ixgbe_rxeof(que); IXGBE_TX_LOCK(txr); ixgbe_txeof(txr); #ifndef IXGBE_LEGACY_TX @@ -1458,7 +1457,7 @@ ixgbe_legacy_irq(void *arg) return; } - more_rx = ixgbe_rxeof(que, adapter->rx_process_limit); + more_rx = ixgbe_rxeof(que); IXGBE_TX_LOCK(txr); do { @@ -1504,7 +1503,7 @@ ixgbe_msix_que(void *arg) ixgbe_disable_queue(adapter, que->msix); ++que->irqs; - more_rx = ixgbe_rxeof(que, adapter->rx_process_limit); + more_rx = ixgbe_rxeof(que); IXGBE_TX_LOCK(txr); more_tx = ixgbe_txeof(txr); @@ -3083,6 +3082,11 @@ ixgbe_initialize_transmit_units(struct a u64 tdba = txr->txdma.dma_paddr; u32 txctrl; + /* Sysctl for limiting work done in tx clean */ + ixgbe_add_process_limit(adapter, "tx_processing_limit", + "max number of packets to process", &txr->process_limit, + ixgbe_tx_process_limit); + IXGBE_WRITE_REG(hw, IXGBE_TDBAL(i), (tdba & 0xULL)); IXGBE_WRITE_REG(hw, IXGBE_TDBAH(i), (tdba >> 32)); @@ -4122,6 +4126,11 @@ ixgbe_initiali
svn commit: r243725 - head/sys/dev/ixgbe
Author: jfv Date: Fri Nov 30 23:13:56 2012 New Revision: 243725 URL: http://svnweb.freebsd.org/changeset/base/243725 Log: Patch #6 Whitespace cleanup, and removal of some very old defines (at Gleb's request). Also, change the defines around the old transmit code to IXGBE_LEGACY_TX, I do this to make it possible to define this regardless of the OS level (it is not defined by default). There are also a couple changed comments for clarity. Modified: head/sys/dev/ixgbe/ixgbe.c head/sys/dev/ixgbe/ixgbe.h Modified: head/sys/dev/ixgbe/ixgbe.c == --- head/sys/dev/ixgbe/ixgbe.c Fri Nov 30 23:06:27 2012(r243724) +++ head/sys/dev/ixgbe/ixgbe.c Fri Nov 30 23:13:56 2012(r243725) @@ -47,7 +47,7 @@ int ixgbe_display_debug_stat /* * Driver version */ -char ixgbe_driver_version[] = "2.5.0 - 5"; +char ixgbe_driver_version[] = "2.5.0 - 6"; /* * PCI Device ID Table @@ -104,16 +104,16 @@ static int ixgbe_probe(device_t); static int ixgbe_attach(device_t); static int ixgbe_detach(device_t); static int ixgbe_shutdown(device_t); -#if __FreeBSD_version >= 80 +#ifdef IXGBE_LEGACY_TX +static void ixgbe_start(struct ifnet *); +static void ixgbe_start_locked(struct tx_ring *, struct ifnet *); +#else /* ! IXGBE_LEGACY_TX */ static int ixgbe_mq_start(struct ifnet *, struct mbuf *); static int ixgbe_mq_start_locked(struct ifnet *, struct tx_ring *, struct mbuf *); static voidixgbe_qflush(struct ifnet *); static voidixgbe_deferred_mq_start(void *, int); -#else -static void ixgbe_start(struct ifnet *); -static void ixgbe_start_locked(struct tx_ring *, struct ifnet *); -#endif +#endif /* IXGBE_LEGACY_TX */ static int ixgbe_ioctl(struct ifnet *, u_long, caddr_t); static voidixgbe_init(void *); static voidixgbe_init_locked(struct adapter *); @@ -541,7 +541,6 @@ ixgbe_attach(device_t dev) case IXGBE_ERR_SFP_NOT_SUPPORTED: device_printf(dev,"Unsupported SFP+ Module\n"); error = EIO; - device_printf(dev,"Hardware Initialization Failure\n"); goto err_late; case IXGBE_ERR_SFP_NOT_PRESENT: device_printf(dev,"No SFP+ Module found\n"); @@ -653,7 +652,7 @@ ixgbe_detach(device_t dev) for (int i = 0; i < adapter->num_queues; i++, que++, txr++) { if (que->tq) { -#if __FreeBSD_version >= 80 +#ifdef IXGBE_LEGACY_TX taskqueue_drain(que->tq, &txr->txq_task); #endif taskqueue_drain(que->tq, &que->que_task); @@ -717,7 +716,7 @@ ixgbe_shutdown(device_t dev) } -#if __FreeBSD_version < 80 +#ifdef IXGBE_LEGACY_TX /* * Transmit entry point * @@ -784,7 +783,8 @@ ixgbe_start(struct ifnet *ifp) return; } -#else +#else /* ! IXGBE_LEGACY_TX */ + /* ** Multiqueue Transmit driver ** @@ -904,7 +904,7 @@ ixgbe_qflush(struct ifnet *ifp) } if_qflush(ifp); } -#endif /* __FreeBSD_version >= 80 */ +#endif /* IXGBE_LEGACY_TX */ /* * Ioctl entry point @@ -1413,7 +1413,7 @@ ixgbe_handle_que(void *context, int pend more = ixgbe_rxeof(que, adapter->rx_process_limit); IXGBE_TX_LOCK(txr); ixgbe_txeof(txr); -#if __FreeBSD_version >= 80 +#ifndef IXGBE_LEGACY_TX if (!drbr_empty(ifp, txr->br)) ixgbe_mq_start_locked(ifp, txr, NULL); #else @@ -1513,7 +1513,7 @@ ixgbe_msix_que(void *arg) ** has anything queued the task gets ** scheduled to handle it. */ -#if __FreeBSD_version < 80 +#ifdef IXGBE_LEGACY_TX if (!IFQ_DRV_IS_EMPTY(&adapter->ifp->if_snd)) #else if (!drbr_empty(adapter->ifp, txr->br)) @@ -1809,15 +1809,14 @@ ixgbe_xmit(struct tx_ring *txr, struct m /* Make certain there are enough descriptors */ if (nsegs > txr->tx_avail - 2) { txr->no_desc_avail++; - error = ENOBUFS; - goto xmit_fail; + bus_dmamap_unload(txr->txtag, map); + return (ENOBUFS); } m_head = *m_headp; /* ** Set up the appropriate offload context - ** this becomes the first descriptor of - ** a packet. + ** this will consume the first descriptor */ if (m_head->m_pkthdr.csum_flags & CSUM_TSO) { if (ixgbe_tso_setup(txr, m_head, &paylen, &olinfo_status)) { @@ -1874,7 +1873,12 @@ ixgbe_xmit(struct tx_ring *txr, struct m tx
svn commit: r243724 - head/sys/dev/ixgbe
Author: jfv Date: Fri Nov 30 23:06:27 2012 New Revision: 243724 URL: http://svnweb.freebsd.org/changeset/base/243724 Log: Patch #5 Cleanup unused IEEE1588 code fragments, the day may come when this feature gets implemented, but its not here yet and I see no reason to leave this laying around. Modified: head/sys/dev/ixgbe/ixgbe.c head/sys/dev/ixgbe/ixgbe.h Modified: head/sys/dev/ixgbe/ixgbe.c == --- head/sys/dev/ixgbe/ixgbe.c Fri Nov 30 23:03:51 2012(r243723) +++ head/sys/dev/ixgbe/ixgbe.c Fri Nov 30 23:06:27 2012(r243724) @@ -47,7 +47,7 @@ int ixgbe_display_debug_stat /* * Driver version */ -char ixgbe_driver_version[] = "2.5.0 - 4"; +char ixgbe_driver_version[] = "2.5.0 - 5"; /* * PCI Device ID Table @@ -1830,12 +1830,6 @@ ixgbe_xmit(struct tx_ring *txr, struct m } else if (ixgbe_tx_ctx_setup(txr, m_head)) olinfo_status |= IXGBE_TXD_POPTS_TXSM << 8; -#ifdef IXGBE_IEEE1588 -/* This is changing soon to an mtag detection */ -if (we detect this mbuf has a TSTAMP mtag) -cmd_type_len |= IXGBE_ADVTXD_MAC_TSTAMP; -#endif - #ifdef IXGBE_FDIR /* Do the flow director magic */ if ((txr->atr_sample) && (!adapter->fdir_reinit)) { Modified: head/sys/dev/ixgbe/ixgbe.h == --- head/sys/dev/ixgbe/ixgbe.h Fri Nov 30 23:03:51 2012(r243723) +++ head/sys/dev/ixgbe/ixgbe.h Fri Nov 30 23:06:27 2012(r243724) @@ -89,10 +89,6 @@ #include #include -#ifdef IXGBE_IEEE1588 -#include -#endif - #include "ixgbe_api.h" /* Tunables */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r243721 - head/sys/dev/ixgbe
Author: jfv Date: Fri Nov 30 22:54:14 2012 New Revision: 243721 URL: http://svnweb.freebsd.org/changeset/base/243721 Log: Patch #4 - this does two things, it removes a number of statistics, these are FCOE stats (fiber channel over ethernet), something that FreeBSD does not yet have, they were mistaken for flow control by the implementor I believe. Secondly, the real flow control stats are oddly named with a 'link' tag on the front, it was requested by my validation engineer to make these stats have the same name as the igb driver for clarity and that seemed reasonable to me. Modified: head/sys/dev/ixgbe/ixgbe.c Modified: head/sys/dev/ixgbe/ixgbe.c == --- head/sys/dev/ixgbe/ixgbe.c Fri Nov 30 22:52:35 2012(r243720) +++ head/sys/dev/ixgbe/ixgbe.c Fri Nov 30 22:54:14 2012(r243721) @@ -47,7 +47,7 @@ int ixgbe_display_debug_stat /* * Driver version */ -char ixgbe_driver_version[] = "2.5.0 - 3"; +char ixgbe_driver_version[] = "2.5.0 - 4"; /* * PCI Device ID Table @@ -5388,16 +5388,18 @@ ixgbe_add_hw_stats(struct adapter *adapt SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rec_len_errs", CTLFLAG_RD, &stats->rlec, "Receive Length Errors"); - SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "link_xon_txd", + + /* Flow Control stats */ + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "xon_txd", CTLFLAG_RD, &stats->lxontxc, "Link XON Transmitted"); - SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "link_xon_rcvd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "xon_recvd", CTLFLAG_RD, &stats->lxonrxc, "Link XON Received"); - SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "link_xoff_txd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "xoff_txd", CTLFLAG_RD, &stats->lxofftxc, "Link XOFF Transmitted"); - SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "link_xoff_rcvd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "xoff_recvd", CTLFLAG_RD, &stats->lxoffrxc, "Link XOFF Received"); @@ -5497,29 +5499,6 @@ ixgbe_add_hw_stats(struct adapter *adapt SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tx_frames_1024_1522", CTLFLAG_RD, &stats->ptc1522, "1024-1522 byte frames transmitted"); - - /* FC Stats */ - SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "fc_crc", - CTLFLAG_RD, &stats->fccrc, - "FC CRC Errors"); - SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "fc_last", - CTLFLAG_RD, &stats->fclast, - "FC Last Error"); - SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "fc_drpd", - CTLFLAG_RD, &stats->fcoerpdc, - "FCoE Packets Dropped"); - SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "fc_pkts_rcvd", - CTLFLAG_RD, &stats->fcoeprc, - "FCoE Packets Received"); - SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "fc_pkts_txd", - CTLFLAG_RD, &stats->fcoeptc, - "FCoE Packets Transmitted"); - SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "fc_dword_rcvd", - CTLFLAG_RD, &stats->fcoedwrc, - "FCoE DWords Received"); - SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "fc_dword_txd", - CTLFLAG_RD, &stats->fcoedwtc, - "FCoE DWords Transmitted"); } /* ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r243718 - head/sys/dev/ixgbe
Author: jfv Date: Fri Nov 30 22:41:32 2012 New Revision: 243718 URL: http://svnweb.freebsd.org/changeset/base/243718 Log: Patch #3 - Add a new ioctl to access SFP+ module diagnostic data via the I2C routines in shared code. Modified: head/sys/dev/ixgbe/ixgbe.c head/sys/dev/ixgbe/ixgbe.h Modified: head/sys/dev/ixgbe/ixgbe.c == --- head/sys/dev/ixgbe/ixgbe.c Fri Nov 30 22:38:42 2012(r243717) +++ head/sys/dev/ixgbe/ixgbe.c Fri Nov 30 22:41:32 2012(r243718) @@ -47,7 +47,7 @@ int ixgbe_display_debug_stat /* * Driver version */ -char ixgbe_driver_version[] = "2.5.0 - 2"; +char ixgbe_driver_version[] = "2.5.0 - 3"; /* * PCI Device ID Table @@ -919,6 +919,7 @@ static int ixgbe_ioctl(struct ifnet * ifp, u_long command, caddr_t data) { struct adapter *adapter = ifp->if_softc; + struct ixgbe_hw *hw = &adapter->hw; struct ifreq*ifr = (struct ifreq *) data; #if defined(INET) || defined(INET6) struct ifaddr *ifa = (struct ifaddr *)data; @@ -1024,7 +1025,22 @@ ixgbe_ioctl(struct ifnet * ifp, u_long c VLAN_CAPABILITIES(ifp); break; } - + case SIOCGI2C: + { + struct ixgbe_i2c_reqi2c; + IOCTL_DEBUGOUT("ioctl: SIOCGI2C (Get I2C Data)"); + error = copyin(ifr->ifr_data, &i2c, sizeof(i2c)); + if (error) + break; + if ((i2c.dev_addr != 0xA0) || (i2c.dev_addr != 0xA2)){ + error = EINVAL; + break; + } + hw->phy.ops.read_i2c_byte(hw, i2c.offset, + i2c.dev_addr, i2c.data); + error = copyout(&i2c, ifr->ifr_data, sizeof(i2c)); + break; + } default: IOCTL_DEBUGOUT1("ioctl: UNKNOWN (0x%X)\n", (int)command); error = ether_ioctl(ifp, command, data); Modified: head/sys/dev/ixgbe/ixgbe.h == --- head/sys/dev/ixgbe/ixgbe.h Fri Nov 30 22:38:42 2012(r243717) +++ head/sys/dev/ixgbe/ixgbe.h Fri Nov 30 22:41:32 2012(r243718) @@ -199,6 +199,9 @@ #define IXGBE_BR_SIZE 4096 #define IXGBE_QUEUE_MIN_FREE 32 +/* IOCTL define to gather SFP+ Diagnostic data */ +#define SIOCGI2C SIOCGIFGENERIC + /* Offload bits in mbuf flag */ #if __FreeBSD_version >= 80 #define CSUM_OFFLOAD (CSUM_IP|CSUM_TCP|CSUM_UDP|CSUM_SCTP) @@ -241,6 +244,13 @@ typedef struct _ixgbe_vendor_info_t { unsigned intindex; } ixgbe_vendor_info_t; +/* This is used to get SFP+ module data */ +struct ixgbe_i2c_req { +u8 dev_addr; +u8 offset; +u8 len; +u8 data[8]; +}; struct ixgbe_tx_buf { u32 eop_index; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r243716 - head/sys/dev/ixgbe
Author: jfv Date: Fri Nov 30 22:33:21 2012 New Revision: 243716 URL: http://svnweb.freebsd.org/changeset/base/243716 Log: Patch #2 - remove OACTIVE and DEPLETED notions from the multiqueue code, this functionality has proven to be more trouble than it was worth. Thanks to Gleb for a second critical look over my code and help in the patches! Modified: head/sys/dev/ixgbe/ixgbe.c head/sys/dev/ixgbe/ixgbe.h Modified: head/sys/dev/ixgbe/ixgbe.c == --- head/sys/dev/ixgbe/ixgbe.c Fri Nov 30 22:23:23 2012(r243715) +++ head/sys/dev/ixgbe/ixgbe.c Fri Nov 30 22:33:21 2012(r243716) @@ -47,7 +47,7 @@ int ixgbe_display_debug_stat /* * Driver version */ -char ixgbe_driver_version[] = "2.5.0 - 1"; +char ixgbe_driver_version[] = "2.5.0 - 2"; /* * PCI Device ID Table @@ -736,17 +736,14 @@ ixgbe_start_locked(struct tx_ring *txr, IXGBE_TX_LOCK_ASSERT(txr); - if ((ifp->if_drv_flags & (IFF_DRV_RUNNING|IFF_DRV_OACTIVE)) != - IFF_DRV_RUNNING) + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) return; if (!adapter->link_active) return; while (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { - if (txr->tx_avail <= IXGBE_QUEUE_MIN_FREE) { - txr->queue_status |= IXGBE_QUEUE_DEPLETED; + if (txr->tx_avail <= IXGBE_QUEUE_MIN_FREE) break; -} IFQ_DRV_DEQUEUE(&ifp->if_snd, m_head); if (m_head == NULL) @@ -755,8 +752,6 @@ ixgbe_start_locked(struct tx_ring *txr, if (ixgbe_xmit(txr, &m_head)) { if (m_head != NULL) IFQ_DRV_PREPEND(&ifp->if_snd, m_head); - if (txr->tx_avail <= IXGBE_QUEUE_MIN_FREE) - txr->queue_status |= IXGBE_QUEUE_DEPLETED; break; } /* Send a copy of the frame to the BPF listener */ @@ -811,8 +806,7 @@ ixgbe_mq_start(struct ifnet *ifp, struct txr = &adapter->tx_rings[i]; que = &adapter->queues[i]; - if (((txr->queue_status & IXGBE_QUEUE_DEPLETED) == 0) && - IXGBE_TX_TRYLOCK(txr)) { + if (IXGBE_TX_TRYLOCK(txr)) { err = ixgbe_mq_start_locked(ifp, txr, m); IXGBE_TX_UNLOCK(txr); } else { @@ -831,7 +825,6 @@ ixgbe_mq_start_locked(struct ifnet *ifp, int enqueued, err = 0; if (((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) || - (txr->queue_status == IXGBE_QUEUE_DEPLETED) || adapter->link_active == 0) { if (m != NULL) err = drbr_enqueue(ifp, txr->br, m); @@ -862,16 +855,12 @@ ixgbe_mq_start_locked(struct ifnet *ifp, break; if (txr->tx_avail < IXGBE_TX_OP_THRESHOLD) ixgbe_txeof(txr); - if (txr->tx_avail < IXGBE_TX_OP_THRESHOLD) { - txr->queue_status |= IXGBE_QUEUE_DEPLETED; - break; - } next = drbr_dequeue(ifp, txr->br); } if (enqueued > 0) { /* Set watchdog on */ - txr->queue_status |= IXGBE_QUEUE_WORKING; + txr->queue_status = IXGBE_QUEUE_WORKING; txr->watchdog_time = ticks; } @@ -1316,7 +1305,6 @@ ixgbe_init_locked(struct adapter *adapte /* Now inform the stack we're ready */ ifp->if_drv_flags |= IFF_DRV_RUNNING; - ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; return; } @@ -2018,13 +2006,11 @@ ixgbe_local_timer(void *arg) { struct adapter *adapter = arg; device_tdev = adapter->dev; - struct ifnet*ifp = adapter->ifp; struct ix_queue *que = adapter->queues; struct tx_ring *txr = adapter->tx_rings; - int hung, busy, paused; + int hung = 0, paused = 0; mtx_assert(&adapter->core_mtx, MA_OWNED); - hung = busy = paused = 0; /* Check for pluggable optics */ if (adapter->sfp_probe) @@ -2046,23 +2032,15 @@ ixgbe_local_timer(void *arg) ** - watchdog only if all queues show hung */ for (int i = 0; i < adapter->num_queues; i++, que++, txr++) { - if ((txr->queue_status & IXGBE_QUEUE_HUNG) && + if ((txr->queue_status == IXGBE_QUEUE_HUNG) && (paused == 0)) ++hung; - if (txr->queue_status & IXGBE_QUEUE_DEPLETED) - ++busy; - if ((txr->queue_s
svn commit: r243714 - in head/sys/dev: ixgbe netmap
Author: jfv Date: Fri Nov 30 22:19:18 2012 New Revision: 243714 URL: http://svnweb.freebsd.org/changeset/base/243714 Log: First of a series of 11 patches leading to new ixgbe version 2.5.0 This removes the header split and supporting code from the driver. Modified: head/sys/dev/ixgbe/ixgbe.c head/sys/dev/ixgbe/ixgbe.h head/sys/dev/netmap/ixgbe_netmap.h Modified: head/sys/dev/ixgbe/ixgbe.c == --- head/sys/dev/ixgbe/ixgbe.c Fri Nov 30 20:50:34 2012(r243713) +++ head/sys/dev/ixgbe/ixgbe.c Fri Nov 30 22:19:18 2012(r243714) @@ -47,7 +47,7 @@ int ixgbe_display_debug_stat /* * Driver version */ -char ixgbe_driver_version[] = "2.4.11"; +char ixgbe_driver_version[] = "2.5.0 - 1"; /* * PCI Device ID Table @@ -266,15 +266,6 @@ static int ixgbe_enable_msix = 1; TUNABLE_INT("hw.ixgbe.enable_msix", &ixgbe_enable_msix); /* - * Header split: this causes the hardware to DMA - * the header into a separate mbuf from the payload, - * it can be a performance win in some workloads, but - * in others it actually hurts, its off by default. - */ -static int ixgbe_header_split = FALSE; -TUNABLE_INT("hw.ixgbe.hdr_split", &ixgbe_header_split); - -/* * Number of Queues, can be set to 0, * it then autoconfigures based on the * number of cpus with a max of 8. This @@ -1117,7 +1108,7 @@ ixgbe_init_locked(struct adapter *adapte /* ** Determine the correct mbuf pool - ** for doing jumbo/headersplit + ** for doing jumbo frames */ if (adapter->max_frame_size <= 2048) adapter->rx_mbuf_sz = MCLBYTES; @@ -3728,10 +3719,9 @@ static void ixgbe_refresh_mbufs(struct rx_ring *rxr, int limit) { struct adapter *adapter = rxr->adapter; - bus_dma_segment_t hseg[1]; - bus_dma_segment_t pseg[1]; + bus_dma_segment_t seg[1]; struct ixgbe_rx_buf *rxbuf; - struct mbuf *mh, *mp; + struct mbuf *mp; int i, j, nsegs, error; boolrefreshed = FALSE; @@ -3742,43 +3732,13 @@ ixgbe_refresh_mbufs(struct rx_ring *rxr, while (j != limit) { rxbuf = &rxr->rx_buffers[i]; - if (rxr->hdr_split == FALSE) - goto no_split; - - if (rxbuf->m_head == NULL) { - mh = m_gethdr(M_DONTWAIT, MT_DATA); - if (mh == NULL) - goto update; - } else - mh = rxbuf->m_head; - - mh->m_pkthdr.len = mh->m_len = MHLEN; - mh->m_len = MHLEN; - mh->m_flags |= M_PKTHDR; - /* Get the memory mapping */ - error = bus_dmamap_load_mbuf_sg(rxr->htag, - rxbuf->hmap, mh, hseg, &nsegs, BUS_DMA_NOWAIT); - if (error != 0) { - printf("Refresh mbufs: hdr dmamap load" - " failure - %d\n", error); - m_free(mh); - rxbuf->m_head = NULL; - goto update; - } - rxbuf->m_head = mh; - bus_dmamap_sync(rxr->htag, rxbuf->hmap, - BUS_DMASYNC_PREREAD); - rxr->rx_base[i].read.hdr_addr = - htole64(hseg[0].ds_addr); - -no_split: - if (rxbuf->m_pack == NULL) { + if (rxbuf->buf == NULL) { mp = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, adapter->rx_mbuf_sz); if (mp == NULL) goto update; } else - mp = rxbuf->m_pack; + mp = rxbuf->buf; mp->m_pkthdr.len = mp->m_len = adapter->rx_mbuf_sz; @@ -3787,22 +3747,22 @@ no_split: */ if ((rxbuf->flags & IXGBE_RX_COPY) == 0) { /* Get the memory mapping */ - error = bus_dmamap_load_mbuf_sg(rxr->ptag, - rxbuf->pmap, mp, pseg, &nsegs, BUS_DMA_NOWAIT); + error = bus_dmamap_load_mbuf_sg(rxr->tag, + rxbuf->map, mp, seg, &nsegs, BUS_DMA_NOWAIT); if (error != 0) { printf("Refresh mbufs: payload dmamap load" " failure - %d\n", error); m_free(mp); - rxbuf->m_pack = NULL; + rxbuf->buf = NULL; goto upd
svn commit: r242421 - head/sys/dev/ixgbe
Author: jfv Date: Wed Oct 31 23:50:36 2012 New Revision: 242421 URL: http://svn.freebsd.org/changeset/base/242421 Log: A few important fixes: - Testing TSO6 has led me to discover that HW RSC is a problematic feature, it is ONLY designed to work with IPv4 in the first place, and if IP forwarding is done it can't be disabled as LRO in the stack, also initial testing we've done at Intel shows an equal performance using TSO[46] on the TX and LRO on RX, if you ran older code on 82599 or later hardware you actually could have detrimental performance for this reason. So I am disabling the feature by default and all our adapters will now use LRO instead. - If you have flow control off and multiple queues it was possible when the buffer of one queue becomes full that all RX movement is stalled, to eliminate this problem a feature bit is now set that will allow packets to be dropped when full rather than stall. Note, the default is to have flow control on, and this keeps this from happening. - Because of the recent fixes in the stack, LRO is now auto-disabled when problematic, so I have decided to enable it by default in the capabilities in the driver. - There are some 1G modules used by some customers, a couple small tweaks to properly support those in the media code. - A note: we have now done some testing of TSO6 and using LRO with IPv6 and it all works great!! Seeing line rate in both directions in best cases. Thanks bz for your excellent work!! Modified: head/sys/dev/ixgbe/ixgbe.c Modified: head/sys/dev/ixgbe/ixgbe.c == --- head/sys/dev/ixgbe/ixgbe.c Wed Oct 31 23:44:19 2012(r242420) +++ head/sys/dev/ixgbe/ixgbe.c Wed Oct 31 23:50:36 2012(r242421) @@ -47,7 +47,7 @@ int ixgbe_display_debug_stat /* * Driver version */ -char ixgbe_driver_version[] = "2.4.8"; +char ixgbe_driver_version[] = "2.4.11"; /* * PCI Device ID Table @@ -181,6 +181,9 @@ static __inline void ixgbe_rx_discard(st static __inline void ixgbe_rx_input(struct rx_ring *, struct ifnet *, struct mbuf *, u32); +static voidixgbe_enable_rx_drop(struct adapter *); +static voidixgbe_disable_rx_drop(struct adapter *); + /* Support for pluggable optic modules */ static boolixgbe_sfp_probe(struct adapter *); static voidixgbe_setup_optics(struct adapter *); @@ -292,6 +295,20 @@ TUNABLE_INT("hw.ixgbe.txd", &ixgbe_txd); static int ixgbe_rxd = PERFORM_RXD; TUNABLE_INT("hw.ixgbe.rxd", &ixgbe_rxd); +/* +** HW RSC control: +** this feature only works with +** IPv4, and only on 82599 and later. +** Also this will cause IP forwarding to +** fail and that can't be controlled by +** the stack as LRO can. For all these +** reasons I've deemed it best to leave +** this off and not bother with a tuneable +** interface, this would need to be compiled +** to enable. +*/ +static bool ixgbe_rsc_enable = FALSE; + /* Keep running tab on them for sanity check */ static int ixgbe_total_ports; @@ -1667,7 +1684,7 @@ ixgbe_media_status(struct ifnet * ifp, s ifmr->ifm_active |= IFM_100_TX | IFM_FDX; break; case IXGBE_LINK_SPEED_1GB_FULL: - ifmr->ifm_active |= IFM_1000_T | IFM_FDX; + ifmr->ifm_active |= adapter->optics | IFM_FDX; break; case IXGBE_LINK_SPEED_10GB_FULL: ifmr->ifm_active |= adapter->optics | IFM_FDX; @@ -2035,7 +2052,6 @@ ixgbe_local_timer(void *arg) /* ** Check the TX queues status - ** - central locked handling of OACTIVE ** - watchdog only if all queues show hung */ for (int i = 0; i < adapter->num_queues; i++, que++, txr++) { @@ -2210,6 +2226,11 @@ ixgbe_setup_optics(struct adapter *adapt return; } + if (layer & IXGBE_PHYSICAL_LAYER_1000BASE_SX) { + adapter->optics = IFM_1000_SX; + return; + } + if (layer & (IXGBE_PHYSICAL_LAYER_10GBASE_LR | IXGBE_PHYSICAL_LAYER_10GBASE_LRM)) { adapter->optics = IFM_10G_LR; @@ -2617,14 +2638,12 @@ ixgbe_setup_interface(device_t dev, stru ifp->if_capabilities |= IFCAP_HWCSUM | IFCAP_TSO | IFCAP_VLAN_HWCSUM; ifp->if_capabilities |= IFCAP_JUMBO_MTU; + ifp->if_capabilities |= IFCAP_LRO; ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_HWTSO | IFCAP_VLAN_MTU;
svn commit: r242403 - head/sys/dev/ixgbe
Author: jfv Date: Wed Oct 31 18:16:42 2012 New Revision: 242403 URL: http://svn.freebsd.org/changeset/base/242403 Log: Correct code that was lost somewhere in the past, this was designed to keep duplicate null vlan tags from being added. When doing vlans purely via the switch this problem will occur. Reported by external customer. Modified: head/sys/dev/ixgbe/ixgbe.c Modified: head/sys/dev/ixgbe/ixgbe.c == --- head/sys/dev/ixgbe/ixgbe.c Wed Oct 31 18:07:18 2012(r242402) +++ head/sys/dev/ixgbe/ixgbe.c Wed Oct 31 18:16:42 2012(r242403) @@ -4688,7 +4688,7 @@ ixgbe_rxeof(struct ix_queue *que, int co /* first desc of a non-ps chain */ sendmp->m_flags |= M_PKTHDR; sendmp->m_pkthdr.len = mp->m_len; - if (staterr & IXGBE_RXD_STAT_VP) { +if (vtag) { sendmp->m_pkthdr.ether_vtag = vtag; sendmp->m_flags |= M_VLANTAG; } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"