Skip to content

phonet: Convert all doit() and dumpit() to RCU.

Kuniyuki Iwashima netdev 1 version 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

  1. v1 Latest9 patches 15 repliesApplied 9/9

Patches in v1 All 9 applied

#Subject and filesSizeRepliesApplied
1/9phonet: Pass ifindex to fill_addr().net/phonet/pn_netlink.c+7 -61 replyApplied
2/9phonet: Pass net and ifindex to phonet_address_notify().include/net/phonet/pn_dev.h net/phonet/pn_dev.c net/phonet/pn_netlink.c+14 -101 replyApplied
3/9phonet: Convert phonet_device_list.lock to spinlock_t.include/net/phonet/pn_dev.h net/phonet/pn_dev.c+19 -101 replyApplied
4/9phonet: Don't hold RTNL for addr_doit().net/phonet/pn_netlink.c+22 -111 replyApplied
5/9phonet: Don't hold RTNL for getaddr_dumpit().net/phonet/pn_netlink.c+15 -97 repliesApplied
6/9phonet: Pass ifindex to fill_route().net/phonet/pn_netlink.c+6 -61 replyApplied
7/9phonet: Pass net and ifindex to rtm_phonet_notify().include/net/phonet/pn_dev.h net/phonet/pn_dev.c net/phonet/pn_netlink.c+17 -111 replyApplied
8/9phonet: Convert phonet_routes.lock to spinlock_t.include/net/phonet/pn_dev.h net/phonet/pn_dev.c+14 -101 replyApplied
9/9phonet: Don't hold RTNL for route_doit().net/phonet/pn_netlink.c+13 -61 replyApplied

Reviews trailers per patch

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

PatchEric Dumazet
1/9R-b
2/9R-b
3/9R-b
4/9R-b
5/9R-b
6/9R-b
7/9R-b
8/9R-b
9/9R-b

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

Read the v1 thread

Cover letter [PATCH v1 net-next 0/9] phonet: Convert all doit() and dumpit() to RCU.

addr_doit() and route_doit() access only phonet_device_list(dev_net(dev)) and phonet_pernet(dev_net(dev))->routes, respectively.

Each per-netns struct has its dedicated mutex, and RTNL also protects the structs. __dev_change_net_namespace() has synchronize_net(), so we have two options to convert addr_doit() and route_doit().

1. Use per-netns RTNL
2. Use RCU and convert each struct mutex to spinlock_t

As RCU is preferable, this series converts all PF_PHONET's doit() and dumpit() to RCU.

4 doit()s and 1 dumpit() are now converted to RCU, 70 doit()s and 28 dumpit()s are still under RTNL.

Kuniyuki Iwashima (9):
phonet: Pass ifindex to fill_addr().
phonet: Pass net and ifindex to phonet_address_notify().
phonet: Convert phonet_device_list.lock to spinlock_t.
phonet: Don't hold RTNL for addr_doit().
phonet: Don't hold RTNL for getaddr_dumpit().
phonet: Pass ifindex to fill_route().
phonet: Pass net and ifindex to rtm_phonet_notify().
phonet: Convert phonet_routes.lock to spinlock_t.
phonet: Don't hold RTNL for route_doit().

 include/net/phonet/pn_dev.h |   8 +--
 net/phonet/pn_dev.c         |  69 ++++++++++++++--------
 net/phonet/pn_netlink.c     | 115 ++++++++++++++++++++++--------------
 3 files changed, 120 insertions(+), 72 deletions(-)
Signature · 1 line
2.39.5 (Apple Git-154)