History log of /freebsd/sys/dev/e1000/em_txrx.c (Results 1 – 25 of 53)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# efcc0423 05-Feb-2026 Cheng Cui <cc@FreeBSD.org>

em: remove M_HASHTYPE when RSS is not enabled

Summary:
Since "73fe85e486d2 tcp: store flowid info in syncache", inp_flowid can be set
if the incoming packet is not M_HASHTYPE_NONE. But this can intr

em: remove M_HASHTYPE when RSS is not enabled

Summary:
Since "73fe85e486d2 tcp: store flowid info in syncache", inp_flowid can be set
if the incoming packet is not M_HASHTYPE_NONE. But this can introduce dummy
and duplicated flowid when a virtual interface set M_HASHTYPE_OPAQUE. This
change will let the upper layer know how to deal with software hash, with
benefits like inp_flowid can be set correctly and m_pkthdr.flowid can be set
correctly in output path.

This fix is similar to "20285cad7a55"

Reviewed by: kbowling
Differential Revision: https://reviews.freebsd.org/D55137

show more ...


Revision tags: release/13.5.0-p9, release/15.0.0-p2, release/14.3.0-p8, release/15.0.0-p1, release/13.5.0-p8, release/14.3.0-p7, release/15.0.0, release/14.3.0-p6, release/13.5.0-p7
# e07b4a2e 22-Nov-2025 Andrew Gallatin <gallatin@FreeBSD.org>

e1000: use newly exposed RSS hash key API rather than ad-hoc hashing

Differential Revision: https://reviews.freebsd.org/D53097
Reviewed by: kbowling
Sponsored by: Netflix


Revision tags: release/13.5.0-p6, release/14.3.0-p5, release/13.5.0-p5, release/14.2.0-p7, release/14.3.0-p4, release/14.3.0-p3, release/14.2.0-p6, release/13.5.0-p4, release/13.5.0-p3, release/14.2.0-p5, release/14.3.0-p2, release/14.3.0-p1, release/14.2.0-p4, release/13.5.0-p2, release/14.3.0, release/13.4.0-p5, release/13.5.0-p1, release/14.2.0-p3, release/13.5.0, release/14.2.0-p2, release/14.1.0-p8, release/13.4.0-p4
# 4b29599f 13-Feb-2025 Aurelien Cazuc <aurelien.cazuc.external@stormshield.eu>

e1000: Fix vlan PCP/DEI on lem(4)

The vlan PCP and CFI/DEI were discarded when receiving vlan tagged
packets on lem(4) interfaces with vlanhwtag.

According to the 82540 SDM[1] (pg. 24), vlan tag is

e1000: Fix vlan PCP/DEI on lem(4)

The vlan PCP and CFI/DEI were discarded when receiving vlan tagged
packets on lem(4) interfaces with vlanhwtag.

According to the 82540 SDM[1] (pg. 24), vlan tag is in the standard
format, so there's no reason to discard PCP/DEI.

[1]: http://iommu.com/datasheets/ethernet/controllers-nics/intel/e1000/pci-pci-x-family-gbe-controllers-software-dev-manual.pdf

MFC after: 3 days
Sponsored by: Stormshield (author)
Differential Revision: https://reviews.freebsd.org/D48987

show more ...


Revision tags: release/14.1.0-p7, release/14.2.0-p1, release/13.4.0-p3, 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


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


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

e1000: Fix off by one ipcse

This has been off by one in the FreeBSD drivers as far back as I've
looked. Emperically HW and SW emulations I have available don't seem to
mind. Noticed while debuggin

e1000: Fix off by one ipcse

This has been off by one in the FreeBSD drivers as far back as I've
looked. Emperically HW and SW emulations I have available don't seem to
mind. Noticed while debugging other issues.

MFC after: 3 days

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


# cbcab907 28-Jul-2023 Kevin Bowling <kbowling@FreeBSD.org>

e1000: Corrections for lem(4)/em(4) txcsum offload

Explicitly set ipcss/ipcse/ipcso for IPv6 per intel SDM as indicated in
inline comments.

Fix and consolidate 82543/82547 hwcsum exemption.

While

e1000: Corrections for lem(4)/em(4) txcsum offload

Explicitly set ipcss/ipcse/ipcso for IPv6 per intel SDM as indicated in
inline comments.

Fix and consolidate 82543/82547 hwcsum exemption.

While here rearrange and expand some commentary.

show more ...


# 92fd2f39 23-Jul-2023 Kevin Bowling <kbowling@FreeBSD.org>

e1000: add missing parens in csum setup

Reported by: rscheff
Fixes: 4f9a44a215f8 e1000: Fix/enable IPv6 transmit checksum offload
MFC after: 2 weeks


# 4f9a44a2 23-Jul-2023 Kevin Bowling <kbowling@FreeBSD.org>

e1000: Fix/enable IPv6 transmit checksum offload

Fixes and enables txcsum6 offload for lem(4) and em(4).

MFC after: 2 weeks


# 918c2567 22-Jul-2023 Kevin Bowling <kbowling@FreeBSD.org>

e1000: lem(4)/em(4) ifcaps, TSO and hwcsum fixes

