History log of /freebsd/sys/dev/e1000/if_em.c (Results 1 – 25 of 513)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 40203513 29-Nov-2024 Kevin Bowling <kbowling@FreeBSD.org>

e1000: Remove old itr sysctl handler

This implementation had various bugs. bde@ reported that the unit
conversion/scaling is wrong, and it also does not handle 82574L or
igb(4) devices correctly.

e1000: Remove old itr sysctl handler

This implementation had various bugs. bde@ reported that the unit
conversion/scaling is wrong, and it also does not handle 82574L or
igb(4) devices correctly.

With the new AIM code, it is expected most users will not need to
manually tune this.

If you do need static control:
hw.em.enable_aim=0 for all interfaces at boot or dev.em.X.enable_aim=0
for individual interfaces at runtime and they will track the
hw.em.max_interrupt_rate tunable. That codepath has been bugfixed for
all supported chipsets.

You may view the current rate with dev.em.X.queue_rx_0.interrupt_rate
which has been bugfixed for all supported chipsets.

If you need to set different rates per interface for some reason let me
know and I will rethink how to add this back. Otherwise you can leave
AIM on for general purpose interfaces and disable it at runtime on
special purpose low or high latency interfaces that would track
hw.em.max_interrupt_rate if you have a mix of concerns.

PR: 235031
Reported by: Bruce Evans <bde@FreeBSD.org>
MFC after: 3 days
Relnotes: yes
Sponsored by: BBOX.io

show more ...


Revision tags: release/14.2.0
# 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


# 6f148830 24-Nov-2024 Kevin Bowling <kbowling@FreeBSD.org>

e1000: Style pass on if_em

Fix up some indentation and reflow long lines

MFC after: 3 days
Sponsored by: BBOX.io


# bceec3d8 23-Nov-2024 Kevin Bowling <kbowling@FreeBSD.org>

e1000: Try auto-negotiation for fixed 100 or 10 configuration

This is a retread of https://reviews.freebsd.org/D34449 which I think
will fix the issue for the remote side not supporting autoneg. We

e1000: Try auto-negotiation for fixed 100 or 10 configuration

This is a retread of https://reviews.freebsd.org/D34449 which I think
will fix the issue for the remote side not supporting autoneg. We now
attempt an autoneg, and if that fails fall back to the current code
that forces the link speed/duplex.

The original intent of this patch is to inform the remote switch of
duplex settings when we (the client) are specifying a fixed 10 or 100
speed. Otherwise it may get the duplex setting wrong.

The tricky case is when the remote (switch) side is fixing its
speed AND duplex while disabling autoneg and we (client) need to do
the same, which still seems to be common enough at some ISPs.

Original commit message follows:
Currently if an e1000 interface is set to a fixed media configuration,
for gigabit, it will participate in auto-negotiation as required by
IEEE 802.3-2018 Clause 37. However, if set to fixed media configuration
for 100 or 10, it does NOT participate in auto-negotiation.

By my reading of Clauses 28 and 37, while auto-negotiation is optional
for 100 and 10, it is not prohibited and is, in fact, "highly
recommended".

This patch enables auto-negotiation for fixed 100 and 10 media
configuration, in a similar manner to that already performed for 1000.
I.e., the patch enables advertising of just the manually configured
settings with the goal of allowing the remote end to match the manually
configured settings if it has them available.

To be clear, this patch does NOT allow an em(4) interface that has been
manually configured with specific media settings to respond to
auto-negotiation by then configuring different parameters to those that
were manually configured. The intent of this patch is to fully comply
with the requirements of Clause 37, but for 100 and 10.

The need for this has arisen on an em(4) link where the other end is
under a different administrative control and is set to full
auto-negotiation. Due to the cable length GigE is not working well. It
is desired to set the em(4) end to "media 100baseTX mediatype
full-duplex" which does work when both ends are configured that way.
Currently, because em(4) does not participate in autoneg for this
setting, the remote defaults to half-duplex - i.e., there's a duplex
mismatch and things don't work. With this patch, em(4) would inform the
remote that it has only 100baseTX full, the remote would match that and
it will work.

Tested by: Natalino Picone <natalino.picone@nozominetworks.com>
Tested by: Franco Fichtner <franco@opnsense.org>
Tested by: J.R. Oldroyd <fbsd@opal.com> (previous version)
Sponsored by: Nozomi Networks
Sponsored by: BBOX.io
Differential Revision: https://reviews.freebsd.org/D47336

show more ...


# 90853dfa 21-Nov-2024 Michael Tuexen <tuexen@FreeBSD.org>

e1000: sysctl for TCP flag handling during TSO

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 o

e1000: sysctl for TCP flag handling during TSO

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.

Reviewed by: rrs
MFC after: 3 days
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D44259

show more ...


# 77b70ad7 24-Oct-2024 Kevin Bowling <kbowling@FreeBSD.org>

e1000: Move I219 LM19/V19 to ADL

