aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ixl
Commit message (Collapse)AuthorAgeFilesLines
* ixl(4): Fix a typo in a source code commentGordon Bergling5 days1-1/+1
| | | | | | - s/seperated/separated/ MFC after: 3 days
* ixl: verify flowid is valid before setting rsstype & flowidAndrew Gallatin2026-01-051-3/+7
| | | | | | | | | | | | | | | | | According to section 8.3.2.2.1 of the XL710 datasheet, FLTSTAT indicates if RSS hashing was used (or flow director or nothing) to arrive at the flowid it is reporting. We need to check this before reporting the flowid and setting the rss type. Not checking this allows invalid flowids (0s) to be reported for some TCP traffic (it seems to mostly impact incoming connections). This leads to the inp flowid being 0, and egress traffic being unbalanced (going to tx queue 0, and NIC 0 of an lacp bundle). Differential Revision: https://reviews.freebsd.org/D54442 Reviewed by: adrian, kbowling Sponsored by: Netflix MFC after: 2 weeks
* ixl: use newly exposed RSS hash key API rather than ad-hoc hashingAndrew Gallatin2025-11-222-15/+2
| | | | | Differential Revision: https://reviews.freebsd.org/D53094 Sponsored by: Netflix
* ixl(4): fix multicast promiscuous mode state tracking and filter managementBhosale, Yogesh2025-10-163-18/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change reapplies the improvements from commit 89e7335 and adds additional fixes and code optimizations on top of it. The ixl driver supports up to 128 multicast filters in hardware. When this limit is exceeded, the driver should enable multicast promiscuous mode. When the count drops below 128, it should disable promiscuous mode and restore individual filters. The driver previously had problems that could corrupt multicast filters list. The main issue was that ixl_dis_multi_promisc() would attempt to disable promiscuous mode without checking if it was actually enabled, potentially corrupting existing filters. There was also no state tracking across driver functions, leading to redundant operations. This change adds an IXL_FLAGS_MC_PROMISC flag to track the multicast promiscuous mode state. The flag is set when enabling promiscuous mode and cleared when disabling it. Early return checks prevent redundant operations when the mode is already in the desired state, avoiding filter corruption and unnecessary hardware calls. Signed-off-by: Yogesh Bhosale yogesh.bhosale@intel.com PR: 283820 Approved by: kbowling (mentor) Tested by: gowtham.kumar.ks_intel.com MFC after: 2 weeks Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D52549
* iflib: report output drops and handle ENOBUFS properlyAndrew Gallatin2025-09-101-2/+2
| | | | | | | | | | | | | | | | | | | | - Fix an mbuf leak with iflib.simple_tx=1 when we run out of tx descs in iflib_encap(). It seems odd to free the mbuf in iflib_encap(), but that routine consumes mbufs for other reasons, and it seemed safest to free there rather than have the simple tx routine parse return values to determine what needed to be freed. - Increment counters for output drops when ENOBUFS is encountered and output errors when other transmit errors are encountered for both the simple and normal tx routines. - Performed driver changes so that iflib drivers now add the generic output drop and output error counters to their private counters in their ifdi_get_counter routines. Reviewed by: kbowling, markj Differential Revision: https://reviews.freebsd.org/D52369 Sponsored by: Netflix
* ixl(4): Fix queue MSI and legacy IRQ rearmingKrzysztof Galazka2025-08-191-8/+17
| | | | | | | | | | | | | | | | | | | | | | | | When MSI or legacy interrupt is used driver controls wheter queues can trigger an interrupt with the Interrupt Linked List. While processing traffic first index of the list is set to EOL value to stop queues from triggering interrupts. This index was not reset to the correct value when driver attempted to re-enable interrupts from queues, what prevented driver from processing any traffic. Fix that by setting correct first index in the ixl_if_enable_intr function. While at that fix the comments style and make ixl_if_enable_intr and ixl_if_disable_intr more consistent. Signed-off-by: Krzysztof Galazka <krzysztof.galazka@intel.com> PR: 288077 Suggested by: Mike Belanger <mibelanger@qnx.com> Approved by: kbowling (mentor), erj (mentor) Tested by: gowtham.kumar.ks_intel.com, Sponsored by: Intel Corporation MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D51331
* machine/stdarg.h -> sys/stdarg.hBrooks Davis2025-06-111-1/+1
| | | | | | | | | | | | | Switch to using sys/stdarg.h for va_list type and va_* builtins. Make an attempt to insert the include in a sensible place. Where style(9) was followed this is easy, where it was ignored, aim for the first block of sys/*.h headers and don't get too fussy or try to fix other style bugs. Reviewed by: imp Exp-run by: antoine (PR 286274) Pull Request: https://github.com/freebsd/freebsd-src/pull/1595
* Revert "ixl: fix multicast filters handling"Franco Fichtner2024-12-191-87/+10
| | | | | | | | | This reverts commit 89e73359424a338a7900a4854ad7439f5848ebb8. PR: 281125 Reviewed by: Krzysztof Galazka <krzysztof.galazka@intel.com> MFC after: 3 days Pull Request: https://github.com/freebsd/freebsd-src/pull/1545
* Revert "ixl: Increase tx/rx ring size to 8160"Kevin Bowling2024-09-241-1/+1
| | | | | | | | | | | iflib enforces powerof2 on the ring size: panic: Assertion powerof2(sctx->isc_nrxd_max[i]) Revert until this change is better understood. Reported by: tuexen This reverts commit 14561f1eda85fabfba2d764ca11e064ed871224e.
* ixl: Increase tx/rx ring size to 8160Kevin Bowling2024-09-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | I've verified the tx queue (table 8-22) in addition. DPDK commit message net/i40e: increase max descriptor queue length According to the Intel X710/XXV710/XL710 Datasheet, the maximum receive queue descriptor length is 0x1FE0 (8160 in base 10). This is specified as QLEN in table 8-12, page 1083. I've tested this change with an XXV710 NIC and it has positive effect on performance under high load scenarios. Where previously I'd get ~2000 packets/sec miss rate, now I get only ~40 packets/sec miss rate. Signed-off-by: Igor Gutorov <igootorov@gmail.com> Acked-by: Morten Brørup <mb@smartsharesystems.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Obtained from: DPDK (ce9470f) MFC after: 1 week
* ixl(4): Add more debug information for queues' configKrzysztof Galazka2024-08-271-2/+51
| | | | | | | | | | | | | Include information about interrupt linked lists in queue_interrupt_table sysctl and add new debug sysctl queue_int_ctln allowing to check current interrupt state. Signed-off-by: Krzysztof Galazka <krzysztof.galazka@intel.com> Signed-off-by: Eric Joyner <erj@FreeBSD.org> Reviewed by: erj@ Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D45403
* ixl(4): Use GL_RXERR1 register for correct oversize packet countEric Joyner2024-08-274-75/+100
| | | | | | | | | | | | | | | | The driver sets the Maximum Transmission Unit (MTU) at the Virtual Station Interface (VSI) level, which leads to a discrepancy in the GLPRT_ROC counter's ability to accurately tally oversized packets, as this counter operates at the physical port level. To rectify this issue, it is necessary to take an additional register (GL_RXERR1) into account to obtain the correct count of oversized packets. Signed-off-by: Yogesh Bhosale <yogesh.bhosale@intel.com> Signed-off-by: Eric Joyner <erj@FreeBSD.org> Reviewed by: erj@ Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D45870
* iflib drivers: Constify PCI ID LUTsMarius Strobl2023-08-171-1/+1
| | | | | | | | Since d49e83eac3baf16a22b1c5d42e8438b68b17e6f9, iflib(9) is ready for this change. While at it, make isc_driver_version strings (static) const where not apparently un-const on purpose, too. This reduces the size of the amd64 GENERIC by about 10 KiB.
* ixl: fix multicast filters handlingMateusz Pacuszka2023-08-171-10/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Hardware supports up to 128 entries of multicast filters. If there is more, filters should be removed and multicast promiscuous enabled. In case user deletes the multicast address and overall count is less than 128, multicast promiscuous mode should be disabled and all the filters reapplied into the HW. Currently driver only enables multicast promiscuous mode and deletes the entries without any information to the user and it's not capable of reapplying the filters once count is less than 128. Address that by: 1. Add logging 2. Add logic in case multicast promiscuous is enabled and user lowers the number of multicast entries to <128. 3. Fix a bug where driver removes different MAC entries along with the one that's being deleted by the user. Reviewers: #intel_networking, erj Reviewed By: #intel_networking, erj Subscribers: imp, ae Differential Revision: https://reviews.freebsd.org/D40860
* sys: Remove $FreeBSD$: one-line .c comment patternWarner Losh2023-08-1635-35/+0
| | | | Remove /^/[*/]\s*\$FreeBSD\$.*\n/
* ixl(4): Add link state pollingKrzysztof Galazka2023-07-207-19/+75
| | | | | | | | | | | | | | | | In some cases driver may ask FW about link state before FW finishes configuration of a (Q)SFP+ transceiver. If first attempt of using Get Link Status AQC after loading driver or handling a reset fails, then re-try periodically for 5 seconds. Signed-off-by: Krzysztof Galazka <krzysztof.galazka@intel.com> Signed-off-by: Eric Joyner <erj@FreeBSD.org> Tested by: jeffrey.e.pieper@intel.com Approved by: erj@ MFC after: 2 days Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D40899
* ixl: implement support for dumping NIC registersPiotr Kubaj2023-07-062-0/+72
| | | | | | | | | | | To enable faster debug of customer issues Intel wants an end user to gather information about PHY configuration and status to debug link and connection issues in the field. For this reason the end user should have possibility of obtaining PHYs registers values at runtime during debugging. Differential Revision: https://reviews.freebsd.org/D40354 Approved by: erj
* ixl: port ice's atomic API to ixlPiotr Kubaj2023-07-064-51/+118
| | | | | Differential Revision: https://reviews.freebsd.org/D40532 Approved by: erj
* ixl(4): Fix MAC/VLAN filters accountingKrzysztof Galazka2023-02-155-11/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Account for a filter required to enable reception of untagged frames while registering and unregistering VLANs to avoid trying to add more filters than HW supports - While adding MAC/VLAN filters, pre-set matching method field in the Admin Queue Command response buffer to expected error value to work around an issue with some FW versions, which do not update that field if operation fails, and be able correctly track which filters were configured in HW. - Remove unused IXL_MAX_FILTERS macro definition - Update number of available MAC/VLAN filters as in newer FW versions it was decreased by one. - Simplify i40e_dma_mem structure Signed-off-by: Krzysztof Galazka <krzysztof.galazka@intel.com> Signed-off-by: Eric Joyner <erj@FreeBSD.org> Reviewed by: erj@ Tested by: Gowtham Kumar Ks <gowtham.kumar.ks@intel.com> MFC after: 3 days Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D37457
* ixl: purge EOL release compatibilityElliott Mitchell2023-02-043-28/+0
| | | | | | | | Drop code that differentiated between FreeBSD 10 and 11. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/603 Differential Revision: https://reviews.freebsd.org/D35560
* Mechanically convert ixl(4) to IfAPIJustin Hibbits2023-01-242-7/+7
| | | | | | Reviewed by: erj Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D37857
* ixl: Fix a mechanical mess-up in DrvAPI conversionJustin Hibbits2022-12-211-1/+1
| | | | | | | | ixl_iw.c is not compiled by default, and I missed this in code inspection. Reported by: erj@ Sponsored by: Juniper Networks, Inc.
* Convert iflib(4) and iflib-based drivers to the DrvAPIJustin Hibbits2022-12-215-15/+15
| | | | | | | | | | | | | | Summary: Convert iflib(4) and the following drivers: * axgbe * em * ice * ixl * vmxnet Sponsored by: Juniper Networks, Inc. Reviewed by: kbowling, #iflib Differential Revision: https://reviews.freebsd.org/D37768
* ixl: silence runtime warning when PCI_IOV is not enabledAndrew Gallatin2022-12-061-0/+3
| | | | | | | | | | | | | | When PCI_IOV is not enabled, do not attempt to call iflib_softirq_alloc_generic(...IFLIB_INTR_IOV), as it results in boot-time warnings similar to: taskqgroup_attach_cpu: qid not found for iov cpu=2 ixl2: taskqgroup_attach_cpu failed 22 Instead, make it conditional on PCI_IOV like the other SR-IOV related code. Reviewed by: erj Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D37609
* ixl(4): Fix SR-IOV panicsYan Ka Chiu2022-07-131-0/+8
| | | | | | | | | | | | | | | | | The hw and ifp of a vsi will be NULL if such ixl_vsi is allocated for a VF. When ixl_reconfigure_filters called, it is trying to access vsi->ifp and hw->mac.addr and therefore is casuing panic. This commit add checks to determine if vsi is a VF by checking if vsi->hw is NULL, before adding IXL_VLAN_ANY filter (which is already in a VF vsi's filter list) and VLAN filters. (erj's Note: The SR-IOV flows need revisiting; this will help prevent panics for now) Reviewed by: krzysztof.galazka@intel.com, erj@ MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D35649
* ixl(4): Add support for I710 devices and remove non-inclusive languageKrzysztof Galazka2022-05-244-5/+11
| | | | | | | | | | | | | | Intel introduces a new line of 1G Ethernet adapters with Device ID 0x0DD2. While at that also remove non-inclusive language. Signed-off-by: Eric Joyner <erj@FreeBSD.org> Reviewed by: kbowling@ Tested by: gowtham.kumar.ks@intel.com MFC after: 1 week Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D34924
* iavf/ice/ixl: Remove unused devclass arguments to DRIVER_MODULE.John Baldwin2022-05-061-2/+1
|
* i40e_validate_filter_settings: Remove unused variables.John Baldwin2022-04-121-5/+0
| | | | | Reviewed by: erj Differential Revision: https://reviews.freebsd.org/D34829
* ixl: Remove unused variables.John Baldwin2022-04-062-8/+0
|
* ixl(4): Remove unused function declarationEric Joyner2022-01-121-1/+0
| | | | | | Signed-off-by: Eric Joyner <erj@FreeBSD.org> Sponsored by: Intel Corporation
* net: iflib: fix vlan processing in the driversVincenzo Maffione2021-12-281-8/+5
| | | | | | | | | | | | | | The logic that sets iri_vtag and M_VLANTAG does not handle the case where the 802.11q VLAN tag is 0. Fix this issue across the iflib drivers. While there, also improve and align the VLAN tag check extraction, by moving it outside the RX descriptor loop, eliminating a local variable and additional checks. PR: 260068 Reviewed by: kbowling, gallatin Reported by: erj MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D33156
* net: iflib: let the drivers use isc_capenableVincenzo Maffione2021-12-281-1/+2
| | | | | | | | | | | | | Since isc_capenable (private copy of ifp->if_capenable) is now synchronized to if_capenable, use it in the drivers when checking the IFCAP_* bits. This results in better cache usage and avoids indirection through the ifp pointer. PR: 260068 Reviewed by: kbowling, gallatin MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D33156
* ixl(4): Remove iavf(4) source filesEric Joyner2021-11-243-3683/+0
| | | | | | | | | | | Since iavf(4) no longer shares code with ixl(4) as of commit f2fbd56a8d07665bc0a5e8b7e40026b50a591e2a and now has its own directory, remove these now-unused iavf(4)-only files. Signed-off-by: Eric Joyner <erj@FreeBSD.org> Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D28638
* ixl(4): Fix a typo in a sysctl descriptionGordon Bergling2021-11-191-1/+1
| | | | MFC after: 3 days
* ixl(4): Fix 2.5 and 5G speeds reporting and update shared codeKrzysztof Galazka2021-09-1310-108/+234
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix 2.5 and 5G speeds reporting and update shared code with recent changes: - Update expected FW API versions for X710 and X722 adapters - Define pointers related to Preservation Rules Module - Add definitions for Shadow RAM pointers to new modules: 5th and 6th FPA, and Preservation Rules Module. - Add I40E_RX_PTYPE_PARSER_ABORTED definition, so the driver will know opcode for parser aborted packets. - Add the new filter types needed for custom cloud filters. - Add support for Minimum Rollback Revision - Fix RX_ONLY mode for unicast promiscuous on VLAN - Add EEE LPI status check for X722 adapters - Fix PHY type identifiers for 2.5G and 5G adapters - Fix update link data for X722 - Increase the timeout value for PF reset to give PF more time to finish reset if it is loaded with filters. - Added support for Min Rollback Revision for 4 more X722 modules - Fix reporting of Active Optical Cable media type - Add flags and fields for double VLAN processing - Fix potentially uninitialized variables in NVM code Reviewed by: kbowling@, mike.jakubik@gmail.com Tested by: gowtham.kumar.ks@intel.com Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D31565
* ixl(4): Fix reporting of unqualified transceiversKrzysztof Galazka2021-08-202-9/+12
| | | | | | | | | | | | | | | | | | | When link_active_on_if_down flag is disabled and link is brought down with ifconfig, FW reports a false positive link event about an unqualified transceiver. The condition used in the driver to filter out those false positive events was incorrect and caused that unqualified module event to also not be reported when the event was valid. Change the condition to rely on IFF_UP flag instead of link_active_on_if_down and bump driver version to 2.3.1-k. Signed-off-by: Krzysztof Galazka <krzysztof.galazka@intel.com> Signed-off-by: Eric Joyner <erj@FreeBSD.org> Reviewed by: stallamr@netapp.com, erj@ Tested by: gowtham.kumar.ks@intel.com Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D30733
* intel ethernet: Use ether_gen_addr(9)Kevin Bowling2021-08-201-7/+3
| | | | | | | | Use ether_gen_addr(9) for VF MAC generation Reviewed by: Intel Networking (erj), kevans MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31616
* ixl(4): Add tunable to override Flow Control settingsKrzysztof Galazka2021-04-053-18/+43
| | | | | | | | | | | | Add flow_control to hw.ixl tunables tree to let override initial flow control configuration for all interfaces. Keep using configuration set by NVM by default. Reviewed by: erj@, gallatin@ Tested by: gowtham.kumar.ks_intel.com MFC after: 1 week Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D29338
* Fix some common typos in commentsGordon Bergling2021-03-131-20/+20
| | | | | | | | | | | - occured -> occurred - normaly -> normally - controling -> controlling - fileds -> fields - insterted -> inserted - outputing -> outputting MFC after: 1 week
* iflib: Make if_shared_ctx_t a pointer to constMark Johnston2021-03-082-6/+2
| | | | | | | | | | | | | | | This structure is shared among multiple instances of a driver, so we should ensure that it doesn't somehow get treated as if there's a separate instance per interface. This is especially important for software-only drivers like wg. DEVICE_REGISTER() still returns a void * and so the per-driver sctx structures are not yet defined with the const qualifier. Reviewed by: gallatin, erj MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D29102
* ixl(4): Add ability to control link state on ifconfig downKrzysztof Galazka2021-03-034-1/+154
| | | | | | | | | | | | Add sysctl link_active_on_if_down, which allows user to control if interface is kept in active state when it is brought down with ifconfig. Set it to enabled by default to preserve backwards compatibility. Reviewed by: erj Tested by: gowtham.kumar.ks@intel.com Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D28028
* ixl(4): Report RX errors as sum of all RX error countersKrzysztof Galazka2021-03-033-9/+23
| | | | | | | | | | | | | | | | | | HW keeps track of RX errors using several counters, each for specific type of errors. Report RX errors to OS as sum of all those counters: CRC errors, illegal bytes, checksum, length, undersize, fragment, oversize and jabber errors. There is no HW counter for frames with invalid L3/L4 checksums so add a SW one. Also add a "rx_errors" sysctl with a copy of netstat IERRORS counter value to make it easier accessible from scripts. Reviewed By: erj Tested By: gowtham.kumar.ks@intel.com Sponsored By: Intel Corporation Differential Revision: https://reviews.freebsd.org/D27639
* ixl(4): Fix VLAN HW filteringKrzysztof Galazka2021-02-0411-313/+487
| | | | | | | | | | | | | | | | | | | X700 family of controllers has limited number of available VLAN HW filters. Driver did not handle properly a case when user assigned more VLANs to the interface which had all filters already in use. Fix that by disabling HW filtering when it is impossible to create filters for all requested VLANs. Keep track of registered VLANs using bitstring to be able to re-enable HW filtering when number of requested VLANs drops below the limit. Also switch all allocations to use M_IXL malloc type to ease detecting memory leaks in the driver. Reviewed by: erj Tested by: gowtham.kumar.ks@intel.com MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28137
* iflib: Free resources in a consistent order during detachSai Rajesh Tallamraju2021-02-011-1/+1
| | | | | | | | | | | | | Memory and PCI resources are freed with no particular order. This could cause use-after-frees when detaching following a failed attach. For instance, iflib_tx_structures_free() frees ctx->ifc_txqs[] but iflib_tqg_detach() attempts to access this array. Similarly, adapter queues gets freed by IFDI_QUEUES_FREE() but IFDI_DETACH() attempts to access adapter queues to free PCI resources. MFC after: 2 weeks Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D27634
* ixl: Permit 802.1ad frames to pass though the chipLutz Donnerhacke2021-01-191-0/+40
| | | | | | | | | | | | This patch is a quick hack to change the internal Ethertype used within the chip. All frames with this type are dropped silently. This patch allows you to overwrite the factory default 0x88a8, which is used by IEEE 802.1ad VLAN stacking. Reviewed by: kp, philip, brueffer Approved by: kp (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24179
* iflib: ensure that tx interrupts enabled and cleanupsMatt Macy2021-01-072-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Doing a 'dd' over iscsi will reliably cause stalls. Tx cleaning _should_ reliably happen as data is sent. However, currently if the transmit queue fills it will wait until the iflib timer (hz/2) runs. This change causes the the tx taskq thread to be run if there are completed descriptors. While here: - make timer interrupt delay a sysctl - simplify txd_db_check handling - comment on INTR types Background on the change: Initially doorbell updates were minimized by only writing to the register on every fourth packet. If txq_drain would return without writing to the doorbell it scheduled a callout on the next tick to do the doorbell write to ensure that the write otherwise happened "soon". At that time a sysctl was added for users to avoid the potential added latency by simply writing to the doorbell register on every packet. This worked perfectly well for e1000 and ixgbe ... and appeared to work well on ixl. However, as it turned out there was a race to this approach that would lockup the ixl MAC. It was possible for a lower producer index to be written after a higher one. On e1000 and ixgbe this was harmless - on ixl it was fatal. My initial response was to add a lock around doorbell writes - fixing the problem but adding an unacceptable amount of lock contention. The next iteration was to use transmit interrupts to drive delayed doorbell writes. If there were no packets in the queue all doorbell writes would be immediate as the queue started to fill up we could delay doorbell writes further and further. At the start of drain if we've cleaned any packets we know we've moved the state machine along and we write the doorbell (an obvious missing optimization was to skip that doorbell write if db_pending is zero). This change required that tx interrupts be scheduled periodically as opposed to just when the hardware txq was full. However, that just leads to our next problem. Initially dedicated msix vectors were used for both tx and rx. However, it was often possible to use up all available vectors before we set up all the queues we wanted. By having rx and tx share a vector for a given queue we could halve the number of vectors used by a given configuration. The problem here is that with this change only e1000 passed the necessary value to have the fast interrupt drive tx when appropriate. Reported by: mav@ Tested by: mav@ Reviewed by: gallatin@ MFC after: 1 month Sponsored by: iXsystems Differential Revision: https://reviews.freebsd.org/D27683
* ixl(4): Add support for X710-T*L devicesEric Joyner2020-09-019-16/+537
| | | | | | | | | | | | | | | | | | Add support for new devices which are capable of 2.5 and 5G speeds, as well as Energy Efficient Ethernet (EEE): - introduce new device ids - add ability to select 2.5 and 5G speeds on devices which support it - add sysctls to enable EEE and read related statistics Submitted by: Krzysztof Galazka <krzysztof.galazka@intel.com> Reviewed by: #IntelNetworking MFC after: 3 days Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D25549 Notes: svn path=/head/; revision=365231
* Remove redeclaration found by gcc buildLi-Wen Hsu2020-08-151-2/+0
| | | | | | | | | | Reviewed by: Jacob Keller <jacob.e.keller@intel.com> Suggested editing from: Krzysztof Galazka <krzysztof.galazka@intel.com> Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25954 Notes: svn path=/head/; revision=364241
* dev.ixl.<N>.debug: mark as MPSAFEPawel Biernacki2020-07-041-1/+1
| | | | | | | | | | | This node provides no handler, it's implicitly MPSAFE. Reviewed by: erj Sponsored by: Mysterious Code Ltd. Differential Revision: https://reviews.freebsd.org/D25408 Notes: svn path=/head/; revision=362932
* ixl(4): Add FW recovery mode support and other thingsEric Joyner2020-06-0921-2191/+3127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the iflib version of ixl driver based on the OOT version ixl-1.11.29. Major changes: - Extract iflib specific functions from ixl_pf_main.c to ixl_pf_iflib.c to simplify code sharing between legacy and iflib version of driver - Add support for most recent FW API version (1.10), which extends FW LLDP Agent control by user to X722 devices - Improve handling of device global reset - Add support for the FW recovery mode - Use virtchnl function to validate virtual channel messages instead of using separate checks - Fix MAC/VLAN filters accounting Submitted by: Krzysztof Galazka <krzysztof.galazka@intel.com> Reviewed by: erj@ Tested by: Jeffrey Pieper <jeffrey.e.pieper@intel.com> MFC after: 1 week Relnotes: yes Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D24564 Notes: svn path=/head/; revision=361992