History

bridge: cfm: Netlink SET configuration Interface.

This is the implementation of CFM netlink configuration set information interface. Add new nested netlink attributes. These attributes are used by the user space to create/delete/configure CFM instances. SETLINK: IFLA_BRIDGE_CFM: Indicate that the following attributes are CFM. IFLA_BRIDGE_CFM_MEP_CREATE: This indicate that a MEP instance must be created. IFLA_BRIDGE_CFM_MEP_DELETE: This indicate that a MEP instance must be deleted. IFLA_BRIDGE_CFM_MEP_CONFIG: This indicate that a MEP instance must be configured. IFLA_BRIDGE_CFM_CC_CONFIG: This indicate that a MEP instance Continuity Check (CC) functionality must be configured. IFLA_BRIDGE_CFM_CC_PEER_MEP_ADD: This indicate that a CC Peer MEP must be added. IFLA_BRIDGE_CFM_CC_PEER_MEP_REMOVE: This indicate that a CC Peer MEP must be removed. IFLA_BRIDGE_CFM_CC_CCM_TX: This indicate that the CC transmitted CCM PDU must be configured. IFLA_BRIDGE_CFM_CC_RDI: This indicate that the CC transmitted CCM PDU RDI must be configured. CFM nested attribute has the following attributes in next level. SETLINK RTEXT_FILTER_CFM_CONFIG: IFLA_BRIDGE_CFM_MEP_CREATE_INSTANCE: The created MEP instance number. The type is u32. IFLA_BRIDGE_CFM_MEP_CREATE_DOMAIN: The created MEP domain. The type is u32 (br_cfm_domain). It must be BR_CFM_PORT. This means that CFM frames are transmitted and received directly on the port - untagged. Not in a VLAN. IFLA_BRIDGE_CFM_MEP_CREATE_DIRECTION: The created MEP direction. The type is u32 (br_cfm_mep_direction). It must be BR_CFM_MEP_DIRECTION_DOWN. This means that CFM frames are transmitted and received on the port. Not in the bridge. IFLA_BRIDGE_CFM_MEP_CREATE_IFINDEX: The created MEP residence port ifindex. The type is u32 (ifindex). IFLA_BRIDGE_CFM_MEP_DELETE_INSTANCE: The deleted MEP instance number. The type is u32. IFLA_BRIDGE_CFM_MEP_CONFIG_INSTANCE: The configured MEP instance number. The type is u32. IFLA_BRIDGE_CFM_MEP_CONFIG_UNICAST_MAC: The configured MEP unicast MAC address. The type is 6*u8 (array). This is used as SMAC in all transmitted CFM frames. IFLA_BRIDGE_CFM_MEP_CONFIG_MDLEVEL: The configured MEP unicast MD level. The type is u32. It must be in the range 1-7. No CFM frames are passing through this MEP on lower levels. IFLA_BRIDGE_CFM_MEP_CONFIG_MEPID: The configured MEP ID. The type is u32. It must be in the range 0-0x1FFF. This MEP ID is inserted in any transmitted CCM frame. IFLA_BRIDGE_CFM_CC_CONFIG_INSTANCE: The configured MEP instance number. The type is u32. IFLA_BRIDGE_CFM_CC_CONFIG_ENABLE: The Continuity Check (CC) functionality is enabled or disabled. The type is u32 (bool). IFLA_BRIDGE_CFM_CC_CONFIG_EXP_INTERVAL: The CC expected receive interval of CCM frames. The type is u32 (br_cfm_ccm_interval). This is also the transmission interval of CCM frames when enabled. IFLA_BRIDGE_CFM_CC_CONFIG_EXP_MAID: The CC expected receive MAID in CCM frames. The type is CFM_MAID_LENGTH*u8. This is MAID is also inserted in transmitted CCM frames. IFLA_BRIDGE_CFM_CC_PEER_MEP_INSTANCE: The configured MEP instance number. The type is u32. IFLA_BRIDGE_CFM_CC_PEER_MEPID: The CC Peer MEP ID added. The type is u32. When a Peer MEP ID is added and CC is enabled it is expected to receive CCM frames from that Peer MEP. IFLA_BRIDGE_CFM_CC_RDI_INSTANCE: The configured MEP instance number. The type is u32. IFLA_BRIDGE_CFM_CC_RDI_RDI: The RDI that is inserted in transmitted CCM PDU. The type is u32 (bool). IFLA_BRIDGE_CFM_CC_CCM_TX_INSTANCE: The configured MEP instance number. The type is u32. IFLA_BRIDGE_CFM_CC_CCM_TX_DMAC: The transmitted CCM frame destination MAC address. The type is 6*u8 (array). This is used as DMAC in all transmitted CFM frames. IFLA_BRIDGE_CFM_CC_CCM_TX_SEQ_NO_UPDATE: The transmitted CCM frame update (increment) of sequence number is enabled or disabled. The type is u32 (bool). IFLA_BRIDGE_CFM_CC_CCM_TX_PERIOD: The period of time where CCM frame are transmitted. The type is u32. The time is given in seconds. SETLINK IFLA_BRIDGE_CFM_CC_CCM_TX must be done before timeout to keep transmission alive. When period is zero any ongoing CCM frame transmission will be stopped. IFLA_BRIDGE_CFM_CC_CCM_TX_IF_TLV: The transmitted CCM frame update with Interface Status TLV is enabled or disabled. The type is u32 (bool). IFLA_BRIDGE_CFM_CC_CCM_TX_IF_TLV_VALUE: The transmitted Interface Status TLV value field. The type is u8. IFLA_BRIDGE_CFM_CC_CCM_TX_PORT_TLV: The transmitted CCM frame update with Port Status TLV is enabled or disabled. The type is u32 (bool). IFLA_BRIDGE_CFM_CC_CCM_TX_PORT_TLV_VALUE: The transmitted Port Status TLV value field. The type is u8.

