Commit graph

1,481,849 commits

Author SHA1 Message Date
Jakub Kicinski
3604abae0f Merge branch 'net-bridge-vlan-minor-cleanups-and-annotations'
Nikolay Aleksandrov says:

====================
net: bridge: vlan: minor cleanups and annotations

In preparation for a complete vlan fast-path re-work, this set cleans up
a few minor things - removing legacy code barriers that don't help,
                     annotating lockless accesses and using proper helpers.

No functional changes are intended. Sashiko will find many pre-existing
problems, none of them are related to this set. I will try to fix
everything pre-existing separately in -net, there will probably be a few
critical items. So if there are missed places to annotate, or if there're
actual functional changes, these obviously should be addressed in this set.
====================

Link: https://patch.msgid.link/20260903143138.1574598-1-razor@blackwall.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-07 17:26:13 -07:00
Nikolay Aleksandrov
9ef138b168 net: bridge: use br_vlan_get_state to get vlan state
The vlan state can change under RTNL or RCU (mst), so use the helper
to get the state properly throughout the bridge driver.

Signed-off-by: Nikolay Aleksandrov <razor@blackwall.org>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Link: https://patch.msgid.link/20260903143138.1574598-10-razor@blackwall.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-07 17:26:11 -07:00
Nikolay Aleksandrov
f20c448115 net: bridge: vlan: add missing tinfo.tunnel_id annotations
When I annotated data races around tinfo.tunnel_id before, I missed a few
places (e.g. bridge notifications, rhashtable compare), so add them now.

Signed-off-by: Nikolay Aleksandrov <razor@blackwall.org>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Link: https://patch.msgid.link/20260903143138.1574598-9-razor@blackwall.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-07 17:26:10 -07:00
Nikolay Aleksandrov
120207a08f net: bridge: vlan: annotate lockless use of msti
Annotate data races around vlan msti field, it can be read lockless.

Signed-off-by: Nikolay Aleksandrov <razor@blackwall.org>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Link: https://patch.msgid.link/20260903143138.1574598-8-razor@blackwall.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-07 17:26:10 -07:00
Nikolay Aleksandrov
5bec8f8611 net: bridge: vlan: annotate lockless use of num_vlans
Annotate data races around vlan group's num_vlans, it can be read lockless.

Signed-off-by: Nikolay Aleksandrov <razor@blackwall.org>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Link: https://patch.msgid.link/20260903143138.1574598-7-razor@blackwall.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-07 17:26:10 -07:00
Nikolay Aleksandrov
b0bb0a45ce net: bridge: vlan: annotate lockless use of private flags
Annotate vlan private flags data races, they can be read lockless.

Signed-off-by: Nikolay Aleksandrov <razor@blackwall.org>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Link: https://patch.msgid.link/20260903143138.1574598-6-razor@blackwall.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-07 17:26:10 -07:00
Nikolay Aleksandrov
2b1f8fd311 net: bridge: vlan: annotate lockless vlan flags use
Annotate vlan flags data races, they can be read lockless.

Signed-off-by: Nikolay Aleksandrov <razor@blackwall.org>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Link: https://patch.msgid.link/20260903143138.1574598-5-razor@blackwall.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-07 17:26:10 -07:00
Nikolay Aleksandrov
e46efd49e0 net: bridge: mst: use br_get_pvid helper
The only place that accessed pvid directly outside of the bridge vlan code
was mst, change it to use the br_get_pvid helper.

Signed-off-by: Nikolay Aleksandrov <razor@blackwall.org>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Link: https://patch.msgid.link/20260903143138.1574598-4-razor@blackwall.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-07 17:26:10 -07:00
Nikolay Aleksandrov
bd1aeca098 net: bridge: vlan: annotate lockless pvid use
Use READ/WRITE_ONCE to annotate lockless pvid use, br_get_pvid() is the
helper that should be used outside of the bridge vlan code. The rest of
the vlan places that access pvid directly all have rtnl.

