Up to [cvs.NetBSD.org] / src / sys / dev / pci / ixgbe
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
Pull up the following revisions, requested by msaitoh in ticket #1796: sys/dev/pci/files.pci 1.442 sys/dev/pci/ixgbe/ix_txrx.c 1.99-1.100 sys/dev/pci/ixgbe/ixgbe.c 1.320-1.324 via patch sys/dev/pci/ixgbe/ixgbe_82598.c 1.19 sys/dev/pci/ixgbe/ixgbe_api.c 1.28 sys/dev/pci/ixgbe/ixgbe_common.c 1.43 sys/dev/pci/ixgbe/ixgbe_netbsd.h 1.17 sys/dev/pci/ixgbe/ixv.c 1.183 - Add an option for Tx to use deferred softint regardless of whether can get txq lock or not. It's off by default. - Call txeof first, then rxeof for the consistency. - Make three "Unsupported SFP+ module..." messages the same. - KNF. Modify comment. Fix typo.
Pull up the following revisions, requested by msaitoh in ticket #1579: sys/dev/pci/files.pci 1.442 sys/dev/pci/ixgbe/ix_txrx.c 1.99-1.100 sys/dev/pci/ixgbe/ixgbe.c 1.320-1.324 via patch sys/dev/pci/ixgbe/ixgbe_82598.c 1.19 sys/dev/pci/ixgbe/ixgbe_api.c 1.28 sys/dev/pci/ixgbe/ixgbe_common.c 1.43 sys/dev/pci/ixgbe/ixgbe_netbsd.h 1.17 sys/dev/pci/ixgbe/ixv.c 1.183 - Add an option for Tx to use deferred softint regardless of whether can get txq lock or not. It's off by default. - Call txeof first, then rxeof for the consistency. - Make three "Unsupported SFP+ module..." messages the same. - KNF. Modify comment. Fix typo.
ixg(4) add an option for Tx to use deferred softint regardless of whether can get txq lock or not. That imporve (7%) and stabilize throughput. But that can cause latency degradation, so off by default. ok'ed by msaitoh@n.o.
Pull up the following revisions, requestes by msaitoh in ticket #1746: sys/dev/pci/ixgbe/ix_txrx.c 1.95 sys/dev/pci/ixgbe/ixgbe.c 1.261,1.263, 1.265-1.268,1.273, 1.275-1.277,1.305, 1.312, 1.316-1.321 via patch sys/dev/pci/ixgbe/ixgbe.h 1.85 via patch sys/dev/pci/ixgbe/ixgbe_mbx.c 1.19 sys/dev/pci/ixgbe/ixgbe_netbsd.h 1.15-1.16 sys/dev/pci/ixgbe/ixgbe_type.h 1.46-1.47 sys/dev/pci/ixgbe/ixgbe_x550.c 1.26 sys/dev/pci/ixgbe/ixv.c 1.178,1.182 via patch - Reduce code duplication between ixgbe_msix_admin() and ixgbe_legacy_irq(). - Add missing code which was not in ixgbe_msix_admin() from ixgbe_legacy_irq() and vice versa. - Reorder code. - Disable/enable the OTHER interrupts correctly. - Don't return in the middle of ixgbe_msix_admin() when an flow director reinit failed. NetBSD currently doesn't support flow director, so this is not a real bug. - Print ECC, PHY and temp error log using with ratecheck(). - Correctly re-enable queue interrupt in ixgbe_legacy_irq(). - Correctly enter the recovery mode. - No functional change: - Add some debug printf()s. - Don't use "more" flag for simplify. - Use macro. - Fix typos in comment. - KNF.
Pull up the following revisions (requested by msaitoh in ticket #1424): sys/dev/pci/ixgbe/ix_txrx.c 1.95 sys/dev/pci/ixgbe/ixgbe.c 1.305 via patch sys/dev/pci/ixgbe/ixgbe_mbx.c 1.19 sys/dev/pci/ixgbe/ixgbe_netbsd.h 1.15-1.16 sys/dev/pci/ixgbe/ixv.c 1.178 via patch Use atomic_{load,store}_relaxed() for event counters.
Fix compile error for non __HAVE_ATOMIC64_LOADSTORE arch.
Use atomic_{load,store}_relaxed() for event counters.
Pull up the following (all via patch), requested by msaitoh in ticket #1696: sysdev/pci/ixgbe/ixgbe.c 1.252, 1.280-1.283, 1.286-1.287, 1.289-1.290 via patch sysdev/pci/ixgbe/ixgbe.h 1.73, 1.76-1.80 via patch sysdev/pci/ixgbe/ix_txrx.c 1.68-1.93 sysdev/pci/ixgbe/ixv.c 1.153, 1.157-1.161, 1.163-1.166 via patch sysdev/pci/ixgbe/if_bypass.c 1.7-1.9 sysdev/pci/ixgbe/if_fdir.c 1.4-1.5 sysdev/pci/ixgbe/if_sriov.c 1.10-1.11 sysdev/pci/ixgbe/ixgbe_82598.c 1.16 sysdev/pci/ixgbe/ixgbe_82599.c 1.23 sysdev/pci/ixgbe/ixgbe_api.c 1.25 sysdev/pci/ixgbe/ixgbe_bypass.h 1.2 sysdev/pci/ixgbe/ixgbe_common.c 1.30-1.33 sysdev/pci/ixgbe/ixgbe_dcb.c 1.10-1.11 sysdev/pci/ixgbe/ixgbe_dcb.h 1.7 sysdev/pci/ixgbe/ixgbe_dcb_82598.c 1.8-1.9 sysdev/pci/ixgbe/ixgbe_dcb_82598.h 1.7 sysdev/pci/ixgbe/ixgbe_dcb_82599.c 1.8-1.9 sysdev/pci/ixgbe/ixgbe_dcb_82599.h 1.7 sysdev/pci/ixgbe/ixgbe_fdir.h 1.3 sysdev/pci/ixgbe/ixgbe_features.h 1.3 sysdev/pci/ixgbe/ixgbe_mbx.c 1.12 sysdev/pci/ixgbe/ixgbe_netbsd.c 1.16-1.17 sysdev/pci/ixgbe/ixgbe_netbsd.h 1.13-1.14 sysdev/pci/ixgbe/ixgbe_netmap.c 1.3-1.4 sysdev/pci/ixgbe/ixgbe_netmap.h 1.2 sysdev/pci/ixgbe/ixgbe_osdep.c 1.7 sysdev/pci/ixgbe/ixgbe_osdep.h 1.29-1.30 sysdev/pci/ixgbe/ixgbe_phy.c 1.24 sysdev/pci/ixgbe/ixgbe_rss.h 1.5 sysdev/pci/ixgbe/ixgbe_sriov.h 1.4 sysdev/pci/ixgbe/ixgbe_type.h 1.49 sysdev/pci/ixgbe/ixgbe_vf.c 1.27 sysdev/pci/ixgbe/ixgbe_x540.c 1.18-1.19 sysdev/pci/ixgbe/ixgbe_x540.h 1.9 sysdev/pci/ixgbe/ixgbe_x550.c 1.19-1.20 sysdev/pci/ixgbe/ixgbe_x550.h 1.6 sysdev/pci/files.pci 1.438 share/man/man4/ixg.4 1.15 share/man/man4/ixv.4 1.8 - Use MCLGET() instead of homegrown cluster (jcl) allocation mechanism. Before this commit, resource shortage was easily occurred because the total number of the clusters is small. - Improve performance: - Use m_adj(ETHER_ALIGN) more. - Sprinkle __predict_false() in the RX path. - Don't pre-allocate a cluster for RXCOPY case to improve short packet's performance. - Call bus_dmamap_unload(9) via ixgbe_dmamap_unload(), before freeing DMA buffer. Also, when the buffer is already freed, do not call bus_dmamap_unload(9) (no resource leaks with this change). This change is required to make ixg(4) work on alpha. - Keep m_len and m_pkthdr.len consistent to prevent panic on arm. - Fix panic when bus_dmamap_load_mbuf() failed in ixgbe_setup_receive_ring(). - Added BUS_DMA_COHERENT flag to bus_dmamem_map() to improve stability on aarch64. - Use uint64_t instead of bus_addr_t for the TX descriptor's buffer address. At least, this change is required for macppc (sizeof(bus_addr_t) == 4) to make TX work. - Fix little-endian dependence. - Set rxr->next_to_refresh correctly in ixgbe_setup_receive_ring(). - Refresh unrefreshed descriptors' buffers correctly. - Don't call bus_dmamap_sync with rx_mbuf_sz(== MCLBYTES) to prevent panic. - Save the discard_multidesc state to not to forget the state by exiting rxeof(). - Add missing increment of no_mbuf error counter. - Don't increment no_mbuf evcnt(9) when discarding multi-descriptor packet. - ixv: Modify error message to sync with ixgbe.c - Print the error value of ixgbe_reset_hw() for debugging. - Remove extra unlock/lock processing around if_percpuq_enqueue(). - Refactor rxr->next_to_check updating. - Add new sysctl "rx_copy_len". - Add a new sysctl to read rxr->next_to_refresh. - Print error number when error occurred. - Rename ix{gbe,v}_stop() with ix{gbe,v}_stop_locked(). No functional change. - Don't use fixed value. - Comment out flow director processing in fast path. - Add missing NetBSD RCS IDs and __KERNEL_RCSID()s. - KNF. - Fix typos.
Pull up the following (via patch), requested by msaitoh in ticket #1346: sys/dev/pci/ixgbe/ixgbe.c 1.252, 1.280-1.283, 1.286-1.287, 1.289-1.290 via patch sys/dev/pci/ixgbe/ixgbe.h 1.73, 1.76-1.80 via patch sys/dev/pci/ixgbe/ix_txrx.c 1.68-1.93 sys/dev/pci/ixgbe/ixv.c 1.153, 1.157-1.161, 1.163-1.166 via patch sys/dev/pci/ixgbe/if_bypass.c 1.7-1.9 sys/dev/pci/ixgbe/if_fdir.c 1.4-1.5 sys/dev/pci/ixgbe/if_sriov.c 1.10-1.11 sys/dev/pci/ixgbe/ixgbe_82598.c 1.16 sys/dev/pci/ixgbe/ixgbe_82599.c 1.23 sys/dev/pci/ixgbe/ixgbe_api.c 1.25 sys/dev/pci/ixgbe/ixgbe_bypass.h 1.2 sys/dev/pci/ixgbe/ixgbe_common.c 1.30-1.33 sys/dev/pci/ixgbe/ixgbe_dcb.c 1.10-1.11 sys/dev/pci/ixgbe/ixgbe_dcb.h 1.7 sys/dev/pci/ixgbe/ixgbe_dcb_82598.c 1.8-1.9 sys/dev/pci/ixgbe/ixgbe_dcb_82598.h 1.7 sys/dev/pci/ixgbe/ixgbe_dcb_82599.c 1.8-1.9 sys/dev/pci/ixgbe/ixgbe_dcb_82599.h 1.7 sys/dev/pci/ixgbe/ixgbe_fdir.h 1.3 sys/dev/pci/ixgbe/ixgbe_features.h 1.3 sys/dev/pci/ixgbe/ixgbe_mbx.c 1.12 sys/dev/pci/ixgbe/ixgbe_netbsd.c 1.13, 1.16-1.17 sys/dev/pci/ixgbe/ixgbe_netbsd.h 1.13-1.14 sys/dev/pci/ixgbe/ixgbe_netmap.c 1.3-1.4 sys/dev/pci/ixgbe/ixgbe_netmap.h 1.2 sys/dev/pci/ixgbe/ixgbe_osdep.c 1.7 sys/dev/pci/ixgbe/ixgbe_osdep.h 1.29-1.30 sys/dev/pci/ixgbe/ixgbe_phy.c 1.24 sys/dev/pci/ixgbe/ixgbe_rss.h 1.5 sys/dev/pci/ixgbe/ixgbe_sriov.h 1.4 sys/dev/pci/ixgbe/ixgbe_type.h 1.49 sys/dev/pci/ixgbe/ixgbe_vf.c 1.27 sys/dev/pci/ixgbe/ixgbe_x540.c 1.18-1.19 sys/dev/pci/ixgbe/ixgbe_x540.h 1.9 sys/dev/pci/ixgbe/ixgbe_x550.c 1.19-1.20 sys/dev/pci/ixgbe/ixgbe_x550.h 1.6 sys/dev/pci/files.pci 1.438 share/man/man4/ixg.4 1.15 share/man/man4/ixv.4 1.8 - Use MCLGET() instead of homegrown cluster (jcl) allocation mechanism. Before this commit, resource shortage was easily occurred because the total number of the clusters is small. - Improve performance: - Use m_adj(ETHER_ALIGN) more. - Sprinkle __predict_false() in the RX path. - Don't pre-allocate a cluster for RXCOPY case to improve short packet's performance. - Call bus_dmamap_unload(9) via ixgbe_dmamap_unload(), before freeing DMA buffer. Also, when the buffer is already freed, do not call bus_dmamap_unload(9) (no resource leaks with this change). This change is required to make ixg(4) work on alpha. - Keep m_len and m_pkthdr.len consistent to prevent panic on arm. - Fix panic when bus_dmamap_load_mbuf() failed in ixgbe_setup_receive_ring(). - Added BUS_DMA_COHERENT flag to bus_dmamem_map() to improve stability on aarch64. - Use uint64_t instead of bus_addr_t for the TX descriptor's buffer address. At least, this change is required for macppc (sizeof(bus_addr_t) == 4) to make TX work. - Fix little-endian dependence. - Set rxr->next_to_refresh correctly in ixgbe_setup_receive_ring(). - Refresh unrefreshed descriptors' buffers correctly. - Don't call bus_dmamap_sync with rx_mbuf_sz(== MCLBYTES) to prevent panic. - Save the discard_multidesc state to not to forget the state by exiting rxeof(). - Add missing increment of no_mbuf error counter. - Don't increment no_mbuf evcnt(9) when discarding multi-descriptor packet. - ixv: Modify error message to sync with ixgbe.c - Print the error value of ixgbe_reset_hw() for debugging. - Remove extra unlock/lock processing around if_percpuq_enqueue(). - Refactor rxr->next_to_check updating. - Add new sysctl "rx_copy_len". - Add a new sysctl to read rxr->next_to_refresh. - Print error number when error occurred. - Rename ix{gbe,v}_stop() with ix{gbe,v}_stop_locked(). No functional change. - Don't use fixed value. - Comment out flow director processing in fast path. - Add missing NetBSD RCS IDs and __KERNEL_RCSID()s. - KNF. - Fix typos.
Use MCLGET() instead of homegrown cluster (jcl) allocation mechanism. - Before this commit, resource shortage was easily occurred because the total number of the clusters is small. - Reviewed by knakahara and ryo.
Sync w/ HEAD.
sync with head
No functional change: - Add NetBSD RCS IDs. - KNF.
Sync with HEAD.
Pull up the following (all via patch), requested by msaitoh in ticket #1663: sys/dev/pci/ixgbe/ixgbe.c 1.259, 1.278-1.279 sys/dev/pci/ixgbe/ixgbe.h 1.75 sys/dev/pci/ixgbe/ixgbe_netbsd.h 1.12 sys/dev/pci/ixgbe/ixgbe_vf.c 1.24-1.26 sys/dev/pci/ixgbe/ixgbe_x550.c 1.17 sys/dev/pci/ixgbe/ixv.c 1.155-1.156 sys/dev/pci/ixgbe/ix_txrx.c 1.64-67 sys/dev/pci/files.pci 1.436 share/man/man4/ixg.4 1.13-1.14 share/man/man4/ixv.4 1.3, 1.6-1.7 - Fix a problem that the RX path stalled when the mbuf cluster is exhausted. - Modify some parameters to reduce packet dropping. See also the manual's OPTIONS section for the detail. - ixv(4): The max number of queue(pair) is not 7 but 8. Correctly reset the hardware. - Add "TX " to "Queue No Descriptor Available" evcnt(9) name to make it more understandable. - Fix a bug that some advertise speeds can't be set with hw.ixgN.advertise_speed if both 2.5G and 5G are set. Fix the error message, too. - Fix typo in comment or debug message.
Pull up the following (all via patch) requested by msaitoh in ticket #1231: sys/dev/pci/ixgbe/ixgbe.c 1.259, 1.278-1.279 sys/dev/pci/ixgbe/ixgbe.h 1.75 sys/dev/pci/ixgbe/ixgbe_netbsd.h 1.12 sys/dev/pci/ixgbe/ixgbe_vf.c 1.24-1.26 sys/dev/pci/ixgbe/ixgbe_x550.c 1.17 sys/dev/pci/ixgbe/ixv.c 1.155-1.156 sys/dev/pci/ixgbe/ix_txrx.c 1.64-67 sys/dev/pci/files.pci 1.436 share/man/man4/ixg.4 1.13-1.14 share/man/man4/ixv.4 1.6-1.7 - Fix a problem that the RX path stalled when the mbuf cluster is exhausted. - Modify some parameters to reduce packet dropping. See also the manual's OPTIONS section for the detail. - ixv(4): The max number of queue(pair) is not 7 but 8. Correctly reset the hardware. - Add "TX " to "Queue No Descriptor Available" evcnt(9) name to make it more understandable. - Fix a bug that some advertise speeds can't be set with hw.ixgN.advertise_speed if both 2.5G and 5G are set. Fix the error message, too. - Fix typo in comment or debug message.
Modify some parameters to reduce packet dropping. - Background: ixgbe doesn't use common MCLGET() interface and use the driver specific cluster allocation mechanism (jcl). The cluster is pre-allocated with a fixed number and the current number per queue is num_rx_desc * 2 (2048*2=4096). It's too small. It also has a problem that the max length of the pcq which is used in the TX path is big (4096). Example: 100M <----- [ixg0 ixg1] <----- 1G 2048 TX descs <--- 4096 pcqs <---- 2048 RX descs If a machine forwards a traffic from 1G interface to 100M interface, It would require 2048+4096+2048=8192 descriptors, but the current number is 2048*2=4096. It's too small. Even if the both interface's link speed is the same and only small number of packet is queued in the pcq, 4096 jcl is small because 2048(RX)+TX(2048)=4096. If jcl is exhausted, not only forwarding from ixg1 to ixg0 is dropped, but also another forwarding path from ixg1 to another interface(e.g. wm0) is also dropped. Sockets also queue packets, so if a lot of sockets are used and/or a socket buffer size is changed to bigger one, it'll also become a problem. If the jcl is exhausted, evcnt(9) counter "ixgX qY Rx no jumbo mbuf" is incremented. Example: vmstat -ev | grep ixg1 | grep "no jumbo" ixg1 q0 Rx no jumbo mbuf 0 0 misc ixg1 q1 Rx no jumbo mbuf 0 0 misc ixg1 q2 Rx no jumbo mbuf 141326 0 misc ixg1 q3 Rx no jumbo mbuf 0 0 misc - To solve this problem: - Add new config parameter IXGBE_JCLNUM_MULTI and set the default to 3 (2048 * 3). The minimum number is 2. The total number of jcl per queue is available with hw.ixgN.num_jcl_per_queue sysctl. - Reduce the max length of the pcq() which is used in the TX path from 4096 to 2048. - Reviewed by knakahara@ and ozaki-r@. - TODO: Use MCLGET().
Pull up the following revisions (via patch), requested by msaitoh in ticket #1301: sys/dev/pci/ixgbe/if_sriov.c 1.5-1.6 sys/dev/pci/ixgbe/ix_txrx.c 1.53-1.54 sys/dev/pci/ixgbe/ixgbe_x550.h 1.5 sys/dev/pci/ixgbe/ixgbe.c 1.169-1.170,1.176,1.179,1.181,1.185-1.186,1.188-1.192 via patch sys/dev/pci/ixgbe/ixgbe.h 1.53,1.55 sys/dev/pci/ixgbe/ixgbe_82599.c 1.21 sys/dev/pci/ixgbe/ixgbe_api.c 1.22-1.23 sys/dev/pci/ixgbe/ixgbe_api.h 1.14-1.15 sys/dev/pci/ixgbe/ixgbe_x550.c 1.14-1.15 sys/dev/pci/ixgbe/ixgbe_common.c 1.23 sys/dev/pci/ixgbe/ixgbe_common.h 1.14 sys/dev/pci/ixgbe/ixgbe_mbx.c 1.11 sys/dev/pci/ixgbe/ixgbe_mbx.h 1.14 sys/dev/pci/ixgbe/ixgbe_netmap.c 1.2 sys/dev/pci/ixgbe/ixgbe_features.h 1.2 sys/dev/pci/ixgbe/ixgbe_netbsd.c 1.9 sys/dev/pci/ixgbe/ixgbe_netbsd.h 1.9-1.10 sys/dev/pci/ixgbe/ixgbe_phy.c 1.18 sys/dev/pci/ixgbe/ixgbe_type.h 1.37,1.39-1.40 sys/dev/pci/ixgbe/ixgbe_vf.c 1.18 sys/dev/pci/ixgbe/ixv.c 1.112-1.114,1.117,1.119 via patch Sync ixgbe up to 20190717 except ETHERCAP or ixv's VLAN stuff: - Add firmware recovery mode for X550, X550A(Xeon D) and X550EM(C3000). - Remove IXGBE_DEV_ID_82599_LS(0x154f) support again. - On X550EMU, use ixgbe_identify_sfp_module_X550em() instead of ixgbe_identify_module_generic(). ixgbe_identify_sfp_module_X550em() has extra check (e.g. exclude 1G copper). - It's not required to calculate unused queues' statistics. - Remove ETHERCAP_VLAN_HWFILTER's definition. - Match 82598_BX(0x1508), 82599_KR(0x1517), 82599_SFP_EM(0x1507), X550EM_X_XFI(0x15b0), X550EM_A_QSFP(0x15ca) and X550EM_A_QSFP_N(0x15cc) - Add missing XFI support into ixgbe_get_link_capabilities_X550em(). - Other than IXGBE_VF_RESET should wait ACK, so use ixgbevf_write_msg_read_ack() instead of write_posted() in ixgbe_update_mc_addr_list_vf(). - When ixv_check_link() failed in the watchdog function, reset the interface. - Remove RXCSUM register modification in ixv_initialize_receive_units(). It seems it's not required. - Remove some debug printf in ixv_print_debug_info(). - Calculate vector's bit location correctly when the vector >= 31 in ixgbe_allocate_msix(). - Fix hung queue check when the queue number >= 31. - On ENETRESET case, not continue and quit the ifflags_cb() function because if_init() will do the same thing. - Fix bugs in unused code. - Fix typo in comment. - Fix typo in unused code. - Whitespace fixes. KNF.
Sync with HEAD
Centralize ETHER_ALIGN into net/if_ether.h. Note that this commit also changes if_upgt.c's ETHER_ALIGN from 0 to 2.
Sync with HEAD, resolve a few conflicts
Remove ETHERCAP_VLAN_HWFILTER.
Apply FreeBSD ix-3.3.6.tar.gz's change to NetBSD. Tested on C3000 and X550-T1, but not tested on Xeon D: - Add firmware recovery mode for X550, X550A(Xeon D) and X550EM (C3000): - FreeBSD always set IXGBE_FEATURE_RECOVERY_MODE without checking the NVM image version. We compare it against 2.0 to not to make new callout and not to call extra atomic operations. - In some FreeBSD's sysctl functions, atomic_load_acq_int() is called before a null pointer check. We call it after null pointer check. - Before calling atomic_load_acq_uint(), check adapter->feat_en flags to save atomic operation call. - We don't check recovery_mode in ixgbe_set_sysctl_value() because this function doesn't touch any hardware register. - NetBSD don't have FreeBSD's atomic_load_acq_int()-like function, so do it with membar_sync(). Thanks riastradh@ for the advice. - FreeBSD's ix-3.3.6 changed ixgbe_enable_aim from TRUE to FALSE, but we will keep it as TRUE because we have already fixed some bugs. - Remove IXGBE_DEV_ID_82599_LS(0x154f) support again. I don't know why. This was added in ix-3.2.18.tar.gz(NetBSD: ixgbe_82599.c rev. 1.20) and removed in ix-3.3.6.tar.gz. - On X550EMU, use ixgbe_identify_sfp_module_X550em() instead of ixgbe_identify_module_generic(). ixgbe_identify_sfp_module_X550em() has extra check (e.g. exclude 1G copper). - if_sriov.c's change doesn't affect to NetBSD because we don't support SR-IOV PF function.
Pull up following revision(s) (requested by msaitoh in ticket #864): sys/dev/pci/ixgbe/ix_txrx.c 1.40-1.47 (patch) sys/dev/pci/ixgbe/ixgbe.c 1.148,1.149,1.151, 1.152,1.154, 1.155,1.157-1.160 (patch) sys/dev/pci/ixgbe/ixgbe.h 1.43,1.44,1.46,1.49 (patch) sys/dev/pci/ixgbe/ixgbe_netbsd.c 1.7 (patch) sys/dev/pci/ixgbe/ixgbe_netbsd.h 1.8 (patch) sys/dev/pci/ixgbe/ixgbe_osdep.h 1.22 (patch) sys/dev/pci/ixgbe/ixv.c 1.100-1.104 (patch) sys/dev/pci/ixgbe/ixv.c 1.94,1.95,1.99 (patch) Remove unused structure entries. No functional change. - Remove unused IXGBE_FC_HI and IXGBE_FC_LO. The watermark of the flow control is automatically calculated from the size of the packet buffer. - Use ixgbe_eitr_write() when writing the EITR for the link interrupt like queue's EITR to write the register safely. This change is not relatively so important than queue's EITR because link's EITR is written in if_init(). - Don't free and reallocate bus_dmamem when it's not required. Currently, the watchdog timer is completely broken and never fire (it's from FreeBSD (pre iflib)). If the problem is fixed and watchdog fired, ixgbe_init() always calls ixgbe_jcl_reinit() and it causes panic. The reason is that ixgbe_local_timer1(it includes watchdog function) is softint and xgbe_jcl_reinit() calls bus_dmamem*() functions. bus_dmamem*() can't be called from interrupt context. One of the way to prevent panic is use worqueue for the timer, but it's not a small change. (I'll do it in future). Another way is not reallocate dmamem if it's not required. If both the MTU (rx_mbuf_sz in reality) and the number of RX descriptors are not changed, it's not required to call bus_dmamem_{unmap,free}(). Even if we use workque, this change save time of ixgbe_init(). I have a code to fix broken watchdog timer but it sometime causes watchdog timeout, so I don't commit it yet. - Count some register correctly: - QPRDC register is only for 82599 and newer. - Count IXGBE_QPRDC, PX{ON,OFF}{T,R}XC[NT]. The TQSMR register is not for receiving but for transmitting, so move the initialization from ixgbe_initialize_receive_units() to ixgbe_initialize_transmit_units(). No functional change. - Whitespace fix. No functional change. - Add rxd_nxck (Receive Descriptor next to check) read only sysctl. Don't check IFF_RUNNING in ixgbe_rxeof(). Doing break and leaving a deacriptor with DD bit is worse than just processing the entry. And it's also racy to check IFF_RUNNING in rxeof(). If you'd like to strictly obey IFF_RUNNING, it would be better to do it in the upper layer. Same as DragonFly (a part of 79251f5ebe4cf9dd2f3e6aed590e09d756d39922). Add "bool txr_no_space" for TX descriptor shortage. Use it like IFF_OACTIVE. Clear que->disabled_count in {ixgbe,ixv}_init_locked(). Without this, interrupt mask state and EIMS may mismatch and if_init doesn't recover from TX/RX stall problem. This change itself doesn't fix PR#53294. - Add hw.ixgN.debug sysctl. "sysctl -w hw.ixgN.debug=1" dumps some registers to console. - Constify several variables in ixgbe/ so that they land in .rodata (1038 bytes). - Don't call ixgbe_rearm_queues() in ixgbe_local_timer1(). ixgbe_enable_queue() and ixgbe_disable_queue() try to enable/disable queue interrupt safely. It has the internal counter. When a queue's MSI-X is received, ixgbe_msix_que() is called (IPL_NET). This function disable the queue's interrupt by ixgbe_disable_queue() and issues an softint. ixgbe_handle() queue is called by the softint (IPL_SOFTNET), process TX, RX and call ixgbe_enable_queue() at the end. ixgbe_local_timer1() is a callout and run always on CPU 0 (IPL_SOFTCLOCK). When ixgbe_rearm_queues() called, an MSI-X interrupt is issued for a specific queue. It may not CPU 0. If this interrupt's ixgbe_msix_que() is called and sofint_schedule() is called before the last sofint's softint_execute() is not called, the softint_schedule() fails because of SOFTINT_PENDING. It result in breaking ixgbe_{enable,disable}_queue()'s internal counter. ixgbe_local_timer1() is written not to call ixgbe_rearm_queues() if the interrupt is disabled, but it's called because of unknown bug or a race. One solution to avoid this problem is to not to use the internal counter, but it's little difficult. Another solution is stop using ixgbe_rearm_queues() at all. Essentially, ixgbe_rearm_queues() is not required (it was added in ixgbe.c rev. 1.43 (2016/12/01)). ixgbe_rearm_queues() helps for lost interrupt problem but I've never seen it other than ixgbe_rearm_queues() problem. XXX pullup-8.
Synch with HEAD
Don't free and reallocate bus_dmamem when it's not required. Currently, the watchdog timer is completely broken and never fire (it's from FreeBSD (pre iflib)). If the problem is fixed and watchdog fired, ixgbe_init() always calls ixgbe_jcl_reinit() and it causes panic. The reason is that ixgbe_local_timer1(it includes watchdog function) is softint and xgbe_jcl_reinit() calls bus_dmamem*() functions. bus_dmamem*() can't be called from interrupt context. One of the way to prevent panic is use worqueue for the timer, but it's not a small change. (I'll do it in future). Another way is not reallocate dmamem if it's not required. If both the MTU (rx_mbuf_sz in reality) and the number of RX descriptors are not changed, it's not required to call bus_dmamem_{unmap,free}(). Even if we use workque, this change save time of ixgbe_init(). I have a code to fix broken watchdog timer but it sometime causes watchdog timeout, so I don't commit it yet.
update from HEAD
Sync with HEAD
Sync with HEAD
Sync with HEAD
Enable TX multiqueue by default on both ixg(4) and ixv(4).
Sync with HEAD
TX multiqueue. If you want to disable it, enable IXGBE_LEGACY_TX in ixgbe_netbsd.h
Sync with HEAD. (Note that most of these changes are simply $NetBSD$ tag issues.)
Sync with HEAD
Update ixg(4) and ixv(4) up to FreeBSD r282299: - Add support for X55x. - ADD EEE support (not tested). - Add WOL support (not tested). - Add suspend/resume support (not testd). - Add LPLU support (not tested). - Add DMA Coalescing (note verified). - Not tested well for sysctls. - Fix ixgbe_set_advertise() a bit. At least, FreeBSD r294578 is required to work hw.ixg0.advertise_speed sysctl correctly.
Update ixg(4) and ixv(4) up to FreeBSD r280197: - Add support for 82599_QSFP_SF_QP and X540T1. - Add partial support for X55x. It's required to sync with FreeBSD r282299 to support X55x. - Bugfixes.
Sync with HEAD
Pull up following revisions (requested by msaitoh in ticket #734): sys/dev/pci/ixgbe/LICENSE 1.2 sys/dev/pci/ixgbe/ixgbe.c 1.28-1.29 sys/dev/pci/ixgbe/ixgbe.h 1.7 sys/dev/pci/ixgbe/ixgbe_82598.c 1.4 sys/dev/pci/ixgbe/ixgbe_82598.h 1.3 sys/dev/pci/ixgbe/ixgbe_82599.c 1.9 sys/dev/pci/ixgbe/ixgbe_82599.h 1.2 sys/dev/pci/ixgbe/ixgbe_api.c 1.7 sys/dev/pci/ixgbe/ixgbe_api.h 1.4 sys/dev/pci/ixgbe/ixgbe_common.c 1.5 sys/dev/pci/ixgbe/ixgbe_common.h 1.4 sys/dev/pci/ixgbe/ixgbe_mbx.h 1.4 sys/dev/pci/ixgbe/ixgbe_netbsd.h 1.3 sys/dev/pci/ixgbe/ixgbe_osdep.h 1.7 sys/dev/pci/ixgbe/ixgbe_phy.c 1.5 sys/dev/pci/ixgbe/ixgbe_phy.h 1.4 sys/dev/pci/ixgbe/ixgbe_type.h 1.10 sys/dev/pci/ixgbe/ixgbe_vf.c 1.4 sys/dev/pci/ixgbe/ixgbe_vf.h 1.5 sys/dev/pci/ixgbe/ixgbe_x540.c 1.3 sys/dev/pci/ixgbe/ixgbe_x540.h 1.2 sys/dev/pci/ixgbe/ixv.c 1.8 - Sync ixg(4) up to FreeBSD r250108: - Cleanup some unused counters and some unused code. - Improve performance. - Fix 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. - Fix the setting of RX which related to multicast. - Some netmap related fixes. - Fixes link error without vlan. PR#49879 reported by Hauke Fath. [msaitoh, ticket #734]
Sync ixg(4) up to FreeBSD r250108: - Cleanup some unused counters and some unused code. - Improve performance. - Fix 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. - Fix the setting of RX which related to multicast. - Some netmap related fixes.
Rebase to HEAD as of a few days ago.
Rebase.
sync with head. for a reference, the tree before this commit was tagged as yamt-pagecache-tag8. this commit was splitted into small chunks to avoid a limitation of cvs. ("Protocol error: too many arguments")
sync with head
CID/1008347, CID/1008348, CID/1008349: overflow before widen CID/1203198, CID/1203199: Uninitialized scalar variable
Add sources for ixgbe(4), a Intel 82599 10-gigabit ethernet driver ported from FreeBSD.