Bug 271371 - e1000 driver falsely reports that it supports LRO
Summary: e1000 driver falsely reports that it supports LRO
Status: Closed Not A Bug
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: Kevin Bowling
URL:
Keywords: IntelNetworking
Depends on:
Blocks:
 
Reported: 2023-05-11 23:15 UTC by Ed Maste
Modified: 2023-08-12 16:27 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Maste freebsd_committer freebsd_triage 2023-05-11 23:15:14 UTC
in sys/dev/e1000/if_em.c em and igb include IFCAP_LRO

#define LEM_CAPS                                                        \
    IFCAP_HWCSUM | IFCAP_VLAN_MTU | IFCAP_VLAN_HWTAGGING |              \
    IFCAP_VLAN_HWCSUM | IFCAP_WOL | IFCAP_VLAN_HWFILTER

#define EM_CAPS                                                         \
    IFCAP_HWCSUM | IFCAP_VLAN_MTU | IFCAP_VLAN_HWTAGGING |              \
    IFCAP_VLAN_HWCSUM | IFCAP_WOL | IFCAP_VLAN_HWFILTER | IFCAP_TSO4 |  \
    IFCAP_LRO | IFCAP_VLAN_HWTSO

#define IGB_CAPS                                                        \
    IFCAP_HWCSUM | IFCAP_VLAN_MTU | IFCAP_VLAN_HWTAGGING |              \
    IFCAP_VLAN_HWCSUM | IFCAP_WOL | IFCAP_VLAN_HWFILTER | IFCAP_TSO4 |  \
    IFCAP_LRO | IFCAP_VLAN_HWTSO | IFCAP_JUMBO_MTU | IFCAP_HWCSUM_IPV6 |\
    IFCAP_TSO6

but there is no other reference to LRO in the driver, after f2d6ace4a684 which migrated lem/em/igb to iflib
Comment 1 Eric Joyner freebsd_committer freebsd_triage 2023-05-15 22:19:17 UTC
I don't understand this bug?

The IFCAP_LRO capability gets passed to iflib via the isc_capenable/isc_capabilities fields via the driver's if_softc_ctx_t object, then those are used in a if_setcapabilities/if_setcapenable() call in iflib when the driver loads. Then iflib sets up the lro context and handles sending packets via LRO's tcp_lro_rx() instead of the regular if_input() routine.

iflib ends up handling most of it, but the driver still needs to set IFCAP_LRO if it wants iflib to use LRO.
Comment 2 Kevin Bowling freebsd_committer freebsd_triage 2023-07-26 09:01:47 UTC
(In reply to Eric Joyner from comment #1)
Agreed