Signed-off-by: Nikolay Aleksandrov <razor@blackwall.org>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Link: https://patch.msgid.link/20260903143138.1574598-3-razor@blackwall.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-07 17:26:09 -07:00
Nikolay Aleksandrov
581850fa73 net: bridge: vlan: drop legacy memory barriers
These memory barriers are legacy code from the old vlan implementation
that is not needed anymore. They're also affecting the fast-path.
The pvid is changed under lock and is read with rcu only in the fast-path
there is no need for a barrier, nothing to commit prior to changing it nor
invalidate prior to reading.

Signed-off-by: Nikolay Aleksandrov <razor@blackwall.org>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Link: https://patch.msgid.link/20260903143138.1574598-2-razor@blackwall.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-07 17:26:09 -07:00
Geert Uytterhoeven
615bcbb822 net: ethernet: ti: davinci_mdio: Drop commas after match table sentinels
It does not make sense to have a comma after a sentinel, as any new
elements must be added before the sentinel.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/e481b6de46cecc6ea604ae165272c667274cc621.1788437140.git.geert+renesas@glider.be
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-07 17:21:50 -07:00
Henry Hu
a4050ce7e4 net: phy: microchip_t1: fix NULL pointer dereference in lan887x_phy_init()
The issue was discovered via smatch static analyzer:

  make CHECK="smatch -p=kernel"  C=2  drivers/net/phy/microchip_t1.o
    CHECK   scripts/mod/empty.c
    DESCEND objtool
    CHECK   drivers/net/phy/microchip_t1.c
  drivers/net/phy/microchip_t1.c:1295 lan887x_phy_init() warn: 'priv->clock' can also be NULL

mchp_rds_ptp_probe() returns NULL when CONFIG_MICROCHIP_PHY_RDS_PTP or
CONFIG_PTP_1588_CLOCK is disabled. However, lan887x_phy_init() only checks
for an error pointer before using the returned clock to configure the
periodic output pin, which can result in a NULL pointer dereference.

Handle the NULL return as PTP being unavailable and skip the event pin
configuration in that case. Smatch no longer reports the NULL dereference
warning after the change.

Cc: stable+noautosel@kernel.org # untested fix to unlikely driver error path
Reviewed-by: Divya Koppera <Divya.Koppera@microchip.com>
Signed-off-by: Henry Hu <huhai@kylinos.cn>
Link: https://patch.msgid.link/20260903113046.163630-1-15815827059@163.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-07 17:20:19 -07:00
Jakub Kicinski
6f157f39d1 Merge branch 'remove-comma-after-sentinel-entries-in-match-table'
Siddharth Vadapalli says:

====================
Remove comma after sentinel entries in match table

This series removes the comma present after sentinel entries in the match
tables across all networking subsystem drivers, with the exception of the
davinci_mdio.c driver, for which, the patch posted by Geert at:
https://lore.kernel.org/r/e481b6de46cecc6ea604ae165272c667274cc621.1788437140.git.geert+renesas@glider.be/
does the same.

Since I inquired about a cleanup across the entire networking subsystem but
didn't get a response:
https://lore.kernel.org/r/b3d19098-eccd-4619-b667-ad3b7e0a4422@ti.com/
I decided to post this series. Given that Andrew Lunn acknowledged the
cleanup of the davinci_mdio driver:
https://lore.kernel.org/r/abec6831-d344-489d-b70c-1e5dd4d43c2d@lunn.ch/
and I don't see why the cleanup is specific to davinci_mdio driver alone,
I am hoping that this series is treated identically to the patch that
Geert had posted for the davinci_mdio driver.
====================

