summaryrefslogtreecommitdiff
path: root/sys/dev/igc
AgeCommit message (Collapse)Author
2025-11-22igc: use newly exposed RSS hash key API rather than ad-hoc hashingAndrew Gallatin
Differential Revision: https://reviews.freebsd.org/D53103 Reviewed by: markj Sponsored by: Netflix
2025-10-31igc(4): Fix a typo in a sysctl descriptionGordon Bergling
- s/Recevied/Received/ MFC after: 5 days
2025-09-10iflib: report output drops and handle ENOBUFS properlyAndrew Gallatin
- 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
2025-05-28igc: Fix some issues in igc_neweitr()Mark Johnston
The justification is the same as in commit fb876eef219e ("e1000: Fix some issues in em_newitr()"). Reviewed by: kbowling MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D50548
2025-05-28igc: Initialize helper variables in igc_neweitr()Mark Johnston
The justification is the same as in commit a5b5220b1807 ("e1000: Initialize helper variables in em_newitr()"). Reviewed by: kbowling MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D50547
2025-03-27dev: Use recently added improvements to PME# support to simplify driversJohn Baldwin
Depend on the PCI bus driver clearing PME# after resume to remove the need for clearing PME# from DEVICE_RESUME methods. Use pci_has_pm and pci_enable_pme. Reviewed by: Krzysztof Galazka <krzysztof.galazka@intel.com> Differential Revision: https://reviews.freebsd.org/D49251
2025-02-26igc(4): Fix attach for I226-K and LMVP devicesEric Joyner
Summary: The device IDs for these were in the driver's list of PCI ids to attach to, but igc_set_mac_type() had never been setup to set the correct mac type for these devices. Fix this by adding these IDs to the switch block in order for them to be recognized by the driver instead of returning an error. This fixes the igc(4) attach for the I226-K LOM on the ASRock Z790 PG-ITX/TB4 motherboard, allowing it to be recognized and used. Signed-off-by: Eric Joyner <erj@FreeBSD.org> Reviewed by: kbowling@ MFC after: 3 days Relnotes: yes Differential Revision: https://reviews.freebsd.org/D49147
2025-02-13igc: Remove unused register IGC_RXD_SPC_VLAN_MASKKevin Bowling
We don't use legacy receive descriptors and masking out the vlan ID isn't necessary since the tag is in the standard format, so remove it. MFC after: 3 days
2024-12-02igc.4: Add I226 and other additions to supported listKevin Bowling
MFC after: 3 days
2024-11-24igc: disable hw.igc.sbpKevin Bowling
Similar to 548d8a131d536d5f in e1000, disable this by default. MFC after: 3 days Sponsored by: BBOX.io
2024-11-24igc: Style pass igc_txrxKevin Bowling
Fix up indentation and reflow long lines. MFC after: 3 days Sponsored by: BBOX.io
2024-11-23igc: Reflow long linesKevin Bowling
MFC after: 3 days Sponsored by: BBOX.io
2024-11-23igc: Normalize indentation a bitKevin Bowling
MFC after: 3 days Sponsored by: BBOX.io
2024-11-20igc: sysctl for TCP flag handling during TSOKevin Bowling
Add tso_tcp_flags_mask_first_segment, tso_tcp_flags_mask_middle_segment, and tso_tcp_flags_mask_last_segment sysctl-variables to control the handling of TCP flags during TSO. This allows to change the masks appropriate for classical ECN and to configure appropriate masks for accurate ECN. MFC after: 3 days Sponsored by: Netflix
2024-10-26igc: Remove a bogus register write in igc_if_queues_free()Mark Johnston
As explained in PR 277038, iflib calls IFDI_DETACH() and then IFDI_QUEUES_FREE(). With igc, the latter writes to a register after it has been unmapped. igc_if_detach() already calls igc_release_hw_control(), and looking at callers of igc_if_queues_free(), that appears to be sufficient. So, just remove the igc_release_hw_control() call. PR: 277038 Reported by: Mike Belanger <mibelanger@qnx.com> Reviewed by: kbowling Tested by: kbowling MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D47293
2024-10-14igc: txrx function prototype cleanupKevin Bowling
Drop variable names of function prototypes since the file is mixed in listing them or not and they fall out of sync. MFC after: 1 week Sponsored by: BBOX.io
2024-10-14igc: Function prototype cleanupKevin Bowling
Drop variable names of function prototypes since the file is mixed in listing them or not and they fall out of sync. MFC after: 1 week Sponsored by: BBOX.io
2024-10-14igc: Rename 'struct adapter' to 'struct igc_softc'Kevin Bowling
Rename the 'struct adapter' to 'struct igc_softc' to avoid type ambiguity in things like kgdb and make sharing code with e1000 and ixgbe easier. MFC after: 1 week Sponsored by: BBOX.io
2024-10-14igc: Add sysctls for some missing MAC statsKevin Bowling
MFC after: 1 week Sponsored by: BBOX.io
2024-10-14igc: Add sysctl for DMA CoalesceKevin Bowling
This feature can increase efficiency at the expense of latency It does not work well with the default interrupt delay, but expose the otherwise unconnected code in the driver in case people want to experiment. See https://www.intel.com/content/dam/support/us/en/documents/network/adapter/pro100/sb/466827_intel_r__dma_coalescing_white_paper_v003.pdf MFC after: 1 week Sponsored by: BBOX.io
2024-10-12igc: Want AIM at 2.5GKevin Bowling
This should have been commited with bc9402a, need to account for link_speed of 2500 as well on igc. MFC after: 6 days Sponsored by: Rubicon Communications, LLC ("Netgate") Sponsored by: BBOX.io
2024-10-12igc: Improve a comment and update copyright datesKevin Bowling
MFC after: 1 week
2024-10-12igc: Add AIMKevin Bowling
igc is derived from igb and has never had an AIM implementation. The same algorithm from e1000 is appropriate here. Upon more detailed study of the Linux driver which has a newer AIM implementation, it finally became clear to me this is actually a holdoff timer and not an interrupt limit as it is conventionally (statically) programmed and displayed as an interrupt rate. The data sheets also make this somewhat clear. Thus, AIM accomplishes two beneficial things for a wide variety of workloads[1]: 1. At low throughput/packet rates, it will significantly lower latency (by counter-intuitively "increasing" the interrupt rate.. better thought of as decreasing the holdoff timer because you will modulate down before coming anywhere near these interrupt rates). 2. At bulk data rates, it is tuned to achieve a lower interrupt rate (by increasing the holdoff timer) than the current static 8000/s. This decreases processing overhead and yields more headroom for other work such as packet filters or userland. For a single NIC this might be worth a few sys% on common CPUs, but may be meaningful when multiplied such as if_lagg, if_bridge and forwarding setups. The AIM algorithm was re-introduced from the older igb or out of tree driver, and then modernized with permission to use Intel code from other drivers. [1]: http://iommu.com/datasheets/ethernet/controllers-nics/intel/e1000/gbe-controllers-interrupt-moderation-appl-note.pdf MFC after: 1 week Relnotes: yes Sponsored by: Rubicon Communications, LLC ("Netgate") Sponsored by: BBOX.io Differential Revision: https://reviews.freebsd.org/D47053
2024-09-29igc: Add NVM/firmware prints and sysctlKevin Bowling
This chipset suffered an (un)usual number of bugs and iterations. Let's add our NVM/firmware code from e1000 and the similar igc_nvm function from DPDK to keep track of issues. MFC after: 1 week Sponsored by: BBOX.io
2024-09-28igc: Remove non-existent legacy absolute and packet timersKevin Bowling
igc, derived from igb, does not use these registers. All interrupt timing is governed by EITR or LLI and driven by write-back. MFC after: 1 week Sponsored by: BBOX.io
2024-01-09igb(4): Remove disconnected SYSCTLMarius Strobl
The global hw.igb.rx_process_limit knob never was adhered to by the in-tree version of this driver but similar functionality is available via the device-specific dev.igb.N.iflib.rx_budget. While at it, remove the - besides initialization of tx_process_limit - unused {r,t}x_process_limit members.
2023-08-24iflib: invert default restart on VLAN changesKevin Bowling
In rS360398, a new iflib device method was added to opt out of VLAN events needing an interface reset. I am switching the default to not requiring a restart for: * VLAN events * unknown events After fixing various bugs, I do not think this would be a common need of hardware and it is undesirable from the user's perspective causing link flaps and much slower VLAN configuration. Currently, there are no other restart events besides VLAN events, and setting the ifdi_needs_restart default to false will alleviate the need to churn every driver if an odd event is added in the future for specific hardware. markj points out this could cause churn in the other direction; I will solve that problem with an event registration system as he mentions in the review should we need it in the future. These drivers will opt into restart and need further inspection or work: * ixv (needs code audit, 61a8231 fixed principal issue; re-init probably not necessary) * axgbe (needs code audit; re-init probably not necessary) * iavf - (needs code audit; interaction with Malicious Driver Detection mentioned in rS360398) * mgb - no VLAN functions are currently implemented. Left a comment. MFC after: 2 weeks Sponsored by: BBOX.io Differential Revision: https://reviews.freebsd.org/D41558
2023-08-17iflib drivers: Constify PCI ID LUTsMarius Strobl
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.
2023-08-16sys: Remove $FreeBSD$: one-line .c patternWarner Losh
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
2023-08-16sys: Remove $FreeBSD$: two-line .h patternWarner Losh
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
2023-08-10igc: sync srrctl buffer sizing with e1000Kevin Bowling
Approved by: grehan MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31493
2023-07-11igc: Increase default per-queue interrupt rate to 20000.Peter Grehan
The default per-queue packet rate of 8000 will cause packet loss when forwarding at 2.5G with a single stream, as is common when using e.g. iperf3 to test a platform. Bump this to 20000 (the "low latency" value in the Linux driver) which avoids packet loss for this type of test. Future work will use adaptive interrupt rate in a similar fashion to the ixgbe driver. Sponsored by: Rubicon Communications, LLC ("Netgate") Reviewed by: erj, kp MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D40904
2022-12-21DrvAPI: Trivial mechanical conversions for various driversJustin Hibbits
Mechanically convert the following drivers, with trivial changes: * ipw(4) * igc(4) * enetc(4) * malo(4) * nfe(4) * bxe(4) * awg(4) * otus(4) * rtwn(4) * bnxt(4) * ath(4) Sponsored by: Juniper Networks, Inc.
2022-10-10igc: Fix up hw vlan opsKevin Bowling
Adapt 2796f7cab10785ef40efbba97ef67ab319c96e9c to igc(4) * Don't reset the entire adapter for vlan changes, fix up the problems * Remove the VFTA, this hardware doesn't seem to implement it Approved by: grehan MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31979
2022-10-10igc: remove unnecessary PHY ID checksMah Yock Gen
I225 devices have only one PHY vendor. There is unnecessary to check _I_PHY_ID during the link establishment and auto-negotiation process, the checking also caused devices like i225-IT failed. This patch is to remove the mentioned unnecessary checking. Cc: stable@dpdk.org Signed-off-by: Mah Yock Gen <yock.gen.mah@intel.com> Signed-off-by: Taripin Samuel <samuel.taripin@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com> Approved by: grehan MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D36923
2022-09-19igc: Don't start in promiscious mode by defaultHubert Mazur
The igc driver always sets the promiscious mode during initialization, ignoring what is set in ifp. Fix this by checking the interface flags and setting mode appropriately. Reviewed by: grehan Obtained from: Semihalf Sponsored by: Stormshield MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D36591
2022-07-01igc: Change default duplex settingKornel Dulęba
During media selection through ifconfig one might not specify the duplex setting through the mediaopt flag. In that case the igc driver would default to full-duplex. The problem with this approach is that e1000(em/igb) driver defaults to half-duplex. Because of that if one connects both NICs and sets media to e.g. 100baseTX on both of them no link will be found. Fix that by matching igc behaviour with what e1000 does. Reviewed by: grehan Approved by: mw(mentor) Obtained from: Semihalf Sponsored by: Stormshield MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D35673
2022-05-16igc: Increase rx_buffer_size local variable to 32bKevin Bowling
Apply 6987c47569b377f4b6eba9966afdedfb1b39fca8 to igc. This is not expected to have any benefit on current parts with current observed PBA sizes but will avoid surprises if they are increased in future chips. Approved by: grehan MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D35217
2022-05-15igc: Fix typo in PCI ID define usageKevin Bowling
Reported by: jenkins Fixes: bf0aa72f1f59 igc: Update PCI IDs MFC after: 3 days
2022-05-15igc: Update PCI IDsKevin Bowling
I226-K PCI ID got clarified by intel. Add a new I226 ID while here. Approved by: grehan MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D35218
2022-05-06igc: Remove unused devclass argument to DRIVER_MODULE.John Baldwin
2022-02-26Default to always accepting the PHY that's present. Linux didScott Long
something similar a while back, and there are devices in the wild that otherwise won't attach. This patch is temporary until the PHY code is further cleared up. Obtained from: grehan
2021-12-29igc: Remove redundant IFCAP_VLAN_HWTAGGING checkKevin Bowling
Match igb(4) as in f7926a6d0c10. From Vincenzo, this check is redundant to setup providing us an IGC_RXD_STAT_VP bit and would make for an unexpected condition if IFCAP_VLAN_HWTAGGING were not set but the tag was stripped, which would be passed up the stack breaking isolation. PR: 260068 Approved by: vmaffione MFC after: 1 month
2021-12-28net: iflib: fix vlan processing in the driversVincenzo Maffione
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
2021-11-18Fix 'take effect' spelling in menus and comments.betterentley
Signed-off-by: John Bentley <johnbentley.public@gmail.com> Pull Request: https://github.com/freebsd/freebsd-src/pull/559
2021-11-08igc: Use hardware routine for PHY resetPeter Grehan
Summary: The previously used software reset routine wasn't sufficient to reset the PHY if the bootloader hadn't left the device in an initialized state. This was seen with the onboard igc port on an 11th-gen Intel NUC. The software reset isn't used in the Linux driver so all related code has been removed. Tested on: Netgate 6100 onboard ports, a discrete PCIe I225-LM card, and an 11th-gen Intel NUC. Reported by: woodsb02 Tested by: woodsb02 (NUC) MFC after: 3 days Sponsored by: Rubicon Communications, LLC ("Netgate") Reviewed by: kbowling Differential Revision: https://reviews.freebsd.org/D32772
2021-10-22igc: correctly update RCTL when changing multicast filters.Peter Grehan
Fix clearing of bits in RCTL for the non-bpf/non-allmulti case. Update RCTL after modifying the multicast filter registers as per the Linux driver. This fixes LACP on igc interfaces, where incoming LACP multicasti control packets were being dropped. Reviewed by: kbowling Obtained from: Rubicon Communications, LLC ("Netgate") MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D32574
2021-07-31igc: sync igc_txrx with igb(4)Kevin Bowling
Reviewed by: grehan MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31227
2021-07-12igc(4): Introduce new driver for the Intel I225 Ethernet controller.Peter Grehan
This controller supports 2.5G/1G/100MB/10MB speeds, and allows tx/rx checksum offload, TSO, LRO, and multi-queue operation. The driver was derived from code contributed by Intel, and modified by Netgate to fit into the iflib framework. Thanks to Mike Karels for testing and feedback on the driver. Reviewed by: bcr (manpages), kbowling, scottl, erj MFC after: 1 month Relnotes: yes Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D30668