All of lore.kernel.org
 help / color / mirror / Atom feed
From: Henrik Bjoernlund <henrik.bjoernlund@microchip.com>
To: <davem@davemloft.net>, <kuba@kernel.org>, <roopa@nvidia.com>,
	<nikolay@nvidia.com>, <jiri@mellanox.com>, <idosch@mellanox.com>,
	<linux-kernel@vger.kernel.org>, <netdev@vger.kernel.org>,
	<bridge@lists.linux-foundation.org>,
	<UNGLinuxDriver@microchip.com>
Cc: Henrik Bjoernlund <henrik.bjoernlund@microchip.com>,
	Horatiu Vultur <horatiu.vultur@microchip.com>
Subject: [PATCH net-next v5 00/10] net: bridge: cfm: Add support for Connectivity Fault Management(CFM)
Date: Thu, 15 Oct 2020 11:54:08 +0000	[thread overview]
Message-ID: <20201015115418.2711454-1-henrik.bjoernlund@microchip.com> (raw)

Connectivity Fault Management (CFM) is defined in 802.1Q
section 12.14.

Connectivity Fault Management (CFM) comprises capabilities for
detecting, verifying, and isolating connectivity failures in Virtual
Bridged Networks. These capabilities can be used in networks
operated by multiple independent organizations, each with restricted
management access to each other’s equipment.

CFM functions are partitioned as follows:
    — Path discovery
    — Fault detection
    — Fault verification and isolation
    — Fault notification
    — Fault recovery

The primary CFM protocol shims are called Maintenance Points (MPs).
A MP can be either a MEP or a MHF.
The MEP:
    -It is the Maintenance association End Point
     described in 802.1Q section 19.2.
    -It is created on a specific level (1-7) and is assuring
     that no CFM frames are passing through this MEP on lower levels.
    -It initiates and terminates/validates CFM frames on its level.
    -It can only exist on a port that is related to a bridge.
The MHF:
    -It is the Maintenance Domain Intermediate Point
     (MIP) Half Function (MHF) described in 802.1Q section 19.3.
    -It is created on a specific level (1-7).
    -It is extracting/injecting certain CFM frame on this level.
    -It can only exist on a port that is related to a bridge.
    -Currently not supported.

There are defined the following CFM protocol functions:
    -Continuity Check
    -Loopback. Currently not supported.
    -Linktrace. Currently not supported.

This CFM component supports create/delete of MEP instances and
configuration of the different CFM protocols. Also status information
can be fetched and delivered through notification due to defect
status change.

The user interacts with CFM using the 'cfm' user space client
program, the client talks with the kernel using netlink.

Any notification emitted by CFM from the kernel can be monitored in
user space by starting 'cfm_server' program.

Currently this 'cfm' and 'cfm_server' programs are standalone placed
in a cfm repository https://github.com/microchip-ung/cfm but it is
considered to integrate this into 'iproute2'.

v1 -> v2
    Added the CFM switchdev interface and also added utilization by
    calling the interface from the kernel CFM implementation trying
    to offload CFM functionality to HW. This offload (CFM driver) is
    currently not implemented.
    
    Corrections based on RCF comments:
        -The single CFM kernel implementation Patch is broken up into
         three patches.
        -Changed the list of MEP instances from list_head to
         hlist_head.
        -Removed unnecessary RCU list traversing.
        -Solved RCU unlocking problem.
        -Removed unnecessary comments.
        -Added ASSERT_RTNL() where required.
        -Shaping up on error messages.
        -Correction NETLINK br_fill_ifinfo() to be able to handle
         'filter_mask' with multiple flags asserted.

v2 -> v3
    -The switchdev definition and utilization has been removed as
     there was no switchdev implementation.
    -Some compiling issues are fixed as Reported-by:
     kernel test robot <lkp@intel.com>.

v3 -> v4
    -Fixed potential crash during hlist walk where elements are
     removed.
    -Giving all commits unique titles.
    -NETLINK implementation split into three commits.
    -Commit "bridge: cfm: Bridge port remove" is merged with
     commit "bridge: cfm: Kernel space implementation of CFM. MEP
     create/delete."

v4 -> v5
    -Reordered members in struct net_bridge to bring member
     frame_type_list to the first cache line.
    -Helper functions nla_get_mac() and nla_get_maid() are removed.
    -The NLA_POLICY_NESTED() macro is used to initialize the
     br_cfm_policy array.
    -Fixed reverse xmas tree.