Link: https://patch.msgid.link/20260904043724.2955444-1-s-vadapalli@ti.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-07 16:57:10 -07:00
Siddharth Vadapalli
8afd6adb07 net: wan: slic_ds26522: Remove comma after sentinel-entry in match-table
Since sentinel is the last entry and we do not expect further entries
following it, remove the comma.

Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-07 16:57:10 -07:00
Siddharth Vadapalli
af86c0a580 net: phy: nxp-c45-tja11xx: Remove comma after sentinel-entry in match-table
Since sentinel is the last entry and we do not expect further entries
following it, remove the comma.

Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-07 16:57:10 -07:00
Siddharth Vadapalli
3fc32eb28f net: pcs: xpcs-plat: Remove comma after sentinel-entry in match-table
Since sentinel is the last entry and we do not expect further entries
following it, remove the comma.

Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-07 16:57:10 -07:00
Siddharth Vadapalli
dd7a0a7558 net: mdio: bcm-unimac: Remove comma after sentinel-entry in match-table
Since sentinel is the last entry and we do not expect further entries
following it, remove the comma.

Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-07 16:57:10 -07:00
Siddharth Vadapalli
93b9f4f136 net: mdio: bcm-iproc: Remove comma after sentinel-entry in match-table
Since sentinel is the last entry and we do not expect further entries
following it, remove the comma.

Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-07 16:57:10 -07:00
Siddharth Vadapalli
6d1c7d7a07 net: ethernet: ti: cpsw_new: Remove comma after sentinel-entry in match-table
Since sentinel is the last entry and we do not expect further entries
following it, remove the comma.

Reviewed-by: Alexander Sverdlin <alex@sverdlin.org>
Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-07 16:57:03 -07:00
Siddharth Vadapalli
1cdf69f1e9 net: ethernet: ti: cpsw: Remove comma after sentinel-entry in match-table
Since sentinel is the last entry and we do not expect further entries
following it, remove the comma.

Reviewed-by: Alexander Sverdlin <alex@sverdlin.org>
Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-07 16:56:37 -07:00
Siddharth Vadapalli
8b7eacd621 net: ti: am65-cpsw-nuss: Remove comma after sentinel-entry in match-table
Since sentinel is the last entry and we do not expect further entries
following it, remove the comma.

Reviewed-by: Alexander Sverdlin <alex@sverdlin.org>
Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Link: https://patch.msgid.link/20260904043724.2955444-27-s-vadapalli@ti.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-07 16:56:29 -07:00
Siddharth Vadapalli
435d4b4aa9 net: spacemit: k1_emac: Remove comma after sentinel-entry in match-table
Since sentinel is the last entry and we do not expect further entries
following it, remove the comma.

Acked-by: Vivian Wang <wangruikang@iscas.ac.cn>
Reviewed-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Link: https://patch.msgid.link/20260904043724.2955444-26-s-vadapalli@ti.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-07 16:56:16 -07:00
Siddharth Vadapalli
a450f73151 net: bcmasp: Remove comma after sentinel-entry in match-table
Since sentinel is the last entry and we do not expect further entries
following it, remove the comma.

Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Link: https://patch.msgid.link/20260904043724.2955444-25-s-vadapalli@ti.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-07 16:56:16 -07:00
Siddharth Vadapalli
2b46b5c9ef net: dsa: sja1105: Remove comma after sentinel-entry in match-table
Since sentinel is the last entry and we do not expect further entries
following it, remove the comma.

Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Link: https://patch.msgid.link/20260904043724.2955444-24-s-vadapalli@ti.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-07 16:56:16 -07:00
Siddharth Vadapalli
3906342032 net: dsa: rzn1_a5psw: Remove comma after sentinel-entry in match-table
Since sentinel is the last entry and we do not expect further entries
following it, remove the comma.

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Link: https://patch.msgid.link/20260904043724.2955444-23-s-vadapalli@ti.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-07 16:56:06 -07:00
Siddharth Vadapalli
068d6ebde3 net: dsa: realtek: rtl8366rb: Remove comma after sentinel-entry in match-table
Since sentinel is the last entry and we do not expect further entries
following it, remove the comma.

