Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp351382pxu; Tue, 6 Oct 2020 07:57:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxuPp2ApuWwvYWkUjGOGSrs3mk4EVlPZhMXOKmGO+E8dT/HfZ67inlU1RewtoIGgM02XoOJ X-Received: by 2002:a17:906:b004:: with SMTP id v4mr5928764ejy.156.1601996236692; Tue, 06 Oct 2020 07:57:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601996236; cv=none; d=google.com; s=arc-20160816; b=mEYKpPOEpuEncuePs4zdSwmpuOx/L8ShMbJdArYlgNv6hSt8RK746gyB11bhLtNCj+ xyoMeIPYfwDKJbETuAr8/o+jbBeR6ayYF6hz5sqBbgHCiFuztnXFrKVzk8XNa07VwRwR 7QRILPOXoxgSvkWzcuV014e2ZyYeDpWgRGkYETKueQHx3G10A5wezqi0KekNMhQ7kFkv p6/1791dePI6q2w6OC8bAlscKbD/KidTA1BDpq82uyyrdRC1/ZR4X/WqcyXGNRoZlcKI ZyOuuU+mLtAUtZtTfuY22spYpWMYWKexCaqgtP3RL4EUUmBxAaWam5ORaF3/4X/CPXi9 ta2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:ironport-sdr:dkim-signature; bh=Dc7t0B3CsdDU22gfOvjLYUKz5XMrUQ2CIoC++2UPvY0=; b=tPUEbwZJ4AI0B9PvfmrimBL+xgg2/ZYIv/k5nH7/IW2ez/KOSb08OSc/T8b72Ul6pf aR3iBqv6rhUnZMhD32OwUrVhgMHIYonRK78IhjB5WJD3N/IS6TNI809OB7RBpcWEtFr2 hUIbth3covP2ngobfdVm7QGJXCkEScNIOIoX/ohg8OyDfmnlZnD0zaA2nWv5+MVcadOz WpMM/JKNZaMJTmpCCF9Ohm7qmu492XHnqtegDqI4H/SFWYOJSaZCKbRUrbNIasvK1YJL /jzZKvkTPp4C5gywRu0yPwMOV+R2V1/exw+2+xC8Ww9JcbuCiRzbMeu5tETYPK+FAmSV 7cUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=XMDQebbD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p24si2479813edm.360.2020.10.06.07.56.53; Tue, 06 Oct 2020 07:57:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=XMDQebbD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726477AbgJFOzl (ORCPT + 99 others); Tue, 6 Oct 2020 10:55:41 -0400 Received: from esa4.microchip.iphmx.com ([68.232.154.123]:45069 "EHLO esa4.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725943AbgJFOzl (ORCPT ); Tue, 6 Oct 2020 10:55:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1601996141; x=1633532141; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=ulyTQ6bu3wsgxeeSKBEqHp81k8dRGB+5UE8Ne+fj9Pg=; b=XMDQebbDqxsVCA/KQivzhlNHdQXS4zgc6YzwcNcL6ItckVgI/Z2v4EAo nn1gttYxpKcX0hhGZ0QtZvjUhUU7kfIFAYFForEHFsmXViNlN4SnYRvF/ Cm8womp0NbQBl9MQ3e67WIg/vSqCePJs+OinbPpnfMdaLBt1PdBkqIVJx FB94cgUWNcmCw4MC591PdVcmaygdvahVuGTq6ahzC2smysdjAPzq7EL4Y ZOXlLyWLeZ1At0PknS8UnjbUGkdD02POHXZ1zVwkk8zJswToDAvzISEBh D0D8dEJSqFbeZBvvI2qBuBMP1yDi1Gx//5MwRdUc5peN1I/d0iPBuSpnC A==; IronPort-SDR: h61vZz+/Qk6iemosl5HtjJys977/ibDsuV+uZiULw3AnFjl2F7kRN6qO1IDu11W1yZShSJ8ePs 0D0V+gBc198mmnahtS+5d+1nMNI/9EvckV0NXaYU8bRiPZhkyCSclfLP182W4O/tpcOsfcgo0J YepzL/7ODkv//1DfFVOo7mInWIhKguoEMKWL9A+c6cl9z8Ur8mW4CR9PFKV65BLeGFjVgFcxmt XM7i3vdj7/hDUDBTLDyJBj65hXxe03WtwpkElNv5ELOBk6/v+39fgCDii32LYz3TWCsAQ9locN vsk= X-IronPort-AV: E=Sophos;i="5.77,343,1596524400"; d="scan'208";a="89282770" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 06 Oct 2020 07:55:40 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Tue, 6 Oct 2020 07:55:29 -0700 Received: from soft-test08.microsemi.net (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.1979.3 via Frontend Transport; Tue, 6 Oct 2020 07:55:37 -0700 From: Henrik Bjoernlund To: , , , , , , , , , CC: Henrik Bjoernlund Subject: [net-next v3 0/9] net: bridge: cfm: Add support for Connectivity Fault Management(CFM) Date: Tue, 6 Oct 2020 14:53:29 +0000 Message-ID: <20201006145338.1956886-1-henrik.bjoernlund@microchip.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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'. 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 . Henrik Bjoernlund (9): 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. bridge: cfm: Kernel space implementation of CFM. bridge: cfm: Kernel space implementation of CFM. bridge: cfm: Netlink Interface. bridge: cfm: Netlink Notifications. bridge: cfm: Bridge port remove. include/uapi/linux/cfm_bridge.h | 70 +++ 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 | 882 ++++++++++++++++++++++++++++++++ net/bridge/br_cfm_netlink.c | 731 ++++++++++++++++++++++++++ net/bridge/br_device.c | 4 + net/bridge/br_if.c | 1 + net/bridge/br_input.c | 31 +- net/bridge/br_mrp.c | 19 +- net/bridge/br_netlink.c | 138 ++++- net/bridge/br_private.h | 76 ++- net/bridge/br_private_cfm.h | 147 ++++++ 15 files changed, 2205 insertions(+), 35 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