#
7390daf8 |
| 24-Nov-2024 |
Kevin Bowling <kbowling@FreeBSD.org> |
e1000: Style txrx
Fix up indentation and reflow long lines.
MFC after: 3 days Sponsored by: BBOX.io
|
#
9dc452b9 |
| 14-Oct-2024 |
Kevin Bowling <kbowling@FreeBSD.org> |
e1000: txrx function prototype cleanup
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
|
#
3e501ef8 |
| 22-Sep-2024 |
Kevin Bowling <kbowling@FreeBSD.org> |
e1000: Re-add AIM
We originally left this out because iflib modulates interrupts and accomplishes some level of batching versus the custom queues in the older driver. Upon more detailed study of the
e1000: Re-add AIM
We originally left this out because iflib modulates interrupts and accomplishes some level of batching versus the custom queues in the older driver. Upon more detailed study of the Linux driver which has a newer 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.
I have retroactively added it to lem(4) and em(4) where the same concept applies, albeit to a single ITR register.
[1]: http://iommu.com/datasheets/ethernet/controllers-nics/intel/e1000/gbe-controllers-interrupt-moderation-appl-note.pdf
Tested by: cc (https://wiki.freebsd.org/chengcui/testD46768) MFC after: 1 week Relnotes: yes Sponsored by: Rubicon Communications, LLC ("Netgate") Sponsored by: BBOX.io Differential Revision: https://reviews.freebsd.org/D46768
show more ...
|
Revision tags: release/13.4.0, release/14.1.0, release/13.3.0, release/14.0.0 |
|
#
71625ec9 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: one-line .c comment pattern
Remove /^/[*/]\s*\$FreeBSD\$.*\n/
|
Revision tags: release/13.2.0, release/12.4.0, release/13.1.0 |
|
#
f7926a6d |
| 28-Dec-2021 |
Vincenzo Maffione <vmaffione@FreeBSD.org> |
net: iflib: fix vlan processing in the drivers
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 the
net: iflib: fix vlan processing in the drivers
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
show more ...
|
Revision tags: release/12.3.0 |
|
#
dc926051 |
| 25-Sep-2021 |
Kevin Bowling <kbowling@FreeBSD.org> |
e1000: Rename 'struct adapter' to 'struct e1000_sc'
Rename the 'struct adapter' to 'struct e1000_sc' to avoid type ambiguity in things like kgdb.
Reviewed by: jhb, markj MFC after: 3 days Different
e1000: Rename 'struct adapter' to 'struct e1000_sc'
Rename the 'struct adapter' to 'struct e1000_sc' to avoid type ambiguity in things like kgdb.
Reviewed by: jhb, markj MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D32129
show more ...
|
#
1bbdc25f |
| 17-Sep-2021 |
Kevin Bowling <kbowling@FreeBSD.org> |
e1000: Use C99 bool types
Approved by: imp MFC after: 1 week
|
Revision tags: release/13.0.0, release/12.2.0 |
|
#
6b9d35fa |
| 06-Jul-2020 |
Guinan Sun <guinanx.sun@intel.com> |
e1000: remove duplicated phy codes
Add two files base.c and base.h to reduce the redundancy in the silicon family code. Remove the code duplication from e1000_82575 files. Clean family specific func
e1000: remove duplicated phy codes
Add two files base.c and base.h to reduce the redundancy in the silicon family code. Remove the code duplication from e1000_82575 files. Clean family specific functions from base. Fix up a stray and duplicate function declaration.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Sasha Neftin <sasha.neftin@intel.com> Signed-off-by: Guinan Sun <guinanx.sun@intel.com> Reviewed-by: Wei Zhao <wei.zhao1@intel.com>
Approved by: imp Obtained from: DPDK (44dddd14059f151f39f7e075b887decfc9a10f11) MFC after: 1 week
show more ...
|
#
ff01d634 |
| 31-Jul-2021 |
Kevin Bowling <kbowling@FreeBSD.org> |
igb: clean up igb_txrx comments
Reviewed by: grehan MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D31227
|
#
9fd0cda9 |
| 20-Jul-2021 |
Kevin Bowling <kbowling@FreeBSD.org> |
e1000: Add missing branch prediction
I missed this edit from the ixgbe review (D30074)
Reviewed by: gallatin MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D30073
|
#
41f02257 |
| 20-Jul-2021 |
Kevin Bowling <kbowling@FreeBSD.org> |
e1000: Clean up igb_txrx
The intention here is to reduce differences between em, igb, igc, ixgbe.
The main functional change is logical simplification in igb_rx_checksum and getting interface caps
e1000: Clean up igb_txrx
The intention here is to reduce differences between em, igb, igc, ixgbe.
The main functional change is logical simplification in igb_rx_checksum and getting interface caps from scctx instead of the ifp.
Reviewed by: gallatin, markj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D30073
show more ...
|
#
ffe3def9 |
| 08-Mar-2021 |
Mark Johnston <markj@FreeBSD.org> |
iflib: Make if_shared_ctx_t a pointer to const
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 instanc
iflib: Make if_shared_ctx_t a pointer to const
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
show more ...
|
Revision tags: release/11.4.0, release/12.1.0, release/11.3.0 |
|
#
7e565c55 |
| 30-Jan-2019 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r343320 through r343570.
|
#
088a0b27 |
| 24-Jan-2019 |
Eric Joyner <erj@FreeBSD.org> |
intel iflib drivers: correct initialization of tx_cidx_processed
From Jake:
In r341156 ("Fix first-packet completion", 2018-11-28) a hack to work around a delta calculation determining how many des
intel iflib drivers: correct initialization of tx_cidx_processed
From Jake:
In r341156 ("Fix first-packet completion", 2018-11-28) a hack to work around a delta calculation determining how many descriptors were used was added to ixl_isc_tx_credits_update_dwb.
The same fix was also applied to the em and igb drivers in r340310, and to ix in r341156.
The hack checked the case where prev and cur were equal, and then added one. This works, because by the time we do the delta check, we already know there is at least one packet available, so the delta should be at least one.
However, it's not a complete fix, and as indicated by the comment is really a hack to work around the real bug.
The real problem is that the first time that we transmit a packet, tx_cidx_processed will be set to point to the start of the ring. Ultimately, the credits_update function expects it to point to the *last* descriptor that was processed. Since we haven't yet processed any descriptors, pointing it to 0 results in this incorrect calculation.
Fix the initialization code to have it point to the end of the ring instead. One way to think about this, is that we are setting the value to be one prior to the first available descriptor.
Doing so, corrects the delta calculation in all cases. The original fix only works if the first packet has exactly one descriptor. Otherwise, we will report 1 less than the correct value.
As part of this fix, also update the MPASS assertions to match the real expectations. First, ensure that prev is not equal to cur, since this should never happen. Second, remove the assertion about prev==0 || delta != 0. It looks like that originated from when the em driver was converted to iflib. It seems like it was supposed to ensure that delta was non-zero. However, because we originally returned 0 delta for the first calculation, the "prev == 0" was tacked on.
Instead, replace this with a check that delta is greater than zero, after the correction necessary when the ring pointers wrap around.
This new solution should fix the same bug as r341156 did, but in a more robust way.
Submitted by: Jacob Keller <jacob.e.keller@intel.com> Reviewed by: shurd@ Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D18545
show more ...
|
Revision tags: release/12.0.0 |
|
#
9b5cb2f6 |
| 12-Nov-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r340235 through r340367.
|
#
cf49cdd5 |
| 09-Nov-2018 |
Stephen Hurd <shurd@FreeBSD.org> |
Fix first-packet completion
The first packet after the ring is initialized was never completed as isc_txd_credits_update() would not include it in the count of completed packets. This caused netmap
Fix first-packet completion
The first packet after the ring is initialized was never completed as isc_txd_credits_update() would not include it in the count of completed packets. This caused netmap to never complete a batch. See PR 233022 for more details.
PR: 233022 Reported by: lev Reviewed by: lev MFC after: 3 days Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D17931
show more ...
|
#
c6879c6c |
| 23-Oct-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r339015 through r339669.
|
#
adf93b56 |
| 14-Oct-2018 |
Eric Joyner <erj@FreeBSD.org> |
em/igb/ix(4): Port two Tx/Rx fixes made to ixl in r339338
- Fix assert/panic on receive when Jumbo Frames are enabled.
From the commit I made to ixl: "It turns out that *_isc_rxd_available is suppo
em/igb/ix(4): Port two Tx/Rx fixes made to ixl in r339338
- Fix assert/panic on receive when Jumbo Frames are enabled.
From the commit I made to ixl: "It turns out that *_isc_rxd_available is supposed to return how many packets are available to be cleaned on the rx ring. This patch removes a section of code where if the budget argument is 1, the function would return one if there was a descriptor available, not necessarily a packet.
This is okay in regular mtu 1500 traffic since the max frame size is less than the configured receive buffer size (2048), but this doesn't work when received packets can span more than one descriptor, as is the case when the mtu is 9000 and the receive buffer size is 4096."
- Fix possible Tx hang because *_isc_txd_credits_update returns incorrect result
From the commit by Krzysztof Galazka to ixl: "Function isc_txd_update_credits called with clear set to false should return 1 if there are TX descriptors already handled by HW. It was always returning 0 causing troubles with UDP TX traffic."
PR: 231659 Reported by: lev@ Approved by: re (gjb@) Sponsored by: Intel Corporation
show more ...
|
#
fc3f42d8 |
| 08-Oct-2018 |
Glen Barber <gjb@FreeBSD.org> |
MFH r339206-r339212, r339215-r339239
Sponsored by: The FreeBSD Foundation
|
#
e873ccd0 |
| 05-Oct-2018 |
Stephen Hurd <shurd@FreeBSD.org> |
Fix igb corrupting checksums with BPF and VLAN
When using a vlan with igb and the vlanhwcsum option, any mbufs which already had the TCP, UDP, or SCTP checksum calculated and therefore don't have th
Fix igb corrupting checksums with BPF and VLAN
When using a vlan with igb and the vlanhwcsum option, any mbufs which already had the TCP, UDP, or SCTP checksum calculated and therefore don't have the CSUM_[IP|IP6]_[TCP|UDP|SCTP] bits set in the csum_flags field would have the L4 checksum corrupted by the hardware.
This was caused by the driver setting E1000_TXD_POPTS_TXSM any time a checksum bit was set OR a vlan tag was present.
The patched driver only sets E1000_TXD_POPTS_TXSM when an offload is requested.
PR: 231416 Reported by: pi Approved by: re (gjb) Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D17404
show more ...
|
Revision tags: release/11.2.0 |
|
#
fbf8b74c |
| 11-Apr-2018 |
Mark Johnston <markj@FreeBSD.org> |
Use C99 initializers for iflib function tables.
Reviewed by: sbruno MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D15041
|
#
4fc74049 |
| 29-Dec-2017 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r327169 through r327340.
|
#
151ba793 |
| 25-Dec-2017 |
Alexander Kabaev <kan@FreeBSD.org> |
Do pass removing some write-only variables from the kernel.
This reduces noise when kernel is compiled by newer GCC versions, such as one used by external toolchain ports.
Reviewed by: kib, andrew(
Do pass removing some write-only variables from the kernel.
This reduces noise when kernel is compiled by newer GCC versions, such as one used by external toolchain ports.
Reviewed by: kib, andrew(sys/arm and sys/arm64), emaste(partial), erj(partial) Reviewed by: jhb (sys/dev/pci/* sys/kern/vfs_aio.c and sys/kern/kern_synch.c) Differential Revision: https://reviews.freebsd.org/D10385
show more ...
|
#
54b4b13c |
| 24-Dec-2017 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r326936 through r327149.
|
#
96fc97c8 |
| 19-Dec-2017 |
Stephen Hurd <shurd@FreeBSD.org> |
Update Matthew Macy contact info
Email address has changed, uses consistent name (Matthew, not Matt)
Reported by: Matthew Macy <mmacy@mattmacy.io> Differential Revision: https://reviews.freebsd.org
Update Matthew Macy contact info
Email address has changed, uses consistent name (Matthew, not Matt)
Reported by: Matthew Macy <mmacy@mattmacy.io> Differential Revision: https://reviews.freebsd.org/D13537
show more ...
|