mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/3] net: bridge: cfm: notify userspace on CFM config changes
@ 2026-10-05  4:38 Abdul Wasey
  2026-10-05  4:38 ` [PATCH net-next v2 1/3] net: bridge: cfm: count CFM config attributes in the link message size Abdul Wasey
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Abdul Wasey @ 2026-10-05  4:38 UTC (permalink / raw)
  To: netdev
  Cc: razor, idosch, davem, edumazet, kuba, pabeni, horms,
	horatiu.vultur, bridge, linux-kernel

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/20261004041320.2684045-1-w453y.me@gmail.com/

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(-)

-- 
2.53.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-10-05  4:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-05  4:38 [PATCH net-next v2 0/3] net: bridge: cfm: notify userspace on CFM config changes Abdul Wasey
2026-10-05  4:38 ` [PATCH net-next v2 1/3] net: bridge: cfm: count CFM config attributes in the link message size Abdul Wasey
2026-10-05  4:38 ` [PATCH net-next v2 2/3] net: bridge: cfm: send an empty CFM nest when a bridge has no MEPs Abdul Wasey
2026-10-05  4:38 ` [PATCH net-next v2 3/3] net: bridge: cfm: notify userspace on CFM config changes Abdul Wasey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®