aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/igc
Commit message (Collapse)AuthorAgeFilesLines
* igc: Fix some issues in igc_neweitr()Mark Johnston2025-05-281-18/+22
| | | | | | | | | 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
* igc: Initialize helper variables in igc_neweitr()Mark Johnston2025-05-281-0/+1
| | | | | | | | | 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
* dev: Use recently added improvements to PME# support to simplify driversJohn Baldwin2025-03-271-7/+3
| | | | | | | | | | 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
* igc(4): Fix attach for I226-K and LMVP devicesEric Joyner2025-02-261-0/+2
| | | | | | | | | | | | | | | | | | | 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
* igc: Remove unused register IGC_RXD_SPC_VLAN_MASKKevin Bowling2025-02-131-1/+0
| | | | | | | 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
* igc.4: Add I226 and other additions to supported listKevin Bowling2024-12-031-1/+1
| | | | MFC after: 3 days
* igc: disable hw.igc.sbpKevin Bowling2024-11-241-2/+2
| | | | | | | Similar to 548d8a131d536d5f in e1000, disable this by default. MFC after: 3 days Sponsored by: BBOX.io
* igc: Style pass igc_txrxKevin Bowling2024-11-241-18/+27
| | | | | | | Fix up indentation and reflow long lines. MFC after: 3 days Sponsored by: BBOX.io
* igc: Reflow long linesKevin Bowling2024-11-241-55/+98
| | | | | MFC after: 3 days Sponsored by: BBOX.io
* igc: Normalize indentation a bitKevin Bowling2024-11-241-147/+147
| | | | | MFC after: 3 days Sponsored by: BBOX.io
* igc: sysctl for TCP flag handling during TSOKevin Bowling2024-11-212-0/+61
| | | | | | | | | | | | 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
* igc: Remove a bogus register write in igc_if_queues_free()Mark Johnston2024-10-261-2/+0
| | | | | | | | | | | | | | | | | 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
* igc: txrx function prototype cleanupKevin Bowling2024-10-141-17/+15
| | | | | | | | 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
* igc: Function prototype cleanupKevin Bowling2024-10-141-43/+43
| | | | | | | | 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
* igc: Rename 'struct adapter' to 'struct igc_softc'Kevin Bowling2024-10-143-517/+517
| | | | | | | | | 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
* igc: Add sysctls for some missing MAC statsKevin Bowling2024-10-141-0/+19
| | | | | MFC after: 1 week Sponsored by: BBOX.io
* igc: Add sysctl for DMA CoalesceKevin Bowling2024-10-141-0/+56
| | | | | | | | | | | | | | 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
* igc: Want AIM at 2.5GKevin Bowling2024-10-131-1/+1
| | | | | | | | | 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
* igc: Improve a comment and update copyright datesKevin Bowling2024-10-121-2/+2
| | | | MFC after: 1 week
* igc: Add AIMKevin Bowling2024-10-123-7/+256
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* igc: Add NVM/firmware prints and sysctlKevin Bowling2024-09-295-4/+229
| | | | | | | | | 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
* igc: Remove non-existent legacy absolute and packet timersKevin Bowling2024-09-293-173/+0
| | | | | | | | 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
* igb(4): Remove disconnected SYSCTLMarius Strobl2024-01-092-11/+0
| | | | | | | | | 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.
* iflib: invert default restart on VLAN changesKevin Bowling2023-08-241-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* 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.
* sys: Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-168-16/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* sys: Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-1611-22/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* igc: sync srrctl buffer sizing with e1000Kevin Bowling2023-08-101-11/+7
| | | | | | Approved by: grehan MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31493
* igc: Increase default per-queue interrupt rate to 20000.Peter Grehan2023-07-111-1/+1
| | | | | | | | | | | | | | | | | 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
* DrvAPI: Trivial mechanical conversions for various driversJustin Hibbits2022-12-212-9/+9
| | | | | | | | | | | | | | | | | 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.
* igc: Fix up hw vlan opsKevin Bowling2022-10-102-79/+19
| | | | | | | | | | | 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
* igc: remove unnecessary PHY ID checksMah Yock Gen2022-10-102-14/+3
| | | | | | | | | | | | | | | | | 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
* igc: Don't start in promiscious mode by defaultHubert Mazur2022-09-191-1/+1
| | | | | | | | | | | | 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
* igc: Change default duplex settingKornel Dulęba2022-07-011-6/+6
| | | | | | | | | | | | | | | | | | 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
* igc: Increase rx_buffer_size local variable to 32bKevin Bowling2022-05-171-1/+1
| | | | | | | | | | 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
* igc: Fix typo in PCI ID define usageKevin Bowling2022-05-151-1/+1
| | | | | | Reported by: jenkins Fixes: bf0aa72f1f59 igc: Update PCI IDs MFC after: 3 days
* igc: Update PCI IDsKevin Bowling2022-05-152-1/+3
| | | | | | | | 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
* igc: Remove unused devclass argument to DRIVER_MODULE.John Baldwin2022-05-061-2/+1
|
* Default to always accepting the PHY that's present. Linux didScott Long2022-02-271-3/+1
| | | | | | | | 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
* igc: Remove redundant IFCAP_VLAN_HWTAGGING checkKevin Bowling2021-12-291-2/+1
| | | | | | | | | | | 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
* net: iflib: fix vlan processing in the driversVincenzo Maffione2021-12-281-5/+3
| | | | | | | | | | | | | | 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
* Fix 'take effect' spelling in menus and comments.betterentley2021-11-191-1/+1
| | | | | Signed-off-by: John Bentley <johnbentley.public@gmail.com> Pull Request: https://github.com/freebsd/freebsd-src/pull/559
* igc: Use hardware routine for PHY resetPeter Grehan2021-11-086-61/+5
| | | | | | | | | | | | | | | | | | | | | 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
* igc: correctly update RCTL when changing multicast filters.Peter Grehan2021-10-221-3/+3
| | | | | | | | | | | | | | 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
* igc: sync igc_txrx with igb(4)Kevin Bowling2021-07-311-39/+53
| | | | | | Reviewed by: grehan MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31227
* igc(4): Introduce new driver for the Intel I225 Ethernet controller.Peter Grehan2021-07-1219-0/+11996
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