Henrik Bjoernlund committed 6 years ago

Commit 2be665c1 parent dc32cbb7 files · +571 −2Browse files

Showing the changes to include/uapi/linux (2 of 7 files). Show all

Unified · Split

2 files
  1. include/uapi/linux/if_bridge.h +90 −0
  2. include/uapi/linux/rtnetlink.h +1 −0
include/uapi/linux/if_bridge.h+90−0
@@ -121,6 +121,7 @@ enum { · 120 unmodified lines
121121 IFLA_BRIDGE_VLAN_INFO,
122122 IFLA_BRIDGE_VLAN_TUNNEL_INFO,
123123 IFLA_BRIDGE_MRP,
124+ IFLA_BRIDGE_CFM,
124125 __IFLA_BRIDGE_MAX,
125126 };
126127 #define IFLA_BRIDGE_MAX (__IFLA_BRIDGE_MAX - 1)
@@ -328,6 +329,95 @@ struct br_mrp_start_in_test { · 201 unmodified lines
328329 __u16 in_id;
329330 };
330331
332+enum {
333+ IFLA_BRIDGE_CFM_UNSPEC,
334+ IFLA_BRIDGE_CFM_MEP_CREATE,
335+ IFLA_BRIDGE_CFM_MEP_DELETE,
336+ IFLA_BRIDGE_CFM_MEP_CONFIG,
337+ IFLA_BRIDGE_CFM_CC_CONFIG,
338+ IFLA_BRIDGE_CFM_CC_PEER_MEP_ADD,
339+ IFLA_BRIDGE_CFM_CC_PEER_MEP_REMOVE,
340+ IFLA_BRIDGE_CFM_CC_RDI,
341+ IFLA_BRIDGE_CFM_CC_CCM_TX,
342+ __IFLA_BRIDGE_CFM_MAX,
343+};
344+
345+#define IFLA_BRIDGE_CFM_MAX (__IFLA_BRIDGE_CFM_MAX - 1)
346+
347+enum {
348+ IFLA_BRIDGE_CFM_MEP_CREATE_UNSPEC,
349+ IFLA_BRIDGE_CFM_MEP_CREATE_INSTANCE,
350+ IFLA_BRIDGE_CFM_MEP_CREATE_DOMAIN,
351+ IFLA_BRIDGE_CFM_MEP_CREATE_DIRECTION,
352+ IFLA_BRIDGE_CFM_MEP_CREATE_IFINDEX,
353+ __IFLA_BRIDGE_CFM_MEP_CREATE_MAX,
354+};
355+
356+#define IFLA_BRIDGE_CFM_MEP_CREATE_MAX (__IFLA_BRIDGE_CFM_MEP_CREATE_MAX - 1)
357+
358+enum {
359+ IFLA_BRIDGE_CFM_MEP_DELETE_UNSPEC,
360+ IFLA_BRIDGE_CFM_MEP_DELETE_INSTANCE,
361+ __IFLA_BRIDGE_CFM_MEP_DELETE_MAX,
362+};
363+
364+#define IFLA_BRIDGE_CFM_MEP_DELETE_MAX (__IFLA_BRIDGE_CFM_MEP_DELETE_MAX - 1)
365+
366+enum {
367+ IFLA_BRIDGE_CFM_MEP_CONFIG_UNSPEC,
368+ IFLA_BRIDGE_CFM_MEP_CONFIG_INSTANCE,
369+ IFLA_BRIDGE_CFM_MEP_CONFIG_UNICAST_MAC,
370+ IFLA_BRIDGE_CFM_MEP_CONFIG_MDLEVEL,
371+ IFLA_BRIDGE_CFM_MEP_CONFIG_MEPID,
372+ __IFLA_BRIDGE_CFM_MEP_CONFIG_MAX,
373+};
374+
375+#define IFLA_BRIDGE_CFM_MEP_CONFIG_MAX (__IFLA_BRIDGE_CFM_MEP_CONFIG_MAX - 1)
376+
377+enum {
378+ IFLA_BRIDGE_CFM_CC_CONFIG_UNSPEC,
379+ IFLA_BRIDGE_CFM_CC_CONFIG_INSTANCE,
380+ IFLA_BRIDGE_CFM_CC_CONFIG_ENABLE,
381+ IFLA_BRIDGE_CFM_CC_CONFIG_EXP_INTERVAL,
382+ IFLA_BRIDGE_CFM_CC_CONFIG_EXP_MAID,
383+ __IFLA_BRIDGE_CFM_CC_CONFIG_MAX,
384+};
385+
386+#define IFLA_BRIDGE_CFM_CC_CONFIG_MAX (__IFLA_BRIDGE_CFM_CC_CONFIG_MAX - 1)
387+
388+enum {
389+ IFLA_BRIDGE_CFM_CC_PEER_MEP_UNSPEC,
390+ IFLA_BRIDGE_CFM_CC_PEER_MEP_INSTANCE,
391+ IFLA_BRIDGE_CFM_CC_PEER_MEPID,
392+ __IFLA_BRIDGE_CFM_CC_PEER_MEP_MAX,
393+};
394+
395+#define IFLA_BRIDGE_CFM_CC_PEER_MEP_MAX (__IFLA_BRIDGE_CFM_CC_PEER_MEP_MAX - 1)
396+
397+enum {
398+ IFLA_BRIDGE_CFM_CC_RDI_UNSPEC,
399+ IFLA_BRIDGE_CFM_CC_RDI_INSTANCE,
400+ IFLA_BRIDGE_CFM_CC_RDI_RDI,
401+ __IFLA_BRIDGE_CFM_CC_RDI_MAX,
402+};
403+
404+#define IFLA_BRIDGE_CFM_CC_RDI_MAX (__IFLA_BRIDGE_CFM_CC_RDI_MAX - 1)
405+
406+enum {
407+ IFLA_BRIDGE_CFM_CC_CCM_TX_UNSPEC,
408+ IFLA_BRIDGE_CFM_CC_CCM_TX_INSTANCE,
409+ IFLA_BRIDGE_CFM_CC_CCM_TX_DMAC,
410+ IFLA_BRIDGE_CFM_CC_CCM_TX_SEQ_NO_UPDATE,
411+ IFLA_BRIDGE_CFM_CC_CCM_TX_PERIOD,
412+ IFLA_BRIDGE_CFM_CC_CCM_TX_IF_TLV,
413+ IFLA_BRIDGE_CFM_CC_CCM_TX_IF_TLV_VALUE,
414+ IFLA_BRIDGE_CFM_CC_CCM_TX_PORT_TLV,
415+ IFLA_BRIDGE_CFM_CC_CCM_TX_PORT_TLV_VALUE,
416+ __IFLA_BRIDGE_CFM_CC_CCM_TX_MAX,
417+};
418+
419+#define IFLA_BRIDGE_CFM_CC_CCM_TX_MAX (__IFLA_BRIDGE_CFM_CC_CCM_TX_MAX - 1)
420+
331421 struct bridge_stp_xstats {
332422 __u64 transition_blk;
333423 __u64 transition_fwd;
include/uapi/linux/rtnetlink.h+1−0
@@ -779,6 +779,7 @@ enum { · 778 unmodified lines
779779 #define RTEXT_FILTER_BRVLAN_COMPRESSED (1 << 2)
780780 #define RTEXT_FILTER_SKIP_STATS (1 << 3)
781781 #define RTEXT_FILTER_MRP (1 << 4)
782+#define RTEXT_FILTER_CFM_CONFIG (1 << 5)
782783
783784 /* End of information exported to user level */
784785