This roughly corresponds to Linux 9d9e5347b035412daa844f884b94a05bac94f864

For FreeBSD this is currently not expected to cause any difference in
behavior because we

e1000: Move I219 LM19/V19 to ADL

This roughly corresponds to Linux 9d9e5347b035412daa844f884b94a05bac94f864

For FreeBSD this is currently not expected to cause any difference in
behavior because we do not have the MTP force smbus changes for modern
standby.

MFC after: 3 days
Sponsored by: BBOX.io

show more ...


# 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 ...


# 9bf9164f 27-Sep-2024 Kevin Bowling <kbowling@FreeBSD.org>

e1000: Clean up ITR/EITR in preparation for AIM

Provide macros to derive the various needed values and make it a bit
more clear the differences between em and igb.

The igb default EITR was not land

e1000: Clean up ITR/EITR in preparation for AIM

Provide macros to derive the various needed values and make it a bit
more clear the differences between em and igb.

The igb default EITR was not landing at the right offset.

Respect the 'max_interrupt_rate' tunable.

MFC after: 1 week
Sponsored by: BBOX.io

show more ...


# 1c578f1c 27-Sep-2024 Kevin Bowling <kbowling@FreeBSD.org>

e1000: Clean up legacy absolute and packet timers

The absolute and packet timers only apply to lem and em with some only
applying to the later.

This cleans up the sysctl tree to only show these whe

e1000: Clean up legacy absolute and packet timers

The absolute and packet timers only apply to lem and em with some only
applying to the later.

This cleans up the sysctl tree to only show these where applicable and
stops writing to unexpected registers for igb.

MFC after: 1 week
Sponsored by: BBOX.io

show more ...


# c9021340 24-Sep-2024 Kevin Bowling <kbowling@FreeBSD.org>

e1000: Add sysctl for igb(4) DMA Coalesce

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

e1000: Add sysctl for igb(4) DMA Coalesce

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: Blue Box Systems

show more ...


# 2e78e568 24-Sep-2024 Kevin Bowling <kbowling@FreeBSD.org>

e1000: Handle igb EEE sysctl

MFC after: 1 week
Sponsored by: Blue Box Systems


# aa7d086a 24-Sep-2024 Kevin Bowling <kbowling@FreeBSD.org>

e1000: Add sysctls for some missing MAC stats

MFC after: 1 week
Sponsored by: Blue Box Systems


# 5f6964d9 22-Sep-2024 Kevin Bowling <kbowling@FreeBSD.org>

e1000: drop NEEDGIANT from em_sysctl_debug_info use

The write is only used to toggle the debug print function and this is
otherwise stateless.

MFC after: 1 week


# c11a0649 22-Sep-2024 Kevin Bowling <kbowling@FreeBSD.org>

e1000: drop NEEDGIANT on em_sysctl_reg_handler uses

These are simple singular diagnostic register reads

MFC after: 1 week


# f6e1b567 22-Sep-2024 Kevin Bowling <kbowling@FreeBSD.org>

e1000: remove NEEDGIANT from a couple sysctls

These are internally locked already

MFC after: 1 week


# ddfec1fb 21-Sep-2024 Kevin Bowling <kbowling@FreeBSD.org>

e1000: Update igb driver version to 2.5.28-fbsd

Bump to the current out of tree driver version since we only have some
gratuitous changes.

MFC after: 1 week


Revision tags: release/13.4.0, release/14.1.0, release/13.3.0
# 0d6d28ce 09-Jan-2024 Marius Strobl <marius@FreeBSD.org>

e1000(4): Remove disconnected SYSCTL

The global hw.em.rx_process_limit knob has been replaced by the device-
specific dev.IF.N.iflib.rx_budget along with the conversion to iflib(4).

While at it, re

e1000(4): Remove disconnected SYSCTL

The global hw.em.rx_process_limit knob has been replaced by the device-
specific dev.IF.N.iflib.rx_budget along with the conversion to iflib(4).

While at it, remove the - besides initialization of tx_process_limit -
unused {r,t}x_process_limit members.

show more ...


Revision tags: release/14.0.0
# 725e4008 24-Aug-2023 Kevin Bowling <kbowling@FreeBSD.org>

iflib: invert default restart on VLAN changes

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 re

iflib: invert default restart on VLAN changes

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

show more ...


# 51e23514 16-Aug-2023 Marius Strobl <marius@FreeBSD.org>

iflib drivers: Constify PCI ID LUTs

Since d49e83eac3baf16a22b1c5d42e8438b68b17e6f9, iflib(9) is ready
for this change.
While at it, make isc_driver_version strings (static) const where
not apparentl

iflib drivers: Constify PCI ID LUTs

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.

show more ...


# 71625ec9 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line .c comment pattern

Remove /^/[*/]\s*\$FreeBSD\$.*\n/


# 797e480c 15-Aug-2023 Kevin Bowling <kbowling@FreeBSD.org>