* em(4) obey administrative ifcaps for using hwcsum offload
* em(4) obey administrative ifcaps for hw vlan receive tagging
* em(4) add additional TSO

e1000: lem(4)/em(4) ifcaps, TSO and hwcsum fixes

* em(4) obey administrative ifcaps for using hwcsum offload
* em(4) obey administrative ifcaps for hw vlan receive tagging
* em(4) add additional TSO6 ifcap, but disabled by default as is TSO4
* lem(4) obey administrative ifcaps for using hwcsum offload
* lem(4) add support for hw vlan receive tagging
* lem(4) Add ifcaps for TSO offload experimentation, but disabled by
default due to errata and possibly missing txrx code.
* lem(4) disable HWCSUM ifcaps by default on 82547 due to errata around
full duplex links. It may still be administratively enabled.

Reviewed by: markj (previous version)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D30072

show more ...


# 5d3c9825 22-Jul-2023 Kevin Bowling <kbowling@FreeBSD.org>

Revert "e1000: lem(4)/em(4) ifcaps, TSO and hwcsum fixes"

Seems to cause a panic when booting under VitrualBox.

Reported by: yasu

This reverts commit 95f7b36e8fac45092b9a4eea5e32732e979989f0.


# 95f7b36e 21-Jul-2023 Kevin Bowling <kbowling@FreeBSD.org>

e1000: lem(4)/em(4) ifcaps, TSO and hwcsum fixes

* em(4) obey administrative ifcaps for using hwcsum offload
* em(4) obey administrative ifcaps for hw vlan receive tagging
* em(4) add additional TSO

e1000: lem(4)/em(4) ifcaps, TSO and hwcsum fixes

* em(4) obey administrative ifcaps for using hwcsum offload
* em(4) obey administrative ifcaps for hw vlan receive tagging
* em(4) add additional TSO6 ifcap, but disabled by default as is TSO4
* lem(4) obey administrative ifcaps for using hwcsum offload
* lem(4) add support for hw vlan receive tagging
* lem(4) Add ifcaps for TSO offload experimentation, but disabled by
default due to errata and possibly missing txrx code.
* lem(4) disable HWCSUM ifcaps by default on 82547 due to errata around
full duplex links. It may still be administratively enabled.

Reviewed by: markj (previous version)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D30072

show more ...


# 201c4b7c 21-Jul-2023 Kevin Bowling <kbowling@FreeBSD.org>

e1000: Some fixes for em(4) TSO setup

Always set TXD_CMD_IP for 82544
Otherwise set TXD_CMD_IP for IPv4, not IPv6

Reviewed by: markj (previous version)
MFC after: 2 weeks
Differential Revision: htt

e1000: Some fixes for em(4) TSO setup

Always set TXD_CMD_IP for 82544
Otherwise set TXD_CMD_IP for IPv4, not IPv6

Reviewed by: markj (previous version)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D30072

show more ...


# 5253d74e 09-Jun-2023 Kevin Bowling <kbowling@FreeBSD.org>

e1000: Format em_txrx

No functional changes intended.

Reviewed by: markj (prior version)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D30072


# 034f38cd 09-Jun-2023 Kevin Bowling <kbowling@FreeBSD.org>

e1000: Add SPDX tag to em_txrx

Reviewed by: markj
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D30072


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


# 52f45d8a 28-Dec-2021 Vincenzo Maffione <vmaffione@FreeBSD.org>

net: iflib: let the drivers use isc_capenable

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

net: iflib: let the drivers use isc_capenable

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

show more ...


# db0ac6de 02-Dec-2021 Cy Schubert <cy@FreeBSD.org>

Revert "wpa: Import wpa_supplicant/hostapd commit 14ab4a816"

This reverts commit 266f97b5e9a7958e365e78288616a459b40d924a, reversing
changes made to a10253cffea84c0c980a36ba6776b00ed96c3e3b.

A mism

Revert "wpa: Import wpa_supplicant/hostapd commit 14ab4a816"

This reverts commit 266f97b5e9a7958e365e78288616a459b40d924a, reversing
changes made to a10253cffea84c0c980a36ba6776b00ed96c3e3b.

A mismerge of a merge to catch up to main resulted in files being
committed which should not have been.

show more ...


# 266f97b5 02-Dec-2021 Cy Schubert <cy@FreeBSD.org>

wpa: Import wpa_supplicant/hostapd commit 14ab4a816

This is the November update to vendor/wpa committed upstream 2021-11-26.

MFC after: 1 month


Revision tags: release/12.3.0
# d0633af7 01-Dec-2021 Vincenzo Maffione <vmaffione@FreeBSD.org>

em: skip rxcsum offload processing when disabled

Similarly to the other Intel drivers, don't try to process
RX checksum offloads when this feature (IFCAP_RXCSUM) is
disabled.

Reviewed by: gallatin,

em: skip rxcsum offload processing when disabled

Similarly to the other Intel drivers, don't try to process
RX checksum offloads when this feature (IFCAP_RXCSUM) is
disabled.

Reviewed by: gallatin, kbowling, erj
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D33155

show more ...


# 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


123