v5 -> v6
    -Fixed that the SKB buffer was not freed during error handling return.
    -Removed unused struct definition.
    -Changed bool to u8 bitfields for space save.
    -Utilizing the NETLINK policy validation feature.

Reviewed-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Signed-off-by: Henrik Bjoernlund <henrik.bjoernlund@microchip.com>

Henrik Bjoernlund (10):
  net: bridge: extend the process of special frames
  bridge: cfm: Add BRIDGE_CFM to Kconfig.
  bridge: uapi: cfm: Added EtherType used by the CFM protocol.
  bridge: cfm: Kernel space implementation of CFM. MEP create/delete.
  bridge: cfm: Kernel space implementation of CFM. CCM frame TX added.
  bridge: cfm: Kernel space implementation of CFM. CCM frame RX added.
  bridge: cfm: Netlink SET configuration Interface.
  bridge: cfm: Netlink GET configuration Interface.
  bridge: cfm: Netlink GET status Interface.
  bridge: cfm: Netlink Notifications.

 include/uapi/linux/cfm_bridge.h |  64 +++
 include/uapi/linux/if_bridge.h  | 125 +++++
 include/uapi/linux/if_ether.h   |   1 +
 include/uapi/linux/rtnetlink.h  |   2 +
 net/bridge/Kconfig              |  11 +
 net/bridge/Makefile             |   2 +
 net/bridge/br_cfm.c             | 867 ++++++++++++++++++++++++++++++++
 net/bridge/br_cfm_netlink.c     | 729 +++++++++++++++++++++++++++
 net/bridge/br_device.c          |   4 +
 net/bridge/br_if.c              |   1 +
 net/bridge/br_input.c           |  33 +-
 net/bridge/br_mrp.c             |  19 +-
 net/bridge/br_netlink.c         | 115 ++++-
 net/bridge/br_private.h         |  77 ++-
 net/bridge/br_private_cfm.h     | 147 ++++++
 15 files changed, 2174 insertions(+), 23 deletions(-)
 create mode 100644 include/uapi/linux/cfm_bridge.h
 create mode 100644 net/bridge/br_cfm.c
 create mode 100644 net/bridge/br_cfm_netlink.c
 create mode 100644 net/bridge/br_private_cfm.h

-- 
2.28.0


WARNING: multiple messages have this Message-ID (diff)
From: Henrik Bjoernlund <henrik.bjoernlund@microchip.com>
To: davem@davemloft.net, kuba@kernel.org, roopa@nvidia.com,
	nikolay@nvidia.com, jiri@mellanox.com, idosch@mellanox.com,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	bridge@lists.linux-foundation.org, UNGLinuxDriver@microchip.com
Cc: Henrik Bjoernlund <henrik.bjoernlund@microchip.com>,
	Horatiu Vultur <horatiu.vultur@microchip.com>
Subject: [Bridge] [PATCH net-next v5 00/10] net: bridge: cfm: Add support for Connectivity Fault Management(CFM)
Date: Thu, 15 Oct 2020 11:54:08 +0000	[thread overview]
Message-ID: <20201015115418.2711454-1-henrik.bjoernlund@microchip.com> (raw)

Connectivity Fault Management (CFM) is defined in 802.1Q
section 12.14.

Connectivity Fault Management (CFM) comprises capabilities for
detecting, verifying, and isolating connectivity failures in Virtual
Bridged Networks. These capabilities can be used in networks
operated by multiple independent organizations, each with restricted
management access to each other’s equipment.

CFM functions are partitioned as follows:
    — Path discovery
    — Fault detection
    — Fault verification and isolation
    — Fault notification
    — Fault recovery

The primary CFM protocol shims are called Maintenance Points (MPs).
A MP can be either a MEP or a MHF.
The MEP:
    -It is the Maintenance association End Point
     described in 802.1Q section 19.2.
    -It is created on a specific level (1-7) and is assuring
     that no CFM frames are passing through this MEP on lower levels.
    -It initiates and terminates/validates CFM frames on its level.
    -It can only exist on a port that is related to a bridge.