e1000: disable TSO on lem(4) and em(4)

Disable TSO on lem(4) and em(4) until a ring stall can be debugged.

I am not able to reproduce the issue on lem(4) but disabling there in
abundance of caution

e1000: disable TSO on lem(4) and em(4)

Disable TSO on lem(4) and em(4) until a ring stall can be debugged.

I am not able to reproduce the issue on lem(4) but disabling there in
abundance of caution in case the issue is not specific to em(4).

Reported by: grog

show more ...


# 13da8423 09-Aug-2023 Kevin Bowling <kbowling@FreeBSD.org>

e1000: Enable TSO on 82574

Further testing indicates something wrong with particular reciever,
enabling TSO 82574 for wider testing.

Tested by: karels
MFC after: 3 months


# f1b5488f 03-Aug-2023 Kevin Bowling <kbowling@FreeBSD.org>

e1000: Enable TSO for lem(4) and em(4)

Most em(4) devices now enjoy TSO and TSO6, matching NetBSD and Linux
defaults.

A prior commit automasks TSO on 10/100 Ethernet due to errata and other
bugs fo

e1000: Enable TSO for lem(4) and em(4)

Most em(4) devices now enjoy TSO and TSO6, matching NetBSD and Linux
defaults.

A prior commit automasks TSO on 10/100 Ethernet due to errata and other
bugs for IPv6 were fixed recently allowing this.

Mike Karels identified a performance anomaly on Intel 82574L devices.
These are multiqueue enabled on FreeBSD since the conversion to
iflib. I am investigating whether this can be fixed, in the mean time
MSI-X with checksum offloads remain default.

i219 SPT devices have an errata that downclocks the DMA engine, which
results in TSO not being able to acheive line rate. Therefore, it is
disabled on:
* Intel(R) I219-LM and I219-V SPT
* Intel(R) I219-LM and I219-V SPT-H (2)
* Intel(R) I219-LM and I219-V LBG (3)
* Intel(R) I219-LM and I219-V SPT (4)
* Intel(R) I219-LM and I219-V SPT (5)

Many lem(4) devices enjoy TSO, exceptions being 82542, 82543, 82547.
TSO6 may be possible for some chipsets but I am still working through
my testing matrix and that is hidden behind hw.em.unsupported_tso.

If you encounter issues, you may disable TSO with for example:
ifconfig em0 -tso -tso6.
I ask to be informed of any deviations from normal operation requiring
this.

Thanks to cc@ for access to emulab.net.

On a sample I219 system it saves about 16% CPU on IPv4 and 19% on IPv6.

iperf3 -Vc reported numbers:
total% user% system%

IPv4 TSO
21.3 7 14.4
21.4 6 15.4
21.5 6 15.5

IPv4 no TSO
36.8 5.4 31.4
38.5 5.1 33.5
38.2 5.7 32.6

IPv4 no TSO no TXCSUM
45.1 5.8 39.3
46 6.3 39.7
46.2 5.9 40.4

IPv6 TSO6
21.7 5.4 16.3
21.6 5.1 16.5
21.9 5.6 16.3

IPv6 no TSO6
41.2 5.2 36
41 5.1 36
40.8 5.2 35.7

IPv6 no TSO6 no TXCSUM6
49 5.9 43.1
48.8 4.9 43.9
49 5.6 43.4

Tested by: cc (lem(4)), karels (82574L)
MFC after: 3 months
Relnotes: yes
Sponsored by: BBOX.io
Differential Revision: https://reviews.freebsd.org/D41170

show more ...


# 2ddf24f8 03-Aug-2023 Kevin Bowling <kbowling@FreeBSD.org>

e1000: Automask TSO on lem(4)/em(4) 10/100 Ethernet

This feature masks TSO capability when a link comes up at 10 or 100mbit
due to errata on the chips. This behavior matches previous versions of
Fr

e1000: Automask TSO on lem(4)/em(4) 10/100 Ethernet

This feature masks TSO capability when a link comes up at 10 or 100mbit
due to errata on the chips. This behavior matches previous versions of
FreeBSD as well as NetBSD and Linux.

A tunable, hw.em.unsupported_tso may be set if the admin desires to
disabling automasking and configure TSO settings manually.

MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D41170

show more ...


# e1353dcb 31-Jul-2023 Kevin Bowling <kbowling@FreeBSD.org>

e1000: Fix lem(4)/em(4) TSO6

* Fix TSO6 by specializing IP checksum insertion and following Intel SDM
values for IPv6.
* Remove unnecessary 82544 IP-bit handling
* Remove TSO6 from lem(4) capabili

e1000: Fix lem(4)/em(4) TSO6

* Fix TSO6 by specializing IP checksum insertion and following Intel SDM
values for IPv6.
* Remove unnecessary 82544 IP-bit handling
* Remove TSO6 from lem(4) capabilitities

Reviewed by: erj (earlier version)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D41170

show more ...


12345678910>>...21