Skip to content

net: bridge: cfm: notify userspace on CFM config changes

Abdul Wasey bridge lkml netdev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 1 replyIn review
  2. v11 patch 1 replySuperseded

Changes in v2 from the cover letter

- new patch 1, count the config attributes in the message size
- new patch 2, empty CFM nest for a bridge with no MEPs
- patch 3: unchanged, rebased on current net-next

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3net: bridge: cfm: count CFM config attributes in the link message sizenet/bridge/br_netlink.c+40 -20 replies
2/3net: bridge: cfm: send an empty CFM nest when a bridge has no MEPsnet/bridge/br_netlink.c+4 -10 replies
3/3net: bridge: cfm: notify userspace on CFM config changesnet/bridge/br_cfm_netlink.c+23 -90 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH net-next v2 0/3] net: bridge: cfm: notify userspace on CFM config changes

CFM status changes are sent to userspace, config changes are not, so the only way to see a MEP being created, a peer added or CCM transmission started is to poll RTM_GETLINK. Patch 3 adds the notification. Patches 1 and 2 fix the two problems the AI review found in v1.

Patch 1 makes br_get_link_af_size_filtered() count the CFM config attributes. Without it the notification overflows its skb once a MEP has about 32 peers, and br_info_notify() hits its WARN_ON. Patch 2 puts an empty IFLA_BRIDGE_CFM nest in the message when the bridge has no MEPs, so deleting the last MEP is visible to a listener.

Tested with virtme-ng on net-next: 300 peer MEPs and config changes give one notification each (6248 byte CFM payload) and no warning; deleting the last MEP gives a notification with an empty IFLA_BRIDGE_CFM; a request that fails before changing anything sends nothing, one that fails half way still sends one. Also built with CONFIG_BRIDGE_CFM off.

v2:
- new patch 1, count the config attributes in the message size
- new patch 2, empty CFM nest for a bridge with no MEPs
- patch 3: unchanged, rebased on current net-next

v1: https://lore.kernel.org/netdev/[email protected]/

Abdul Wasey (3):
net: bridge: cfm: count CFM config attributes in the link message size
net: bridge: cfm: send an empty CFM nest when a bridge has no MEPs
net: bridge: cfm: notify userspace on CFM config changes

 net/bridge/br_cfm_netlink.c | 32 ++++++++++++++++++-------
 net/bridge/br_netlink.c     | 47 ++++++++++++++++++++++++++++++++++---
 2 files changed, 67 insertions(+), 12 deletions(-)
Signature · 1 line
2.53.0