Reviewed-by: Linus Walleij <linusw@kernel.org>
Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Link: https://patch.msgid.link/20260904043724.2955444-22-s-vadapalli@ti.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-07 16:56:00 -07:00
Siddharth Vadapalli
6233d1ee37 net: dsa: realtek: rtl8365mb: Remove comma after sentinel-entry in match-table
Since sentinel is the last entry and we do not expect further entries
following it, remove the comma.

Reviewed-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Reviewed-by: Linus Walleij <linusw@kernel.org>
Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Link: https://patch.msgid.link/20260904043724.2955444-21-s-vadapalli@ti.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-07 16:55:47 -07:00
Siddharth Vadapalli
c456954683 net: dsa: qca8k: Remove comma after sentinel-entry in match-table
Since sentinel is the last entry and we do not expect further entries
following it, remove the comma.

Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Link: https://patch.msgid.link/20260904043724.2955444-20-s-vadapalli@ti.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-07 16:55:47 -07:00
Siddharth Vadapalli
ead5894715 net: dsa: mv88e6xxx: Remove comma after sentinel-entry in match-table
Since sentinel is the last entry and we do not expect further entries
following it, remove the comma.

Reviewed-by: Alexander Sverdlin <alex@sverdlin.org>
Reviewed-by: Linus Walleij <linusw@kernel.org>
Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Link: https://patch.msgid.link/20260904043724.2955444-19-s-vadapalli@ti.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-07 16:55:35 -07:00
Siddharth Vadapalli
6011d062dc net: dsa: mv88e6060: Remove comma after sentinel-entry in match-table
Since sentinel is the last entry and we do not expect further entries
following it, remove the comma.

Reviewed-by: Alexander Sverdlin <alex@sverdlin.org>
Reviewed-by: Linus Walleij <linusw@kernel.org>
Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Link: https://patch.msgid.link/20260904043724.2955444-18-s-vadapalli@ti.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-07 16:55:23 -07:00
Siddharth Vadapalli
f9bcf01a66 net: dsa: mt7530: mmio: Remove comma after sentinel-entry in match-table
Since sentinel is the last entry and we do not expect further entries
following it, remove the comma.

Reviewed-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Link: https://patch.msgid.link/20260904043724.2955444-17-s-vadapalli@ti.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-07 16:54:21 -07:00
Siddharth Vadapalli
e861516330 net: dsa: mt7530: mdio: Remove comma after sentinel-entry in match-table
Since sentinel is the last entry and we do not expect further entries
following it, remove the comma.

Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Link: https://patch.msgid.link/20260904043724.2955444-16-s-vadapalli@ti.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-07 16:54:21 -07:00
Siddharth Vadapalli
9a580b3496 net: dsa: mxl-gsw1xx: Remove comma after sentinel-entry in match-table
Since sentinel is the last entry and we do not expect further entries
following it, remove the comma.

Reviewed-by: Alexander Sverdlin <alex@sverdlin.org>
Reviewed-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Link: https://patch.msgid.link/20260904043724.2955444-15-s-vadapalli@ti.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-07 16:54:10 -07:00
Siddharth Vadapalli
4caa67d082 net: dsa: lan9303: mdio: Remove comma after sentinel-entry in match-table
Since sentinel is the last entry and we do not expect further entries
following it, remove the comma.

Reviewed-by: Alexander Sverdlin <alex@sverdlin.org>
Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Link: https://patch.msgid.link/20260904043724.2955444-14-s-vadapalli@ti.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-07 16:54:01 -07:00
Siddharth Vadapalli
a650dd1fc2 net: dsa: lan9303: i2c: Remove comma after sentinel-entry in match-table
Since sentinel is the last entry and we do not expect further entries
following it, remove the comma.

Reviewed-by: Alexander Sverdlin <alex@sverdlin.org>
Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Link: https://patch.msgid.link/20260904043724.2955444-13-s-vadapalli@ti.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-07 16:53:53 -07:00
Siddharth Vadapalli
4ea4ec3653 net: dsa: hellcreek: Remove comma after sentinel-entry in match-table
Since sentinel is the last entry and we do not expect further entries
following it, remove the comma.