The MHF:
    -It is the Maintenance Domain Intermediate Point
     (MIP) Half Function (MHF) described in 802.1Q section 19.3.
    -It is created on a specific level (1-7).
    -It is extracting/injecting certain CFM frame on this level.
    -It can only exist on a port that is related to a bridge.
    -Currently not supported.

There are defined the following CFM protocol functions:
    -Continuity Check
    -Loopback. Currently not supported.
    -Linktrace. Currently not supported.

This CFM component supports create/delete of MEP instances and
configuration of the different CFM protocols. Also status information
can be fetched and delivered through notification due to defect
status change.

The user interacts with CFM using the 'cfm' user space client
program, the client talks with the kernel using netlink.

Any notification emitted by CFM from the kernel can be monitored in
user space by starting 'cfm_server' program.

Currently this 'cfm' and 'cfm_server' programs are standalone placed
in a cfm repository https://github.com/microchip-ung/cfm but it is
considered to integrate this into 'iproute2'.

v1 -> v2
    Added the CFM switchdev interface and also added utilization by
    calling the interface from the kernel CFM implementation trying
    to offload CFM functionality to HW. This offload (CFM driver) is
    currently not implemented.
    
    Corrections based on RCF comments:
        -The single CFM kernel implementation Patch is broken up into
         three patches.
        -Changed the list of MEP instances from list_head to
         hlist_head.
        -Removed unnecessary RCU list traversing.
        -Solved RCU unlocking problem.
        -Removed unnecessary comments.
        -Added ASSERT_RTNL() where required.
        -Shaping up on error messages.
        -Correction NETLINK br_fill_ifinfo() to be able to handle
         'filter_mask' with multiple flags asserted.

v2 -> v3
    -The switchdev definition and utilization has been removed as
     there was no switchdev implementation.
    -Some compiling issues are fixed as Reported-by:
     kernel test robot <lkp@intel.com>.

v3 -> v4
    -Fixed potential crash during hlist walk where elements are
     removed.
    -Giving all commits unique titles.
    -NETLINK implementation split into three commits.
    -Commit "bridge: cfm: Bridge port remove" is merged with
     commit "bridge: cfm: Kernel space implementation of CFM. MEP
     create/delete."

v4 -> v5
    -Reordered members in struct net_bridge to bring member
     frame_type_list to the first cache line.
    -Helper functions nla_get_mac() and nla_get_maid() are removed.
    -The NLA_POLICY_NESTED() macro is used to initialize the
     br_cfm_policy array.
    -Fixed reverse xmas tree.

v5 -> v6
    -Fixed that the SKB buffer was not freed during error handling return.
    -Removed unused struct definition.
    -Changed bool to u8 bitfields for space save.
    -Utilizing the NETLINK policy validation feature.

Reviewed-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Signed-off-by: Henrik Bjoernlund <henrik.bjoernlund@microchip.com>

Henrik Bjoernlund (10):
  net: bridge: extend the process of special frames
  bridge: cfm: Add BRIDGE_CFM to Kconfig.
  bridge: uapi: cfm: Added EtherType used by the CFM protocol.
  bridge: cfm: Kernel space implementation of CFM. MEP create/delete.
  bridge: cfm: Kernel space implementation of CFM. CCM frame TX added.
  bridge: cfm: Kernel space implementation of CFM. CCM frame RX added.
  bridge: cfm: Netlink SET configuration Interface.
  bridge: cfm: Netlink GET configuration Interface.
  bridge: cfm: Netlink GET status Interface.
  bridge: cfm: Netlink Notifications.

 include/uapi/linux/cfm_bridge.h |  64 +++
 include/uapi/linux/if_bridge.h  | 125 +++++
 include/uapi/linux/if_ether.h   |   1 +
 include/uapi/linux/rtnetlink.h  |   2 +
 net/bridge/Kconfig              |  11 +
 net/bridge/Makefile             |   2 +
 net/bridge/br_cfm.c             | 867 ++++++++++++++++++++++++++++++++
 net/bridge/br_cfm_netlink.c     | 729 +++++++++++++++++++++++++++
 net/bridge/br_device.c          |   4 +
 net/bridge/br_if.c              |   1 +
 net/bridge/br_input.c           |  33 +-
 net/bridge/br_mrp.c             |  19 +-
 net/bridge/br_netlink.c         | 115 ++++-
 net/bridge/br_private.h         |  77 ++-
 net/bridge/br_private_cfm.h     | 147 ++++++
 15 files changed, 2174 insertions(+), 23 deletions(-)
 create mode 100644 include/uapi/linux/cfm_bridge.h
 create mode 100644 net/bridge/br_cfm.c
 create mode 100644 net/bridge/br_cfm_netlink.c
 create mode 100644 net/bridge/br_private_cfm.h

