Skip to content

bridge: prepare lockless br_port_fill_attrs() (I)

Eric Dumazet netdev 3 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest11 patches 1 replyApplied 11/11
  2. v211 patches 14 repliesSuperseded
  3. v111 patches 15 repliesSuperseded

Patches in v3 All 11 applied

#Subject and filesSizeRepliesApplied
1/11bridge: add a READ_ONCE() in br_timer_value()net/bridge/br_stp_timer.c+1 -10 repliesApplied
2/11bridge: add bridge_flags_bit enuminclude/linux/if_bridge.h+53 -250 repliesApplied
3/11bridge: use BR_PROMISC_BITnet/bridge/br_if.c net/bridge/br_private.h+3 -30 repliesApplied
4/11bridge: use BR_ADMIN_COST_BITnet/bridge/br_if.c net/bridge/br_stp_if.c+2 -20 repliesApplied
5/11bridge: provide lockless access to p->path_costnet/bridge/br_if.c net/bridge/br_ioctl.c net/bridge/br_netlink.c +3 more+16 -110 repliesApplied
6/11bridge: provide lockless access to p->designated_costnet/bridge/br_ioctl.c net/bridge/br_netlink.c net/bridge/br_stp.c +1 more+22 -151 replyApplied
7/11bridge: provide lockless access to p->designated_portnet/bridge/br_ioctl.c net/bridge/br_netlink.c net/bridge/br_stp.c +2 more+7 -60 repliesApplied
8/11bridge: provide lockless access to p->prioritynet/bridge/br_netlink.c net/bridge/br_stp_if.c net/bridge/br_sysfs_if.c+3 -30 repliesApplied
9/11bridge: provide lockless access to p->port_idnet/bridge/br_ioctl.c net/bridge/br_netlink.c net/bridge/br_stp_if.c +1 more+5 -50 repliesApplied
10/11bridge: provide lockless access to p->config_pendingnet/bridge/br_ioctl.c net/bridge/br_netlink.c net/bridge/br_stp.c +2 more+9 -90 repliesApplied
11/11bridge: read p->flags once in br_port_fill_attrs()net/bridge/br_netlink.c+21 -200 repliesApplied

Reviews trailers per patch

All 11 patches have a Reviewed-by or Acked-by.

PatchIdo SchimmelNikolay Aleksandrov
1/11R-b A-b
2/11R-b A-b
3/11R-b A-b
4/11R-b A-b
5/11R-b A-b
6/11R-b A-b
7/11R-b A-b
8/11R-b A-b
9/11R-b A-b
10/11R-b A-b
11/11R-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 net-next 00/11] bridge: prepare lockless br_port_fill_attrs() (I)

medium-term goal is to allow "ip link show" dump commands to run without RTNL.

This round of patches adds/fixes some lockess accesses in bridge.

This is not complete, more patches will come later.

Ultimately all changes to p->flags should use set_bit()/clear_bit().

I repeat (AI agents might read this cover ?):

Many p->flags accesses are racy, and will hopefully be fixed in a future series.

v3: addressed Ido's feedback again (patch 6), silly me.
v2: addressed Ido's feedback (patches 5 & 6).

Eric Dumazet (11):
bridge: add a READ_ONCE() in br_timer_value()
bridge: add bridge_flags_bit enum
bridge: use BR_PROMISC_BIT
bridge: use BR_ADMIN_COST_BIT
bridge: provide lockless access to p->path_cost
bridge: provide lockless access to p->designated_cost
bridge: provide lockless access to p->designated_port
bridge: provide lockless access to p->priority
bridge: provide lockless access to p->port_id
bridge: provide lockless access to p->config_pending
bridge: read p->flags once in br_port_fill_attrs()

 include/linux/if_bridge.h | 78 ++++++++++++++++++++++++++-------------
 net/bridge/br_if.c        |  8 ++--
 net/bridge/br_ioctl.c     | 10 ++---
 net/bridge/br_netlink.c   | 55 ++++++++++++++-------------
 net/bridge/br_private.h   |  2 +-
 net/bridge/br_stp.c       | 47 ++++++++++++++---------
 net/bridge/br_stp_if.c    | 16 ++++----
 net/bridge/br_stp_timer.c |  2 +-
 net/bridge/br_sysfs_if.c  | 12 +++---
 9 files changed, 136 insertions(+), 94 deletions(-)
Signature · 1 line
2.54.0.1032.g2f8565e1d1-goog