Linux kernel source tree
Go to file
Jakub Kicinski 6fe66698b9 Merge branch 'net-stmmac-more-selftest-related-fixes'
Maxime Chevallier says:

====================
net: stmmac: More selftest related fixes

This series addresses some (but not all) issues found while running the
ethtool selftest on various stmmac platforms. As a reminder, ethtool
selftest are run with 'ethtool -t ethX', and for stmmac the goal is to test
hardware features and bugs from the IP integration in the platform.

I've been running this on :

 - Altera CycloneV (dwmac-socfpga, dwmac1000 IP, v3.70a)
 - NXP imx8mp (dwmac-imx, dwmac4, v5.10a)
 - Allwinner H2S (dwmac-sun8i, dwmac1000)
 - Amlogic S905X3 (dwmac-meson8b, dwmac1000, v3.70a)
 - STM32mp157a (dwmac-stm32, dwmac4, v4.20a)
 - SiFive JH7110 (dwmac-starfive, dwmac4, v5.20)

Here's the results before this series, noting that some bugs were already
fixed, some are ongoing (cf. the IP proto patch here [1])

[1] : https://lore.kernel.org/netdev/20260825211748.360935-1-maxime.chevallier@bootlin.com/

Tests are OK if return is 0 or -95 (-EOPNOTSUPP), tests are KO otherwise