-- 
2.28.0


             reply	other threads:[~2020-10-15 11:57 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-15 11:54 Henrik Bjoernlund [this message]
2020-10-15 11:54 ` [Bridge] [PATCH net-next v5 00/10] net: bridge: cfm: Add support for Connectivity Fault Management(CFM) Henrik Bjoernlund
2020-10-15 11:54 ` [PATCH net-next v6 01/10] net: bridge: extend the process of special frames Henrik Bjoernlund
2020-10-15 11:54   ` [Bridge] " Henrik Bjoernlund
2020-10-15 11:54 ` [PATCH net-next v6 02/10] bridge: cfm: Add BRIDGE_CFM to Kconfig Henrik Bjoernlund
2020-10-15 11:54   ` [Bridge] " Henrik Bjoernlund
2020-10-15 11:54 ` [PATCH net-next v6 03/10] bridge: uapi: cfm: Added EtherType used by the CFM protocol Henrik Bjoernlund
2020-10-15 11:54   ` [Bridge] " Henrik Bjoernlund
2020-10-15 11:54 ` [PATCH net-next v6 04/10] bridge: cfm: Kernel space implementation of CFM. MEP create/delete Henrik Bjoernlund
2020-10-15 11:54   ` [Bridge] " Henrik Bjoernlund
2020-10-15 11:54 ` [PATCH net-next v6 05/10] bridge: cfm: Kernel space implementation of CFM. CCM frame TX added Henrik Bjoernlund
2020-10-15 11:54   ` [Bridge] " Henrik Bjoernlund
2020-10-15 11:54 ` [PATCH net-next v6 06/10] bridge: cfm: Kernel space implementation of CFM. CCM frame RX added Henrik Bjoernlund
2020-10-15 11:54   ` [Bridge] " Henrik Bjoernlund
2020-10-15 11:54 ` [PATCH net-next v6 07/10] bridge: cfm: Netlink SET configuration Interface Henrik Bjoernlund
2020-10-15 11:54   ` [Bridge] " Henrik Bjoernlund
2020-10-15 17:34   ` Jakub Kicinski
2020-10-15 17:34     ` [Bridge] " Jakub Kicinski
2020-10-19  8:51     ` Henrik Bjoernlund
2020-10-19  8:51       ` [Bridge] " Henrik Bjoernlund
2020-10-19 16:21       ` Jakub Kicinski
2020-10-19 16:21         ` [Bridge] " Jakub Kicinski
2020-10-21  9:17         ` Henrik Bjoernlund
2020-10-21  9:17           ` [Bridge] " Henrik Bjoernlund
2020-10-15 11:54 ` [PATCH net-next v6 08/10] bridge: cfm: Netlink GET " Henrik Bjoernlund
2020-10-15 11:54   ` [Bridge] " Henrik Bjoernlund
2020-10-15 11:54 ` [PATCH net-next v6 09/10] bridge: cfm: Netlink GET status Interface Henrik Bjoernlund
2020-10-15 11:54   ` [Bridge] " Henrik Bjoernlund
2020-10-15 11:54 ` [PATCH net-next v6 10/10] bridge: cfm: Netlink Notifications Henrik Bjoernlund
2020-10-15 11:54   ` [Bridge] " Henrik Bjoernlund
  -- strict thread matches above, loose matches on Subject: below --
2020-10-12 14:04 [PATCH net-next v5 00/10] net: bridge: cfm: Add support for Connectivity Fault Management(CFM) Henrik Bjoernlund
2020-10-14 22:58 ` Jakub Kicinski
2020-10-15 11:32   ` Henrik Bjoernlund

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201015115418.2711454-1-henrik.bjoernlund@microchip.com \
    --to=henrik.bjoernlund@microchip.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=bridge@lists.linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=horatiu.vultur@microchip.com \
    --cc=idosch@mellanox.com \
    --cc=jiri@mellanox.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@nvidia.com \
    --cc=roopa@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.