summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2026-03-17dpll: zl3073x: add zl3073x_ref_state_update helperIvan Vecera
Extract the per-reference monitor status HW read into a dedicated zl3073x_ref_state_update() helper in the ref module. Rename zl3073x_dev_ref_status_update() to zl3073x_dev_ref_states_update() and use the new helper in it. Call it from zl3073x_ref_state_fetch() as well so that mon_status is initialized at device startup. This keeps direct register access and struct field writes behind the ref module's interface, consistent with the state management pattern used for other ref operations. Signed-off-by: Ivan Vecera <ivecera@redhat.com> Link: https://patch.msgid.link/20260315174224.399074-3-ivecera@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-17dpll: zl3073x: use struct_group to partition statesIvan Vecera
Organize the zl3073x_out, zl3073x_ref, and zl3073x_synth structures using struct_group() to partition fields into semantic groups: * cfg: mutable configuration written to HW via state_set * inv: invariant fields set once during state_fetch * stat: read-only status This enables group-level operations in place of field-by-field copies: * state_set validates invariants haven't changed (WARN_ON + -EINVAL) * state_set short-circuits when cfg is unchanged * state_set copy entire groups in a single assignment instead of enumerating each field Add kernel doc for zl3073x_out_state_set and zl3073x_ref_state_set documenting the new invariant validation and short-circuit semantics. Remove forward declaration of zl3073x_synth_state_set(). Signed-off-by: Ivan Vecera <ivecera@redhat.com> Link: https://patch.msgid.link/20260315174224.399074-2-ivecera@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-17ppp: require callers of ppp_dev_name() to hold RCUQingfang Deng
ppp_dev_name() holds the RCU read lock internally to protect pch->ppp. However, as it returns netdev->name to the caller, the caller should also hold either RCU or RTNL lock to prevent the netdev from being freed. The only two references of the function is in the L2TP driver, both of which already hold RCU. So remove the internal RCU lock and document that callers must hold RCU. Signed-off-by: Qingfang Deng <dqfext@gmail.com> Reviewed-by: Breno Leitao <leitao@debian.org> Link: https://patch.msgid.link/20260316092824.479149-1-dqfext@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-17fou: Remove IPPROTO_UDPLITE check in gue_err() and gue6_err().Kuniyuki Iwashima
UDP-Lite has been removed, and its error handler is no longer found in either inet_protos[IPPROTO_UDPLITE] or inet6_protos[IPPROTO_UDPLITE]. The recursion fixed by the protocol check in gue_err() and gue6_err() no longer occurs with UDP-Lite. Let's remove the checks. Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com> Reviewed-by: Joe Damato <joe@dama.to> Link: https://patch.msgid.link/20260316133127.2646421-1-kuniyu@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-17net: phy: mxl-gpy: add PHY-level statistics via ethtoolDaniel Golle
Report PCS receive error counts for all supported GPY115x, GPY2xx and MxL862xx PHYs. Accumulate the vendor-specific PHY_ERRCNT read-clear counter (SEL=RXERR) in .update_stats() and expose it as both IEEE 802.3 SymbolErrorDuringCarrier and generic rx_errors via .get_phy_stats(). Signed-off-by: Daniel Golle <daniel@makrotopia.org> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/0029a2fb29bfdcc26abff828d2e18400067b5c58.1773587924.git.daniel@makrotopia.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-17net: airoha: select QDMA block according LAN/WAN configurationLorenzo Bianconi
Before this patch even GDM ports were assigned to QDMA0 while odd GDM ports were using QDMA1, so, based on the DTS configuration, both QDMA0 and QDMA1 can theoretically receive traffic destinated to the host cpu from LAN or WAN GDM ports. Airoha folks reported the hw design assumes the LAN traffic destinated to the host cpu is be forwarded to QDMA0 while traffic received on WAN GDM port is managed by QDMA1. For this reason, select QDMA block according to the GDM port LAN or WAN configuration: - QDMA0 is used for GDM LAN devices - QDMA1 is used for GDM WAN device Assuming a device with three GDM ports, a typical configuration could be: - MT7530 DSA switch -> GDM1 (eth0) -> QDMA0 (LAN traffic) - External PHY -> GDM2 (eth1) -> QDMA1 (WAN traffic) - External PHY -> GDM3 (eth2) -> QDMA0 (LAN traffic) We can then bridge eth0 DSA port (lanX) with eth2 since they all tx/rx LAN traffic. Please note this patch introduces a change not visible to the user since airoha_eth driver currently supports just the internal phy available via the MT7530 DSA switch and there are no WAN interfaces officially supported since PCS/external phy is not merged mainline yet (it will be posted with following patches). Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Link: https://patch.msgid.link/20260313-airoha-qdma-lan-wan-mode-v2-1-7d577db6e40c@kernel.org Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-03-17Merge branch 'initial-support-for-pic64-hpsc-hx-ethernet-endpoint'Paolo Abeni
Charles Perry says: ==================== Initial support for PIC64-HPSC/HX Ethernet endpoint This series add basic support for Microchip "PIC64-HPSC" and "PIC64HX" Ethernet endpoint. Both SoCs contain 4 GEM IP with support for MII/RGMII/SGMII/USXGMII at rates of 10M to 10G. Only RGMII and SGMII at a rate of 1G is tested for now. Each GEM IP has 8 priority queues and the revision register reads 0x220c010e. One particularity of this instantiation of GEM is that the MDIO controller within the GEM IP is disconnected from any physical pin and the SoC rely on another standalone MDIO controller. The maximum jumbo frame size also seems to be different on PIC64-HPSC/HX (16383) than what most other platforms use (10240). I've found that I need to tweak a bit the MTU calculation for this, otherwise the RXBS field of the DMACFG register overflows. See patch 2 for more details. PIC64-HPSC/HX also supports other features guarded behind CAPS bit like MACB_CAPS_QBV but I've omitted those intentionally because I didn't test these. ==================== Link: https://patch.msgid.link/20260313140610.3681752-1-charles.perry@microchip.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-03-17net: macb: add support for Microchip pic64hpsc ethernet endpointCharles Perry
pic64hpsc doesn't have the USRIO register so MACB_CAPS_USRIO_DISABLED is used. pic64hpsc does support PTP and has the timestamping unit so MACB_CAPS_GEM_HAS_PTP is used. jumbo_max_len is set to 16383 (0x3FFF) as reported by the DCFG2 register bits 0..13. The JML register also has a default value of 0x3FFF. dma_burst_length is set to 16 because that's what most other platforms use and it worked for me so far. There is one other mode where bursts of up to 256 are allowed but this might impact negatively other masters on the NOC. The register default value is 4 (bursts up to 4). Signed-off-by: Charles Perry <charles.perry@microchip.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20260313140610.3681752-4-charles.perry@microchip.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-03-17net: macb: add safeguards for jumbo frame larger than 10240Charles Perry
The RX buffers for GEM can have a maximum size of 16320 bytes (0xff in the RXBS field of the DMACFG register means 255*64 = 16320 bytes). The GEM IP has configurable maximum jumbo frame length that can go up to 16383. The actual value for this limit can be found in the "jumbo_max_length" field (bits 0..13) of the DCFG2 register. Currently, the macb driver doesn't use the DCFG2 register when determining the max MTU, instead an hardcoded value (jumbo_max_len in struct macb_config) is used for each platform. Right now the maximum value for jumbo_max_len is 10240 (0x2800). GEM uses one buffer per packet which means that one buffer must allow room for the max MTU plus L2 encapsulation and alignment. This is a limitation of the driver. This commit adds a limit to max_mtu and rx_buffer_size so that the RXBS field can never overflow when a large MTU is used. With this commit, it is now possible to add new platforms with a jumbo_max_len of 16383 so that the hardware properties of each IP can be properly captured in struct macb_config. Signed-off-by: Charles Perry <charles.perry@microchip.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20260313140610.3681752-3-charles.perry@microchip.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-03-17dt-bindings: net: cdns,macb: add a compatible for Microchip pic64hpscCharles Perry
Add "microchip,pic64hpsc-gem" for "PIC64-HPSC" and "microchip,pic64hx-gem" for "PIC64HX", compatible with the former. The generic compatible "cdns,gem" works but offers limited features. Keep it as a fallback. The GEM IPs within pic64hpsc have their MDIO controllers unconnected from any physical pin. Add a check to prevent adding PHYs under the GEM node. Signed-off-by: Charles Perry <charles.perry@microchip.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://patch.msgid.link/20260313140610.3681752-2-charles.perry@microchip.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-03-17selftests: net: add ipv6 RA route to ECMP merge testFernando Fernandez Mancera
As commit bbf4a17ad9ff ("ipv6: Fix ECMP sibling count mismatch when clearing RTF_ADDRCONF") pointed out, RA routes are not elegible for ECMP merging. Add a test scenario mixing RA and static routes with gateway to check that they are not getting merged. Signed-off-by: Fernando Fernandez Mancera <fmancera@suse.de> Link: https://patch.msgid.link/20260313124827.3945-1-fmancera@suse.de Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-03-17ppp: remove pch->chan NULL checks from tx pathQingfang Deng
Now that ppp_disconnect_channel() is called before pch->chan is set to NULL, a channel from ppp->channels list on the transmit path is guaranteed to have non-NULL pch->chan. Remove the pch->chan NULL checks from ppp_push(), ppp_mp_explode(), and ppp_fill_forward_path(), where a channel is obtained from the list. Remove the corresponding WRITE/READ_ONCE annotations as they no longer race. Signed-off-by: Qingfang Deng <dqfext@gmail.com> Link: https://patch.msgid.link/20260312093732.277254-2-dqfext@gmail.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-03-17ppp: disconnect channel before nullifying pch->chanQingfang Deng
In ppp_unregister_channel(), pch->chan is set to NULL before calling ppp_disconnect_channel(), which removes the channel from ppp->channels list using list_del_rcu() + synchronize_net(). This creates an intermediate state where the channel is still connected (on the list) but already unregistered (pch->chan == NULL). Call ppp_disconnect_channel() before setting pch->chan to NULL. After the synchronize_net(), no new reader on the transmit path will hold a reference to the channel from the list. This eliminates the problematic state, and prepares for removing the pch->chan NULL checks from the transmit path in a subsequent patch. Signed-off-by: Qingfang Deng <dqfext@gmail.com> Link: https://patch.msgid.link/20260312093732.277254-1-dqfext@gmail.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-03-17Merge branch 'net-dsa-mv88e6xxx-add-partial-support-for-tcam-entries'Paolo Abeni
Cedric Jehasse says: ==================== net: dsa: mv88e6xxx: Add partial support for TCAM entries This series adds partial Ternary Content Addressable Memory (TCAM) for the mv88e6390 and mv88e6393 family of switches. TCAM entries allow the switch to match the first 48 or 96 bytes of a frame and take actions on matched frames. This patch introduces a subset of the available TCAM functionality. Matching on ip addresses/protocol and trapping to the cpu. Eg. to trap traffic with destination ip 224.0.1.129 to the cpu: tc qdisc add dev p1 clsact tc filter add dev p1 ingress protocol ip flower skip_sw \ dst_ip 224.0.1.129 action trap Review of the mv88e6xxx changes have brought to light something in cls_flower: When adding a classifier with an ipv4 address both FLOW_DISSECTOR_KEY_IPV4_ADDRS and FLOW_DISSECTOR_KEY_IPV6_ADDRS bits are set in dissector->used_keys. A change was made to address this. Signed-off-by: Cedric Jehasse <cedric.jehasse@luminex.be> ==================== Link: https://patch.msgid.link/20260311-net-next-mv88e6xxx-tcam-v8-0-32dd5ba30002@luminex.be Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-03-17net: dsa: mv88e6xxx: Add partial support for TCAM entriesCedric Jehasse
This patch adds partial Ternary Content Addressable Memory (TCAM) for the mv88e6390 and mv88e6393 family of switches. TCAM entries allow the switch to match the first 48 or 96 bytes of a frame and take actions on matched frames. This patch introduces a subset of the available TCAM functionality. Matching on ip addresses/protocol and trapping to the cpu. Eg. to trap traffic with destination ip 224.0.1.129 to the cpu: tc qdisc add dev p1 clsact tc filter add dev p1 ingress protocol ip flower skip_sw \ dst_ip 224.0.1.129 action trap Signed-off-by: Cedric Jehasse <cedric.jehasse@luminex.be> Link: https://patch.msgid.link/20260311-net-next-mv88e6xxx-tcam-v8-2-32dd5ba30002@luminex.be Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-03-17net/sched: cls_flower: remove unions from fl_flow_keyCedric Jehasse
When creating a flower classifier with an ipv4 address the flow_dissector has both FLOW_DISSECTOR_KEY_IPV4_ADDRS and FLOW_DISSECTOR_KEY_IPV6_ADDRS bits set in used_keys. This happens because ipv4/ipv6 fields are a union and FL_KEY_SET_IF_MASKED() will interpret either being set as both. Removing the unions fixes this behavior without needing special handling for union fields. Example of a command that caused FLOW_DISSECTOR_KEY_IPV4_ADDRS and FLOW_DISSECTOR_KEY_IPV6_ADDRS to be set: tc filter add dev p1 ingress protocol ip flower skip_sw \ dst_ip 224.0.1.129 action trap Signed-off-by: Cedric Jehasse <cedric.jehasse@luminex.be> Link: https://patch.msgid.link/20260311-net-next-mv88e6xxx-tcam-v8-1-32dd5ba30002@luminex.be Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-03-16net: macb: set default_an_inband to true for SGMIICharles Perry
Most platforms using GEM in SGMII mode use in-band autonegotiation because it is on by default in GEM's 1G PCS and is always on since commit e276e5e40e92 ("net: macb: Disable PCS auto-negotiation for SGMII fixed-link mode"). Leave it on if possible using the "default_an_inband" flag of "struct phylink_config" so that platforms that lack in-band autonegotiation configurability at the PHY do not break with commit 1338cfef1ff1 ("net: macb: fix SGMII with inband aneg disabled") which will turn off in-band autoneg for non hot pluggable PHYs. Once the majority of the PHY drivers that support SGMII have the ->config_inband() callback, this commit could be reverted so that non hot pluggable PHY use outband negotiation with macb, like its the case for other MACs. Fixes: 1338cfef1ff1 ("net: macb: fix SGMII with inband aneg disabled") Reported-by: Conor Dooley <conor.dooley@microchip.com> Closes: https://lore.kernel.org/r/20260304-nebulizer-rounding-40fbc81a2ba1@spud Signed-off-by: Charles Perry <charles.perry@microchip.com> Tested-by: Conor Dooley <conor.dooley@microchip.com> Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/20260313142140.4040647-1-charles.perry@microchip.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-16net: stmmac: move MSI data out of struct stmmac_privRussell King (Oracle)
Only three platforms supprt MSIs, which means having all the strings and interrupt arrays always allocated wastes space. None of this data is performance critical - this data is only used when requesting and releasing the MSI interrupts. Move the MSI data out of struct stmmac_priv into its own separately allocated structure, and move its initialisation to a separate function. This removes 768 bytes from struct stmmac_priv. Link: https://lore.kernel.org/r/aYtq4ypxXTvn_Is6@shell.armlinux.org.uk Reviewed-by: Florian Bezdeka <florian.bezdeka@siemens.com> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1w113e-0000000DDwc-2oRv@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-16Merge branch 'support-multi-channel-irqs-in-stmmac-platform-drivers'Jakub Kicinski
Jan Petrous says: ==================== Support multi-channel IRQs in stmmac platform drivers The stmmac core supports two interrupt modes, controlled by the flag STMMAC_FLAG_MULTI_MSI_EN: - When the flag is set, the driver uses multi-channel IRQ mode (Multi-IRQ). - Otherwise, a single IRQ line is requested (aka MAC-IRQ): static int stmmac_request_irq(struct net_device *dev) { /* Request the IRQ lines */ if (priv->plat->flags & STMMAC_FLAG_MULTI_MSI_EN) ret = stmmac_request_irq_multi_msi(dev); else ret = stmmac_request_irq_single(dev); } At present, only PCI drivers (Intel and Loongson) make use of the Multi-IRQ mode. This concept can be extended to DT-based embedded glue drivers (dwmac-xxx.c). This series adds support for reading per-channel IRQs from the DT node and reuses the existing STMMAC_FLAG_MULTI_MSI_EN flag to enable multi-IRQ operation in platform drivers. The final decision if Multi-IRQ gets enabled remains on glue driver to allow implementing any reguirements/limitions the focused platform needs. NXP S32G2/S32G3/S32R SoCs integrate the DWMAC IP with multi-channel interrupt support. The dwmac-s32.c driver change is provided as an example of enabling multi-IRQ mode for non-PCI drivers. ==================== Link: https://patch.msgid.link/20260313-dwmac_multi_irq-v12-0-b5c9d0aa13d6@oss.nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-16stmmac: s32: enable support for Multi-IRQ modeJan Petrous (OSS)
Based on previous changes in platform driver, the vendor glue driver can enable Multi-IRQ mode, if needed. To get enabled Multi-IRQ mode for dwmac-s32, the driver checks: 1) property of 'snps,mtl-xx-config' subnode defines 'snps,xx-queues-to-use' bigger then one, ie: ethernet@4033c000 { compatible = "nxp,s32g2-dwmac"; ... snps,mtl-rx-config = <&mtl_rx_setup>; ... mtl_rx_setup: rx-queues-config { snps,rx-queues-to-use = <2>; }; 2) queue based IRQs are set, ie: ethernet@4033c000 { compatible = "nxp,s32g2-dwmac"; ... interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>, /* CHN 0: tx, rx */ <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>, /* CHN 1: tx, rx */ <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>; interrupt-names = "macirq", "tx-queue-0", "rx-queue-0", "tx-queue-1", "rx-queue-1"; If those prerequisites are met, the driver switches to Multi-IRQ mode, using per-queue IRQs for rx/tx data pathr: [ 1.387045] s32-dwmac 4033c000.ethernet: Multi-IRQ mode (per queue IRQs) selected Now the driver owns all queues IRQs: root@s32g399aevb3:~# grep eth /proc/interrupts 29: 0 0 0 0 0 0 0 0 GICv3 89 Level eth0:mac 30: 0 0 0 0 0 0 0 0 GICv3 91 Level eth0:rx-0 31: 0 0 0 0 0 0 0 0 GICv3 93 Level eth0:rx-1 32: 0 0 0 0 0 0 0 0 GICv3 95 Level eth0:rx-2 33: 0 0 0 0 0 0 0 0 GICv3 97 Level eth0:rx-3 34: 0 0 0 0 0 0 0 0 GICv3 99 Level eth0:rx-4 35: 0 0 0 0 0 0 0 0 GICv3 90 Level eth0:tx-0 36: 0 0 0 0 0 0 0 0 GICv3 92 Level eth0:tx-1 37: 0 0 0 0 0 0 0 0 GICv3 94 Level eth0:tx-2 38: 0 0 0 0 0 0 0 0 GICv3 96 Level eth0:tx-3 39: 0 0 0 0 0 0 0 0 GICv3 98 Level eth0:tx-4 Otherwise, if one of the prerequisite don't met, the driver continue with MAC IRQ mode: [ 1.387045] s32-dwmac 4033c000.ethernet: MAC IRQ mode selected And only MAC IRQ will be attached: root@s32g399aevb3:~# grep eth /proc/interrupts 29: 0 0 0 0 0 0 0 0 GICv3 89 Level eth0:mac What represents the original MAC IRQ mode and is fully backward compatible. Reviewed-by: Matthias Brugger <mbrugger@suse.com> Signed-off-by: Jan Petrous (OSS) <jan.petrous@oss.nxp.com> Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/20260313-dwmac_multi_irq-v12-4-b5c9d0aa13d6@oss.nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-16dt-bindings: net: nxp,s32-dwmac: Declare per-queue interruptsJan Petrous (OSS)
The DWMAC IP on NXP S32G/R SoCs has connected queue-based IRQ lines, set them to allow using Multi-IRQ mode. Reviewed-by: Matthias Brugger <mbrugger@suse.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Signed-off-by: Jan Petrous (OSS) <jan.petrous@oss.nxp.com> Link: https://patch.msgid.link/20260313-dwmac_multi_irq-v12-3-b5c9d0aa13d6@oss.nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-16net: stmmac: platform: read channels irqJan Petrous (OSS)
Read IRQ resources for all rx/tx channels, to allow Multi-IRQ mode for platform glue drivers. Reviewed-by: Matthias Brugger <mbrugger@suse.com> Signed-off-by: Jan Petrous (OSS) <jan.petrous@oss.nxp.com> Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/20260313-dwmac_multi_irq-v12-1-b5c9d0aa13d6@oss.nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-16xsk: remove repeated definesMaciej Fijalkowski
Seems we have been carrying around repeated defines for unaligned mode logic. Remove redundant ones. Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com> Acked-by: Stanislav Fomichev <sdf@fomichev.me> Link: https://patch.msgid.link/20260313111931.438911-1-maciej.fijalkowski@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-16tcp: improve inet6_ehashfn() entropyEric Dumazet
Instead of only using the 32 low order bits of the local address, use all of them. Xor net_hash_mix(net) with the 32 high order bits of the local address so that we can use __jhash_mix() three times. If we were hashing 4 extra bytes, we would need one __jhash_final() which is a bit expensive. Using net_hash_mix() at the beginning allows better register allocation. We no longer use a cascade of two jhash and inet6_ehash_secret, this was dubious/weak. Add a comment explaining why @lport is not part of the jhash computation. $ scripts/bloat-o-meter -t vmlinux.0 vmlinux.1 add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-24 (-24) Function old new delta inet6_ehashfn 330 306 -24 Total: Before=24855958, After=24855934, chg -0.00% Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Simon Horman <horms@kernel.org> Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com> Link: https://patch.msgid.link/20260313120346.3378811-1-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-16selftests: net: py: give bpftrace more time to startJakub Kicinski
After commit under Fixes debug runners in the CI hit the following: # subprocess.TimeoutExpired: Command '['bpftrace', '-f', 'json', '-q', '-e', 'kprobe:netpoll_poll_dev { @hits = count(); } interval:s:10 { exit(); }']' timed out after 15 seconds # # Exception| net.lib.py.ksft.KsftFailEx: bpftrace failed to run!?: {} in netpoll_basic.py >10% of the time. Let's give bpftool more time to start, it can take a while on a debug kernel. Fixes: 82562972b854 ("selftests: net: pass bpftrace timeout to cmd()") Reviewed-by: Breno Leitao <leitao@debian.org> Reviewed-by: Petr Machata <petrm@nvidia.com> Reviewed-by: Nimrod Oren <noren@nvidia.com> Link: https://patch.msgid.link/20260315160038.3187730-1-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-16net: ti: icssg-prueth: Add HSR multicast FDB port membership managementMD Danish Anwar
In HSR offload mode, multicast addresses can be added via HSR master (hsr0) or directly to slave ports (eth1/eth2). The FDB must track port membership: P0 (0x1) for HSR master, P1 (0x2) for slave port 1, and P2 (0x4) for slave port 2. When the same address is added from multiple paths, memberships must accumulate. Implement a hybrid approach using __dev_mc_sync() callbacks to track basic add/delete operations, checking netdev_hw_addr->synced to distinguish HSR-synced addresses from direct additions. Post-process to handle overlapping memberships by checking refcount: - refcount=2 with synced=1: HSR only (P0) - refcount>=3 with synced=1: HSR + direct (P0|P1/P2) - synced=0 with P0 set: HSR removed, clean up orphaned P0 On add operations, accumulate new membership with existing ports. On delete operations, remove only the specific port and clean up orphaned P0 bits if needed. Add error handling for icssg_fdb_lookup() which can return negative error codes (e.g., -ETIMEDOUT). On lookup failure in add/delete path, default to no existing membership. In the post-processing path, skip the address update to avoid corrupting FDB entries with garbage values. VLAN Interface Handling: Add support for multicast addresses added to VLAN interfaces on the HSR master (e.g., hsr0.7). These addresses require P0 (HSR master) bit to be set along with the port bits, since VLAN-tagged packets use separate FDB entries per VLAN ID. Without P0, the HSR master would not receive multicast packets on VLAN interfaces. Track whether the add/del operation came from a VLAN interface path and set P0 when in HSR offload mode with VLAN interfaces. Update orphaned P0 cleanup logic to preserve P0 for VLAN interfaces. Signed-off-by: MD Danish Anwar <danishanwar@ti.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20260311082923.2962937-1-danishanwar@ti.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-16virtio_net: add page_pool support for buffer allocationVishwanath Seshagiri
Use page_pool for RX buffer allocation in mergeable and small buffer modes to enable page recycling and avoid repeated page allocator calls. skb_mark_for_recycle() enables page reuse in the network stack. Big packets mode is unchanged because it uses page->private for linked list chaining of multiple pages per buffer, which conflicts with page_pool's internal use of page->private. Implement conditional DMA premapping using virtqueue_dma_dev(): - When non-NULL (vhost, virtio-pci): use PP_FLAG_DMA_MAP with page_pool handling DMA mapping, submit via virtqueue_add_inbuf_premapped() - When NULL (VDUSE, direct physical): page_pool handles allocation only, submit via virtqueue_add_inbuf_ctx() This preserves the DMA premapping optimization from commit 31f3cd4e5756b ("virtio-net: rq submits premapped per-buffer") while adding page_pool support as a prerequisite for future zero-copy features (devmem TCP, io_uring ZCRX). Page pools are created in probe and destroyed in remove (not open/close), following existing driver behavior where RX buffers remain in virtqueues across interface state changes. Signed-off-by: Vishwanath Seshagiri <vishs@meta.com> Acked-by: Jason Wang <jasowang@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Link: https://patch.msgid.link/20260310183107.2822016-1-vishs@meta.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-14Merge branch 'dpaa2-fix-config-relation-with-fsl_dpaa2_switch'Jakub Kicinski
Cai Xinchen says: ==================== dpaa2: fix config relation with FSL_DPAA2_SWITCH When compile FSL_DPAA2_SWITCH, it needs to set CONFIG_FSL_DPAA2_ETH=y, otherwise it cannot be compiled. And as Ioana Ciornei sugggested, FSL_DPAA2_SWITCH included dpaa2-mac.o in the driver, but it does not select PCS_LYNX, PHYLINK and FSL_XGMAC_MDIO. And FSL_DPAA2_SWITCH depends on FSL_MC_BUS && FSL_MC_DPIO becuase it uses fsl_mc_driver APIs. ==================== Link: https://patch.msgid.link/20260312065907.476663-1-caixinchen1@huawei.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-14dpaa2: compile dpaa2 even CONFIG_FSL_DPAA2_ETH=nCai Xinchen
CONFIG_FSL_DPAA2_ETH and CONFIG_FSL_DPAA2_SWITCH are not associated, but the compilation of FSL_DPAA2_SWITCH depends on the compilation of the dpaa2 folder. The files controlled by CONFIG_FSL_DPAA2_SWITCH in the dpaa2 folder are not controlled by CONFIG_FSL_DPAA2_ETH, except for the files controlled by CONFIG_FSL_DPAA2_SWITCH. Therefore, removing the restriction will not affect the compilation of the files in the directory. Fixes: f48298d3fbfaa ("staging: dpaa2-switch: move the driver out of staging") Suggested-by: Ioana Ciornei <ioana.ciornei@nxp.com> Signed-off-by: Cai Xinchen <caixinchen1@huawei.com> Link: https://patch.msgid.link/20260312065907.476663-3-caixinchen1@huawei.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-14dpaa2: add independent dependencies for FSL_DPAA2_SWITCHCai Xinchen
Since the commit 84cba72956fd ("dpaa2-switch: integrate the MAC endpoint support") included dpaa2-mac.o in the driver, but it didn't select PCS_LYNX, PHYLINK and FSL_XGMAC_MDIO. it will lead to link error, such as undefined reference to `phylink_ethtool_ksettings_set' undefined reference to `lynx_pcs_create_fwnode' And the same reason as the commit d2624e70a2f53 ("dpaa2-eth: select XGMAC_MDIO for MDIO bus support"), enable the FSL_XGMAC_MDIO Kconfig option in order to have MDIO access to internal and external PHYs. Because dpaa2-switch uses fsl_mc_driver APIs, add depends on FSL_MC_BUS && FSL_MC_DPIO as FSL_DPAA2_SWITCH do. FSL_XGMAC_MDIO and FSL_MC_BUS depend on OF, thus the dependence of FSL_MC_BUS can satisfy FSL_XGMAC_MDIO's OF requirement. Fixes: 84cba72956fd ("dpaa2-switch: integrate the MAC endpoint support") Suggested-by: Ioana Ciornei <ioana.ciornei@nxp.com> Signed-off-by: Cai Xinchen <caixinchen1@huawei.com> Link: https://patch.msgid.link/20260312065907.476663-2-caixinchen1@huawei.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-14selftests/net: packetdrill: add tcp_disorder_fin_in_FIN_WAIT.pktEric Dumazet
Commit 795a7dfbc3d9 ("net: tcp: accept old ack during closing") was fixing an old bug, add a test to make sure we won't break this case in future kernels. Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Menglong Dong <menglong8.dong@gmail.com> Link: https://patch.msgid.link/20260313115429.3365751-1-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-14Merge branch 'devlink-introduce-shared-devlink-instance-for-pfs-on-same-chip'Jakub Kicinski
Jiri Pirko says: ==================== devlink: introduce shared devlink instance for PFs on same chip Multiple PFs on a network adapter often reside on the same physical chip, running a single firmware. Some resources and configurations are inherently shared among these PFs - PTP clocks, VF group rates, firmware parameters, and others. Today there is no good object in the devlink model to attach these chip-wide configuration knobs to. Drivers resort to workarounds like pinning shared state to PF0 or maintaining ad-hoc internal structures (e.g., ice_adapter) that are invisible to userspace. This problem was discussed extensively starting with Przemek Kitszel's "whole device devlink instance" RFC for the ice driver [1]. Several approaches for representing the parent instance were considered: using a partial PCI BDF as the dev_name (breaks when PFs have different BDFs in VMs), creating a per-driver bus, using auxiliary devices, or using faux devices. All of these required a backing struct device for the parent devlink instance, which does not naturally exist - there is no PCI device that represents the chip as a whole. This patchset takes a different approach: allow devlink instances to exist without any backing struct device. The instance is identified purely by its internal index, exposed over devlin netlink. This avoids fabricating fake devices and keeps the devlink handle semantics clean. The first ten patches prepare the devlink core for device-less instances by decoupling the handle from the parent device. The last three introduce the shared devlink infrastructure and its first user in the mlx5 driver. Example output showing the shared instance and nesting: pci/0000:08:00.0: index 0 nested_devlink: auxiliary/mlx5_core.eth.0 devlink_index/1: index 1 nested_devlink: pci/0000:08:00.0 pci/0000:08:00.1 auxiliary/mlx5_core.eth.0: index 2 pci/0000:08:00.1: index 3 nested_devlink: auxiliary/mlx5_core.eth.1 auxiliary/mlx5_core.eth.1: index 4 [1] https://lore.kernel.org/netdev/20250219164410.35665-1-przemyslaw.kitszel@intel.com/ --- Decoupled from "devlink and mlx5: Support cross-function rate scheduling" patchset to maintain 15-patches limit. See individual patches for changelog. ==================== Link: https://patch.msgid.link/20260312100407.551173-1-jiri@resnulli.us Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-14net/mlx5: Add a shared devlink instance for PFs on same chipJiri Pirko
Use the previously introduced shared devlink infrastructure to create a shared devlink instance for mlx5 PFs that reside on the same physical chip. The shared instance is identified by the chip's serial number extracted from PCI VPD (V3 keyword, with fallback to serial number for older devices). Each PF that probes calls mlx5_shd_init() which extracts the chip serial number and uses devlink_shd_get() to get or create the shared instance. When a PF is removed, mlx5_shd_uninit() calls devlink_shd_put() to release the reference. The shared instance is automatically destroyed when the last PF is removed. Make the PF devlink instances nested in this shared devlink instance, allowing userspace to identify which PFs belong to the same physical chip. Example: pci/0000:08:00.0: index 0 nested_devlink: auxiliary/mlx5_core.eth.0 devlink_index/1: index 1 nested_devlink: pci/0000:08:00.0 pci/0000:08:00.1 auxiliary/mlx5_core.eth.0: index 2 pci/0000:08:00.1: index 3 nested_devlink: auxiliary/mlx5_core.eth.1 auxiliary/mlx5_core.eth.1: index 4 Signed-off-by: Jiri Pirko <jiri@nvidia.com> Link: https://patch.msgid.link/20260312100407.551173-14-jiri@resnulli.us Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-14documentation: networking: add shared devlink documentationJiri Pirko
Document shared devlink instances for multiple PFs on the same chip. Signed-off-by: Jiri Pirko <jiri@nvidia.com> Link: https://patch.msgid.link/20260312100407.551173-13-jiri@resnulli.us Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-14devlink: introduce shared devlink instance for PFs on same chipJiri Pirko
Multiple PFs may reside on the same physical chip, running a single firmware. Some of the resources and configurations may be shared among these PFs. Currently, there is no good object to pin the configuration knobs on. Introduce a shared devlink instance, instantiated upon probe of the first PF and removed during remove of the last PF. The shared devlink instance is not backed by any device device, as there is no PCI device related to it. The implementation uses reference counting to manage the lifecycle: each PF that probes calls devlink_shd_get() to get or create the shared instance, and calls devlink_shd_put() when it removes. The shared instance is automatically destroyed when the last PF removes. Example: pci/0000:08:00.0: index 0 nested_devlink: auxiliary/mlx5_core.eth.0 devlink_index/1: index 1 nested_devlink: pci/0000:08:00.0 pci/0000:08:00.1 auxiliary/mlx5_core.eth.0: index 2 pci/0000:08:00.1: index 3 nested_devlink: auxiliary/mlx5_core.eth.1 auxiliary/mlx5_core.eth.1: index 4 Signed-off-by: Jiri Pirko <jiri@nvidia.com> Link: https://patch.msgid.link/20260312100407.551173-12-jiri@resnulli.us Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-14devlink: allow devlink instance allocation without a backing deviceJiri Pirko
Allow devlink_alloc_ns() to be called with dev=NULL to support device-less devlink instances. When dev is NULL, the instance is identified over netlink using "devlink_index" as bus_name and the decimal index value as dev_name. Signed-off-by: Jiri Pirko <jiri@nvidia.com> Link: https://patch.msgid.link/20260312100407.551173-11-jiri@resnulli.us Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-14devlink: add devl_warn() helper and use it in port warningsJiri Pirko
Introduce devl_warn() macro that uses dev_warn() when a backing device is available and falls back to pr_warn() otherwise. Convert all dev_warn() calls in port.c to use it, preparing for devlink instances without a backing device. Signed-off-by: Jiri Pirko <jiri@nvidia.com> Link: https://patch.msgid.link/20260312100407.551173-10-jiri@resnulli.us Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-14devlink: add devlink_dev_driver_name() helper and use it in trace eventsJiri Pirko
In preparation to dev-less devlinks, add devlink_dev_driver_name() that returns the driver name stored in devlink struct, and use it in all trace events. Signed-off-by: Jiri Pirko <jiri@nvidia.com> Link: https://patch.msgid.link/20260312100407.551173-9-jiri@resnulli.us Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-14devlink: introduce __devlink_alloc() with dev driver pointerJiri Pirko
Introduce __devlink_alloc() as an internal devlink allocator that accepts a struct device_driver pointer and stores it in the devlink instance. This allows internal devlink code (e.g. shared instances) to associate a driver with a devlink instance without need to pass dev pointer. Signed-off-by: Jiri Pirko <jiri@nvidia.com> Link: https://patch.msgid.link/20260312100407.551173-8-jiri@resnulli.us Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-14devlink: support index-based notification filteringJiri Pirko
Extend the notification filter descriptor with devlink_index so that userspace can filter notifications by devlink instance index in addition to bus_name/dev_name. Signed-off-by: Jiri Pirko <jiri@nvidia.com> Link: https://patch.msgid.link/20260312100407.551173-7-jiri@resnulli.us Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-14devlink: support index-based lookup via bus_name/dev_name handleJiri Pirko
Devlink instances without a backing device use bus_name "devlink_index" and dev_name set to the decimal index string. When user space sends this handle, detect the pattern and perform a direct xarray lookup by index instead of iterating all instances. Signed-off-by: Jiri Pirko <jiri@nvidia.com> Link: https://patch.msgid.link/20260312100407.551173-6-jiri@resnulli.us Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-14devlink: allow to use devlink index as a command handleJiri Pirko
Currently devlink instances are addressed bus_name/dev_name tuple. Allow the newly introduced DEVLINK_ATTR_INDEX to be used as an alternative handle for all devlink commands. When DEVLINK_ATTR_INDEX is present in the request, use it for a direct xarray lookup instead of iterating over all instances comparing bus_name/dev_name strings. Signed-off-by: Jiri Pirko <jiri@nvidia.com> Link: https://patch.msgid.link/20260312100407.551173-5-jiri@resnulli.us Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-14devlink: avoid extra iterations when found devlink is not registeredJiri Pirko
Since the one found is not registered, very unlikely another one with the same bus_name/dev_name is going to be found. Stop right away and prepare common "found" path for the follow-up patch. Signed-off-by: Jiri Pirko <jiri@nvidia.com> Link: https://patch.msgid.link/20260312100407.551173-4-jiri@resnulli.us Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-14devlink: add helpers to get bus_name/dev_nameJiri Pirko
Introduce devlink_bus_name() and devlink_dev_name() helpers and convert all direct accesses to devlink->dev->bus->name and dev_name(devlink->dev) to use them. This prepares for dev-less devlink instances where these helpers will be extended to handle the missing device. Signed-off-by: Jiri Pirko <jiri@nvidia.com> Link: https://patch.msgid.link/20260312100407.551173-3-jiri@resnulli.us Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-14devlink: expose devlink instance index over netlinkJiri Pirko
Each devlink instance has an internally assigned index used for xarray storage. Expose it as a new DEVLINK_ATTR_INDEX uint attribute alongside the existing bus_name and dev_name handle. Signed-off-by: Jiri Pirko <jiri@nvidia.com> Link: https://patch.msgid.link/20260312100407.551173-2-jiri@resnulli.us Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-14Merge branch 'net-phy-further-decouple-provider-from-consumer-part'Jakub Kicinski
Heiner Kallweit says: ==================== net: phy: further decouple provider from consumer part This series aims at further decoupling the provider and consumer part in phylib. ==================== Link: https://patch.msgid.link/9d5724bc-e525-4f8f-b3f8-b16dd5a1164e@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-14net: phy: move remaining provider code to mdio_bus_provider.cHeiner Kallweit
This moves definition of mdio_bus class and bus_type to the provider side, what allows to make them private to libphy. As a prerequisite MDIO statistics handling is moved to the provider side as well. Note: This patch causes a checkpatch error "Macros with complex values should be enclosed in parentheses" for MDIO_BUS_STATS_ADDR_ATTR_GROUP. I consider this a false positive here, in addition the patch just moves existing code. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Link: https://patch.msgid.link/47b85676-b349-4aa0-a5ef-cd37769a4c69@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-14net: phy: move registering mdio_bus_class and mdio_bus_type to libphyHeiner Kallweit
The MDIO consumer side shouldn't register class and bus_type. Therefore move this to libphy. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Link: https://patch.msgid.link/b15b378a-fda2-44b9-9d63-bf82919b71b2@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-14net: phy: move (of_)mdio_find_bus to mdio_bus_provider.cHeiner Kallweit
Functionality outside libphy shouldn't access mdio_bus_class directly. So move both functions to the provider side. This is a step towards making mdio_bus_class private to libphy. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Link: https://patch.msgid.link/b6161c64-68ac-4524-82ec-5b7d81b86dbc@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-14net: phy: make mdio_device.c part of libphyHeiner Kallweit
This patch - makes mdio_device.c part of libphy - makes mdio_device_(un)register_reset() static - moves mdiobus_(un)register_device() from mdio_bus.c to mdio_device.c, stops exporting both functions and makes them private to phylib This further decouples the MDIO consumer functionality from libphy. Note: This makes MDIO driver registration part of phylib, therefore adjust Kconfig dependencies where needed. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Link: https://patch.msgid.link/c6dbf9b3-3ca0-434b-ad3a-71fe602ab809@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>