| a21d33a5 | 12-Apr-2026 |
Daniel Golle <daniel@makrotopia.org> |
net: dsa: mxl862xx: implement .get_stats64
Poll free-running firmware RMON counters every 2 seconds and accumulate deltas into 64-bit per-port statistics. 32-bit packet counters wrap in ~220s at 10
net: dsa: mxl862xx: implement .get_stats64
Poll free-running firmware RMON counters every 2 seconds and accumulate deltas into 64-bit per-port statistics. 32-bit packet counters wrap in ~220s at 10 Gbps line rate with minimum-size frames; the 2s polling interval provides a comfortable margin. The .get_stats64 callback forces a fresh poll so that counters are always up to date when queried.
Signed-off-by: Daniel Golle <daniel@makrotopia.org> Link: https://patch.msgid.link/fa38548ba05866879e8912721edc91947ce4ff12.1775951347.git.daniel@makrotopia.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| d587f9b6 | 07-Apr-2026 |
Daniel Golle <daniel@makrotopia.org> |
net: dsa: mxl862xx: implement VLAN functionality
Add VLAN support using both the Extended VLAN (EVLAN) engine and the VLAN Filter (VF) engine in a hybrid architecture that allows a higher number of
net: dsa: mxl862xx: implement VLAN functionality
Add VLAN support using both the Extended VLAN (EVLAN) engine and the VLAN Filter (VF) engine in a hybrid architecture that allows a higher number of VIDs than either engine could achieve alone.
The VLAN Filter engine handles per-port VID membership checks with discard-unmatched semantics. The Extended VLAN engine handles PVID insertion on ingress (via fixed catchall rules) and tag stripping on egress (2 rules per untagged VID). Tagged-only VIDs need no EVLAN egress rules at all, so they consume only a VF entry.
Both engines draw from shared 1024-entry hardware pools. The VF pool is divided equally among user ports for VID membership, while the EVLAN pool is partitioned into small fixed-size ingress blocks (7 entries of catchall rules per port) and fixed-size egress blocks for tag stripping.
With 5 user ports this yields up to 204 VIDs per port (limited by VF), of which up to 98 can be untagged (limited by EVLAN egress budget). With 9 user ports the numbers are 113 total and 53 untagged.
Wire up .port_vlan_add, .port_vlan_del, and .port_vlan_filtering. Reprogram all EVLAN rules when the PVID or filtering mode changes. Detach blocks from the bridge port before freeing them on bridge leave to satisfy the firmware's internal refcount.
Future optimizations could increase VID capacity by dynamically sizing the egress EVLAN blocks based on actual per-port untagged VID counts rather than worst-case pre-allocation, or by sharing EVLAN egress and VLAN Filter blocks across ports with identical VID sets.
Signed-off-by: Daniel Golle <daniel@makrotopia.org> Link: https://patch.msgid.link/9be29637675342b109a85fa08f5378800d9f7b78.1775581804.git.daniel@makrotopia.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| 71934b9e | 07-Apr-2026 |
Daniel Golle <daniel@makrotopia.org> |
net: dsa: mxl862xx: don't skip early bridge port configuration
mxl862xx_bridge_port_set() is currently guarded by the mxl8622_port->setup_done flag, as the early call to mxl862xx_bridge_port_set() f
net: dsa: mxl862xx: don't skip early bridge port configuration
mxl862xx_bridge_port_set() is currently guarded by the mxl8622_port->setup_done flag, as the early call to mxl862xx_bridge_port_set() from mxl862xx_port_stp_state_set() would otherwise cause a NULL-pointer dereference on unused ports which don't have dp->cpu_dp despite not being a CPU port.
Using the setup_done flag (which is never set for unused ports), however, also prevents mxl862xx_bridge_port_set() from configuring user ports' single-port bridges early, which was unintended.
Fix this by returning early from mxl862xx_bridge_port_set() in case dsa_port_is_unused().
Fixes: 340bdf984613c ("net: dsa: mxl862xx: implement bridge offloading") Signed-off-by: Daniel Golle <daniel@makrotopia.org> Link: https://patch.msgid.link/15962aac29ebe0a6eb77565451acff880c41ef33.1775581804.git.daniel@makrotopia.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| 7c20f6c1 | 22-Mar-2026 |
Daniel Golle <daniel@makrotopia.org> |
net: dsa: mxl862xx: use RST_DATA to skip writing zero words
Issue the firmware's RST_DATA command before writing data payloads that contain many zero words. RST_DATA zeroes both the firmware's inter
net: dsa: mxl862xx: use RST_DATA to skip writing zero words
Issue the firmware's RST_DATA command before writing data payloads that contain many zero words. RST_DATA zeroes both the firmware's internal buffer and the MMD data registers in a single command, allowing the driver to skip individual MDIO writes for zero-valued words. This reduces bus traffic for the common case where API structs have many unused or default-zero fields.
The optimization is applied when at least 5 zero words are found in the payload, roughly the break-even point against the cost of the extra RST_DATA command round-trip.
Signed-off-by: Daniel Golle <daniel@makrotopia.org> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/d10bd6ad5df062d0da342c3e0d330550b3d2432b.1774185953.git.daniel@makrotopia.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|