Reviewed-by: Kurt Kanzenbach <kurt@linutronix.de>
Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Link: https://patch.msgid.link/20260904043724.2955444-12-s-vadapalli@ti.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-07 16:53:45 -07:00
Siddharth Vadapalli
2d08ac30e2 net: dsa: bcm_sf2: Remove comma after sentinel-entry in match-table
Since sentinel is the last entry and we do not expect further entries
following it, remove the comma.

Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Link: https://patch.msgid.link/20260904043724.2955444-11-s-vadapalli@ti.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-07 16:52:40 -07:00
Siddharth Vadapalli
30fccb0c4e net: dsa: b53: srab: Remove comma after sentinel-entry in match-table
Since sentinel is the last entry and we do not expect further entries
following it, remove the comma.

Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Link: https://patch.msgid.link/20260904043724.2955444-10-s-vadapalli@ti.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-07 16:52:40 -07:00
Siddharth Vadapalli
9869b64b32 net: dsa: b53: mdio: Remove comma after sentinel-entry in match-table
Since sentinel is the last entry and we do not expect further entries
following it, remove the comma.

Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Link: https://patch.msgid.link/20260904043724.2955444-9-s-vadapalli@ti.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-07 16:52:39 -07:00
Siddharth Vadapalli
5b01d57660 can: sja1000_platform: Remove comma after sentinel-entry in match-table
Since sentinel is the last entry and we do not expect further entries
following it, remove the comma.

Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Link: https://patch.msgid.link/20260904043724.2955444-8-s-vadapalli@ti.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-07 16:52:39 -07:00
Siddharth Vadapalli
44ef827c95 can: sja1000: f81601: Remove comma after sentinel-entry in match-table
Since sentinel is the last entry and we do not expect further entries
following it, remove the comma.

Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Link: https://patch.msgid.link/20260904043724.2955444-7-s-vadapalli@ti.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-07 16:52:39 -07:00
Siddharth Vadapalli
6c507ab36a can: m_can: Remove comma after sentinel-entry in match-table
Since sentinel is the last entry and we do not expect further entries
following it, remove the comma.

Acked-by: Markus Schneider-Pargmann <msp@baylibre.com>
Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Link: https://patch.msgid.link/20260904043724.2955444-6-s-vadapalli@ti.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-07 16:52:29 -07:00
Siddharth Vadapalli
e6f3617dec can: ifi_canfd: Remove comma after sentinel-entry in match-table
Since sentinel is the last entry and we do not expect further entries
following it, remove the comma.

Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Link: https://patch.msgid.link/20260904043724.2955444-5-s-vadapalli@ti.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-07 16:51:24 -07:00
Siddharth Vadapalli
4b7e7da655 can: flexcan: Remove comma after sentinel-entry in match-table
Since sentinel is the last entry and we do not expect further entries
following it, remove the comma.

Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Link: https://patch.msgid.link/20260904043724.2955444-4-s-vadapalli@ti.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-07 16:51:24 -07:00
Siddharth Vadapalli
fa7291a252 can: c_can: Remove comma after sentinel-entry in match-table
Since sentinel is the last entry and we do not expect further entries
following it, remove the comma.

Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Link: https://patch.msgid.link/20260904043724.2955444-3-s-vadapalli@ti.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-07 16:51:24 -07:00
Siddharth Vadapalli
3fb94a277f can: bxcan: Remove comma after sentinel-entry in match-table
Since sentinel is the last entry and we do not expect further entries
following it, remove the comma.

Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Link: https://patch.msgid.link/20260904043724.2955444-2-s-vadapalli@ti.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-07 16:51:24 -07:00
Jakub Kicinski
d54ba079bb Merge branch 'psp-make-tx-key-ops-optional-for-drivers'
Daniel Zahka says:

====================
psp: make tx key ops optional for drivers

