bridge: add cfm command
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 3 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | uapi: import cfm_bridge.hinclude/ | +64 | 0 replies | |
| 2/2 | bridge: add cfm commandbridge/ bridge/ bridge/ +2 more | +1257 | 1 reply |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH iproute2-next 0/2] bridge: add cfm command
The bridge has had 802.1ag CFM support since 5.11, but iproute2 never got a command for it. The only userspace for it today is Microchip's out of tree cfm tool. This series adds "bridge cfm".
Patch 1 imports cfm_bridge.h, which has the domain, direction and interval enums the CFM attributes use. Patch 2 adds the command and a man page section.
I tested it on a 7.0 kernel with two bridges joined by a veth pair and a MEP on each end. CCMs go out at every interval, each side sees the other as a peer, the TLV values and the RDI bit get through, and ccm_defect gets set when one side stops sending. I also checked show config and show status, text and JSON, with more than one MEP and peer on a bridge.
While testing I found that the kernel sends CCMs from a workqueue, so with HZ=1000 the 3.3ms interval actually comes out at about 5ms and 1s at about 1024ms. The man page says the real interval can be longer than its name.
One thing I wasn't sure about: the MAID is given as a hex string, the same bytes the kernel stores. The Microchip tool builds it from an MD name and an MA name. I can add that, but it seemed better as a separate patch.
Separately, I'm sending a net-next patch so that CFM config changes send a notification. Right now only status changes do. The two don't depend on each other.
Abdul Wasey (2):
uapi: import cfm_bridge.h
bridge: add cfm command
bridge/Makefile | 2 +- bridge/br_common.h | 1 + bridge/bridge.c | 3 +- bridge/cfm.c | 1058 +++++++++++++++++++++++++++++++ include/uapi/linux/cfm_bridge.h | 64 ++ man/man8/bridge.8 | 196 +++++- 6 files changed, 1321 insertions(+), 3 deletions(-) create mode 100644 bridge/cfm.c create mode 100644 include/uapi/linux/cfm_bridge.h
Signature · 1 line
2.53.0