Test                     imx   socfpga   sun8i   meson8b   stm32 starfive
MAC Loopback              0      0        0        0        0       0
MMC Counters              0      0        -95      -22      0       -22
EEE                       -95    -95      -95      -95      -95     -95
Hash Filter MC            0      0        -95      0        0       0
Perfect Filter UC         0      0        0        0        0       0
MC Filter                 0      0        -95      0        0       0
UC Filter                 0      0        -95      -22      0       0
Flow Control              -110   0        -110     0        0       -110
RSS                       -95    -95      -95      -95      -95     -95
VLAN Filtering            -110   -95      -95      -95      -110    -110
VLAN Filtering (perf)     -110   -95      -95      -95      -110    -110
Double VLAN Filter        -110   -95      -95      -95      -110    -110
Double VLAN Filter (perf) -110   -95      -95      -95      -110    -110
Flexible RX Parser        0      -95      -95      -95      -95     -95
SA Insertion (desc)       0      -95      -95      -95      0       0
SA Replacement (desc)     0      -95      -95      -95      0       0
SA Insertion (reg         0      -95      -95      -95      0       0
SA Replacement (reg)      0      -95      -95      -95      0       0
VLAN TX Insertion         -110   -95      -95      -95      -110    -110
SVLAN TX Insertion        -110   -95      -95      -95      -110    -95
L3 DA Filtering           0      -95      -95      -95      -95     -95
L3 SA Filtering           0      -95      -95      -95      -95     -95
L4 DA TCP Filtering       0      -95      -95      -95      -95     -95
L4 SA TCP Filtering       0      -95      -95      -95      -95     -95
L4 DA UDP Filtering       0      -95      -95      -95      -95     -95
L4 SA UDP Filtering       0      -95      -95      -95      -95     -95
ARP Offload               -95    -95      -95      -95      -110    -110
Jumbo Frame               0      0        0        0        0       0
Multichannel Jumbo        0      -95      -95      -95      -95     -95
Split Header             -95     -95      -95      -95      -95     -95
TBS (ETF Scheduler)      -95     -95      -95      -95      -95     -95

So, only sogfpga is all OK (in all fairness, it doesn't support much)

Several issues :

 - MMC test failing on starfive and meson8b, solved by patch 1

MMC counters maintained by the MAC are optional, which one is implemented
depends on how the IP is synthesized. On starfive and meson8b, the counter
used by the selftest to validate the MMC counters feature isn't implemented.

Solved by adding other counters in the validation step, kinda fragile as
this doesn't guarantee this will work on all platforms.

 - Flow control test failing on starfive, imx8mp, sun8i, solved by patch 6

Turns out these platforms actually never emit any Pause frame, as they don't
have enough room in their per-queue RX Fifo. They do correctly process RX
Pause frames. The fix isn't to change the advertised pauseparams, as the
pause negotiation process based on MAC capabilities doesn't allow us to
say we "just" support RX pause, so let's just not run the Pause tests if
the RX fifo is too small.

 - UC filter failing on meson8b, fixed by patches 2,3,4 and 5

This one is quite the rabbit hole, and is a combination of multiple issues.

 - Unicast filtering uses the same filter (perfect filter) to allow the
   primary MAC address and the secondary addresses (dev->uc) to flow
   through the interface. That means if we have say 64 slots in the
   perfect filter, only 63 can be used for the dev->uc list, as the first
   entry stores the MAC address. If the filter is full, we switch to UC
   promisc mode, were we let all UC frames flow. There's an off-by-one
   error in dwmac1000, dwmac4 and dwxgmac2.

 - The selftest itself needs an empty slot in the filter, so it has to
   check that sizeof(dev->uc) is $number_of_slots - 2 (one for primary
   MAC, one for the test). There's an off-by-two error in the selftest.

 - This leads to an interesting finding (not addressed by this series) :

   The size of the perfect filter isn't reported by the HW, so it comes
   from firmware (snps,perfect-filter-entries). A lot of platforms don't
   specify that in DT (e.g. imx8mp doesn't, it has 128 entries but the
   driver thinks there's only 1...). I've reached out to Synopsys to
   see if there's some sane default we could use on dwmac4, if anyone
   has a dwmac4 databook I'd appreciate if you could look this up, as I
   don't have access to them, I'm not a vendor... Otherwise, we'll have
   to patch all the .dtsi if we want to avoid going in UC promisc as
   soon as we add an entry in dev->uc.

After this series, socfpga, starfive and sun8i are all OK :)

Some issues are still out there, the VLAN filtering and tagging fails on
imx8mp and stm32 (so, dwmac4) butI haven't got there yet.

ARP offload doesn't work on stm32mp157a and starfive JH7110 either.
====================

Link: https://patch.msgid.link/20260826140500.616466-1-maxime.chevallier@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-27 10:53:33 -07:00
arch Networking changes for 7.3. 2026-08-20 08:16:04 -07:00
block fscrypt updates for 7.3 2026-08-17 19:04:16 -07:00
certs treewide: fix indentation and whitespace in Kconfig files 2026-05-28 21:24:42 -07:00
crypto This update includes the following changes: 2026-08-19 17:25:42 -07:00
Documentation docs: oa-tc6-framework: Fix link to specification 2026-08-20 13:31:54 -07:00
drivers net: stmmac: selftests: Don't test flow control for small rx fifos 2026-08-27 10:53:28 -07:00
fs tracefs updates for v7.3: 2026-08-19 14:18:45 -07:00
include virtio-net: Ensure that TCP packets don't overflow gso_segs 2026-08-27 15:47:17 +02:00
init VDSO updates: 2026-08-18 16:56:25 -07:00
io_uring io_uring/rsrc: reject overflowing regvec bvec byte counts 2026-08-12 19:53:35 -06:00
ipc vfs-7.3-rc1.lookup 2026-08-17 12:03:34 -07:00
kernel Networking changes for 7.3. 2026-08-20 08:16:04 -07:00
lib Networking changes for 7.3. 2026-08-20 08:16:04 -07:00
LICENSES LICENSES: Add modern form of the LGPL-2.1 tags to the usage guide section 2025-10-22 07:58:19 +02:00
mm memblock: updates for 7.3-rc1 2026-08-18 10:03:54 -07:00
net net: Guard for gso_segs overflow in skb_segment 2026-08-27 15:47:18 +02:00
rust lsm/stable-7.3 PR 20260814 2026-08-19 16:28:23 -07:00
samples tracing updates for v7.3: 2026-08-19 14:06:14 -07:00
scripts Major changes: 2026-08-20 07:36:20 -07:00
security integrity-v7.3 2026-08-19 17:17:17 -07:00
sound sound updates for 7.3-rc1 2026-08-19 10:04:59 -07:00
tools selftests: net: Fix slow configurations in big_tcp_tunnels.sh 2026-08-27 08:42:28 -07:00
usr usr: Correct a spelling by changing a letter 2026-08-05 14:51:58 +02:00
virt KVM/arm64 fixes for 7.2, take #2 2026-07-15 12:13:30 +02:00
.clang-format clang-format: fix formatting of guard() and scoped_guard() statements 2026-05-28 21:24:41 -07:00
.clippy.toml rust: bump Clippy's MSRV and clean incompatible_msrv allows 2026-04-07 09:51:39 +02:00
.cocciconfig
.editorconfig editorconfig: add rst extension 2026-01-26 19:07:09 -08:00
.get_maintainer.ignore .get_maintainer.ignore: add myself 2026-04-02 16:48:25 +02:00
.gitattributes .gitattributes: set diff driver for Rust source code files 2023-05-31 17:48:25 +02:00
.gitignore SPDX patches for 7.2-rc1 2026-06-22 12:06:22 -07:00
.mailmap There is a known WiFi/mt76 regression, waiting for a complete fix that 2026-08-13 08:37:26 -07:00
.pylintrc docs: Move the python libraries to tools/lib/python 2025-11-18 09:22:40 -07:00
.rustfmt.toml rust: add .rustfmt.toml 2022-09-28 09:02:20 +02:00
COPYING
CREDITS [GIT PULL for v7.3] media updates 2026-08-19 10:09:22 -07:00
Kbuild checksyscalls: move instance functionality into generic code 2026-04-05 09:21:32 +02:00
Kconfig io_uring: Rename KConfig to Kconfig 2025-02-19 14:53:27 -07:00
MAINTAINERS Networking changes for 7.3. 2026-08-20 08:16:04 -07:00
Makefile Kbuild/Kconfig updates for 7.3 2026-08-18 09:26:31 -07:00
README docs: add AI Coding Assistants documentation 2026-01-06 14:55:06 -07:00

Linux kernel
============

The Linux kernel is the core of any Linux operating system. It manages hardware,
system resources, and provides the fundamental services for all other software.

Quick Start
-----------

* Report a bug: See Documentation/admin-guide/reporting-issues.rst
* Get the latest kernel: https://kernel.org
* Build the kernel: See Documentation/admin-guide/quickly-build-trimmed-linux.rst
* Join the community: https://lore.kernel.org/

Essential Documentation
-----------------------

All users should be familiar with:

* Building requirements: Documentation/process/changes.rst
* Code of Conduct: Documentation/process/code-of-conduct.rst
* License: See COPYING

Documentation can be built with make htmldocs or viewed online at:
https://www.kernel.org/doc/html/latest/


Who Are You?
============

Find your role below:

* New Kernel Developer - Getting started with kernel development
* Academic Researcher - Studying kernel internals and architecture
* Security Expert - Hardening and vulnerability analysis
* Backport/Maintenance Engineer - Maintaining stable kernels
* System Administrator - Configuring and troubleshooting
* Maintainer - Leading subsystems and reviewing patches
* Hardware Vendor - Writing drivers for new hardware
* Distribution Maintainer - Packaging kernels for distros
* AI Coding Assistant - LLMs and AI-powered development tools


For Specific Users
==================

New Kernel Developer
--------------------

Welcome! Start your kernel development journey here:

* Getting Started: Documentation/process/development-process.rst
* Your First Patch: Documentation/process/submitting-patches.rst
* Coding Style: Documentation/process/coding-style.rst
* Build System: Documentation/kbuild/index.rst
* Development Tools: Documentation/dev-tools/index.rst
* Kernel Hacking Guide: Documentation/kernel-hacking/hacking.rst
* Core APIs: Documentation/core-api/index.rst

Academic Researcher
-------------------

Explore the kernel's architecture and internals:

* Researcher Guidelines: Documentation/process/researcher-guidelines.rst
* Memory Management: Documentation/mm/index.rst
* Scheduler: Documentation/scheduler/index.rst
* Networking Stack: Documentation/networking/index.rst
* Filesystems: Documentation/filesystems/index.rst
* RCU (Read-Copy Update): Documentation/RCU/index.rst
* Locking Primitives: Documentation/locking/index.rst
* Power Management: Documentation/power/index.rst

Security Expert
---------------

Security documentation and hardening guides:

* Security Documentation: Documentation/security/index.rst
* LSM Development: Documentation/security/lsm-development.rst
* Self Protection: Documentation/security/self-protection.rst
* Reporting Vulnerabilities: Documentation/process/security-bugs.rst
* CVE Procedures: Documentation/process/cve.rst
* Embargoed Hardware Issues: Documentation/process/embargoed-hardware-issues.rst
* Security Features: Documentation/userspace-api/seccomp_filter.rst

Backport/Maintenance Engineer
-----------------------------

Maintain and stabilize kernel versions:

* Stable Kernel Rules: Documentation/process/stable-kernel-rules.rst
* Backporting Guide: Documentation/process/backporting.rst
* Applying Patches: Documentation/process/applying-patches.rst
* Subsystem Profile: Documentation/maintainer/maintainer-entry-profile.rst
* Git for Maintainers: Documentation/maintainer/configure-git.rst

System Administrator
--------------------

Configure, tune, and troubleshoot Linux systems:

* Admin Guide: Documentation/admin-guide/index.rst
* Kernel Parameters: Documentation/admin-guide/kernel-parameters.rst
* Sysctl Tuning: Documentation/admin-guide/sysctl/index.rst
* Tracing/Debugging: Documentation/trace/index.rst
* Performance Security: Documentation/admin-guide/perf-security.rst
* Hardware Monitoring: Documentation/hwmon/index.rst

Maintainer
----------

Lead kernel subsystems and manage contributions:

* Maintainer Handbook: Documentation/maintainer/index.rst
* Pull Requests: Documentation/maintainer/pull-requests.rst
* Managing Patches: Documentation/maintainer/modifying-patches.rst
* Rebasing and Merging: Documentation/maintainer/rebasing-and-merging.rst
* Development Process: Documentation/process/maintainer-handbooks.rst
* Maintainer Entry Profile: Documentation/maintainer/maintainer-entry-profile.rst
* Git Configuration: Documentation/maintainer/configure-git.rst

Hardware Vendor
---------------

Write drivers and support new hardware:

* Driver API Guide: Documentation/driver-api/index.rst
* Driver Model: Documentation/driver-api/driver-model/driver.rst
* Device Drivers: Documentation/driver-api/infrastructure.rst
* Bus Types: Documentation/driver-api/driver-model/bus.rst
* Device Tree Bindings: Documentation/devicetree/bindings/
* Power Management: Documentation/driver-api/pm/index.rst
* DMA API: Documentation/core-api/dma-api.rst

Distribution Maintainer
-----------------------

Package and distribute the kernel:

* Stable Kernel Rules: Documentation/process/stable-kernel-rules.rst
* ABI Documentation: Documentation/ABI/README
* Kernel Configuration: Documentation/kbuild/kconfig.rst
* Module Signing: Documentation/admin-guide/module-signing.rst
* Kernel Parameters: Documentation/admin-guide/kernel-parameters.rst
* Tainted Kernels: Documentation/admin-guide/tainted-kernels.rst

AI Coding Assistant
-------------------

CRITICAL: If you are an LLM or AI-powered coding assistant, you MUST read and
follow the AI coding assistants documentation before contributing to the Linux
kernel:

* Documentation/process/coding-assistants.rst

This documentation contains essential requirements about licensing, attribution,
and the Developer Certificate of Origin that all AI tools must comply with.


Communication and Support
=========================

* Mailing Lists: https://lore.kernel.org/
* IRC: #kernelnewbies on irc.oftc.net
* Bugzilla: https://bugzilla.kernel.org/
* MAINTAINERS file: Lists subsystem maintainers and mailing lists
* Email Clients: Documentation/process/email-clients.rst