This is the first of two series which together implement rekeying PSP
protected tcp connections. Here are both series together on github:
https://github.com/danieldzahka/linux/commits/psp-rekey-split/

This first series is mostly non-functional changes, except for the minor
difference that netdevsim driver implements tx key ops. Its tx key ops
were basically NOPs, and in the future PSP core can subsume the assoc
counting that it was doing.

The purpose of the refactors is to make code reusable from paths that
will be added to the code in the rekeying series.

Patch 1 exists to setup two paths for tx key deletion, one where keys
are deleted as they are now in psp_assoc_free() when the assoc refcount
drops to 0, and a different path in series two, where the keys will get
put onto a queue for deferred deletion.

Patch 2 exists to allow tx assoc state to be set either from the
connection setup path, or in series two, from a tx rekeying path.

Patch 3 makes implementing tx_key_add and tx_key_del optional for
drivers. These callbacks only make sense for devices that utilize a tx
SADB. This distinction is important once rekeying is involved, because
an SADB implies a race between in flight tx packets and key deletion,
that does not exist for non-SADB implementations.

Patch 4 removes the unnecessary tx key ops in netdevsim.

No new tests are added to this series. There is no real user visible
change of behavior.
====================

Link: https://patch.msgid.link/20260903-psp-prep-v1-0-d47e9c4c375d@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-07 16:38:40 -07:00
Daniel Zahka
da630d1da2 netdevsim: psp: drop tx key ops
netdevsim has no SADB. The usage of psp_assoc_drv_data() was always
obsolete given psp_validate_xmit(), so we can remove nsim_assoc_add()
and nsim_assoc_del(). netdevsim::assoc_cnt can also be removed. PSP core
can track the balance of tx_key_add vs tx_key_del calls in a future
change.

Delete psp_assoc_drv_data() because there are no more callers left in
the tree. mlx5 accesses pas->drv_data directly.

Signed-off-by: Daniel Zahka <daniel.zahka@gmail.com>
Link: https://patch.msgid.link/20260903-psp-prep-v1-4-d47e9c4c375d@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-07 16:38:37 -07:00
Daniel Zahka
1e16b30310 psp: allow drivers to omit tx key add/del ops
Drivers that don't use an SADB for tx key storage don't have a use
for psp_dev_ops::tx_key_add and psp_dev_ops::tx_key_del.

Allowing drivers to leave these as NULL gives PSP core a simple way to
determine whether a driver utilizes an SADB, which in turn could
affect how PSP core chooses to handle certain situations.

For example:
- deciding if tx key deletion needs to be delayed during a rekeying
  event to avoid in-flight packets using old key handles.
- choosing whether or not to report device stats like SADB usage to
  userspace, which only make sense if the driver uses on-device key
  storage.

Signed-off-by: Daniel Zahka <daniel.zahka@gmail.com>
Link: https://patch.msgid.link/20260903-psp-prep-v1-3-d47e9c4c375d@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-07 16:38:37 -07:00
Daniel Zahka
4d3a7d1104 psp: move code from psp_sock_assoc_set_tx() into helper functions
No functional changes.

Lift code that needs to be called from both initial tx establishment
and tx rekeying into functions that can be reused in both paths.

The plaintext in recv queue checks and mss adjustment only run on
initial tx keying. The dummy psp_assoc machinery will be used in both
paths.

psp_dev_tx_key_add() absorbs the dummy assoc machinery, as its main
purpose is to populate the device specific psp_assoc:drv_data.

psp_assoc_set_tx() exists so that a future change can allow
psp_dev_tx_key_add() to be skipped entirely for devices that don't use
an SADB, while copying of the tx spi and key into the assoc needs to
happen regardless of SADB vs. no SADB.

Signed-off-by: Daniel Zahka <daniel.zahka@gmail.com>
Link: https://patch.msgid.link/20260903-psp-prep-v1-2-d47e9c4c375d@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-07 16:38:37 -07:00