Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp351523pxu; Tue, 6 Oct 2020 07:57:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCP/E3quEvbBK0GnPFuGSc0rXEElBg3WzTnjPl2we/x5bFJLaMUq6GCz270+RbQCDN0pPu X-Received: by 2002:a17:906:e103:: with SMTP id gj3mr5505033ejb.442.1601996249143; Tue, 06 Oct 2020 07:57:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601996249; cv=none; d=google.com; s=arc-20160816; b=q00H6WksGPjkKYcbeUKCp72bEANwBIGpUbogzUnkS9vfO+VXz23GGs4S4Em4UDac55 Mpwn9SFMrqbNNbXkB3dJo6aCauwNd6Mxn99NzxW9Aut+4W2V4ZCJr5D7/Lk88yO9C2Sv QZ+2roc2mTY5Lj8pX5ZfdB3J3hGhX10OyLnIWBC2tOQrWps8Ui1znEpTfGPQqI+LRxhc QV0d46rt2PkhPZlHS5wvCFUg1btzfhdO+DzLGhNHDze3xDpxXsIvfTq6MiVBawKOdAuy GuA/L1O3gSLIHUczwtrjZr4Tp9G+K+css2p7Eo+UKBMOtpbwr2KMbV0NPzGDOAr1Xp82 osIQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:dkim-signature; bh=ije8QKoF71KQsT1yLS1FyqWCUcDqmMlT+tpY760NHJM=; b=gAcMhOoHr6wa7I06+jUYYQztiQyphrF9f0VlK/ZaQKjzzZPUubuXd5Ssbqbrfk8KxA pESRzhu1OsQfMGNjOZH2PHapnW/gokoXbRmGZuiKqJV5E1rztcsKz4T6IxUogx5hwGfQ Jsi0LVwHEe8I3Mc6s+OBHw4F8PULcHpcJLkfINylH2v7RrRR8FgSIogJpUoR3NF2jjiT rgMx1mbqF5O7GDOnT9J1HaJv1ve5Xy7X7d6N5xseQHEC3GUNEPwmbwxMK1rmTleI+k9K +Tt3T69XykNBDSLTpbBQTLAbKXIC2z9F1jgIXpCSMIrXap+Gz4J7VGdQ+3lybXO3b/gs Iq1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=xTEG65pg; 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 t17si2593618ejs.679.2020.10.06.07.57.06; Tue, 06 Oct 2020 07:57:29 -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=xTEG65pg; 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 S1726624AbgJFOzt (ORCPT + 99 others); Tue, 6 Oct 2020 10:55:49 -0400 Received: from esa3.microchip.iphmx.com ([68.232.153.233]:32918 "EHLO esa3.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726525AbgJFOzq (ORCPT ); Tue, 6 Oct 2020 10:55:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1601996146; x=1633532146; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=FHI9pF1PqUVmJKyaV+8zX2DLW8NZ18t1BrTCAp6IIdc=; b=xTEG65pg1CbaEw64KtnUoRYQaju5T3qF0fGPSLSx+N5K3qGmwgG8lhil yT2x2Hol952VXR6S3xzJaOKPOHvnit8OTkehGEATq4KUMpvxxjv7nSBEi 4umCVx/i44BU2pZBRfaSsKmjQ847pVNb+RE/RHREry9F2CDto05/STDgL KXsniuhimDgyRyjluld/Y1TWu5QNAXo7wyPSV4baz1uB0E3v0o2sFKdsO rxWQsy20AAI29g+Ngc7/s9t25b+u4nokbKVHIEBqW4FpXw6ebwml6lc4u WmofQZB91MjJN60OKBcLqoahYVsZg3eSG45hBH9KxYHb5nqmGxgQyRILX w==; IronPort-SDR: bYTjLNM32XCgMafyI5xnJwq3FCVkix9WK8CBrGQhm7BGZt8a+5+6yMmkqpTzpw6k4WgRgcApj1 6laqznpqhW8wVRDftB+ew5BBMGtsJFIGgDzh7J1KkdZoX/CsTGgpBfe8mR3WEp2Q7sTnS4cxqp 547FniPIm/TXFw0CCvv1xhTrTEBAgbJvQGXo4oymn/N6RA/tkTWDZd0cpT5lfE/hKf4jLh5Vwa pNiP51GmeQSN4Rn3JQIG6CiNQAkIehpwoa+XpGPMbKEO82nHVkMcnOU1nncSTlZN/9VE9wQLOF Exc= X-IronPort-AV: E=Sophos;i="5.77,343,1596524400"; d="scan'208";a="94386884" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 06 Oct 2020 07:55:45 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex04.mchp-main.com (10.10.85.152) 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:45 -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:43 -0700 From: Henrik Bjoernlund To: , , , , , , , , , CC: Henrik Bjoernlund , Horatiu Vultur Subject: [net-next v3 2/9] bridge: cfm: Add BRIDGE_CFM to Kconfig. Date: Tue, 6 Oct 2020 14:53:31 +0000 Message-ID: <20201006145338.1956886-3-henrik.bjoernlund@microchip.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201006145338.1956886-1-henrik.bjoernlund@microchip.com> References: <20201006145338.1956886-1-henrik.bjoernlund@microchip.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This makes it possible to include or exclude the CFM protocol according to 802.1Q section 12.14. Signed-off-by: Henrik Bjoernlund Reviewed-by: Horatiu Vultur --- net/bridge/Kconfig | 11 +++++++++++ net/bridge/br_device.c | 3 +++ net/bridge/br_private.h | 3 +++ 3 files changed, 17 insertions(+) diff --git a/net/bridge/Kconfig b/net/bridge/Kconfig index 80879196560c..3c8ded7d3e84 100644 --- a/net/bridge/Kconfig +++ b/net/bridge/Kconfig @@ -73,3 +73,14 @@ config BRIDGE_MRP Say N to exclude this support and reduce the binary size. If unsure, say N. + +config BRIDGE_CFM + bool "CFM protocol" + depends on BRIDGE + help + If you say Y here, then the Ethernet bridge will be able to run CFM + protocol according to 802.1Q section 12.14 + + Say N to exclude this support and reduce the binary size. + + If unsure, say N. diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c index 206c4ba51cd2..2a3b316f32eb 100644 --- a/net/bridge/br_device.c +++ b/net/bridge/br_device.c @@ -476,6 +476,9 @@ void br_dev_setup(struct net_device *dev) INIT_HLIST_HEAD(&br->frame_type_list); #if IS_ENABLED(CONFIG_BRIDGE_MRP) INIT_LIST_HEAD(&br->mrp_list); +#endif +#if IS_ENABLED(CONFIG_BRIDGE_CFM) + INIT_HLIST_HEAD(&br->mep_list); #endif spin_lock_init(&br->hash_lock); diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h index 3e62ce2ef8a5..95c82fce9959 100644 --- a/net/bridge/br_private.h +++ b/net/bridge/br_private.h @@ -485,6 +485,9 @@ struct net_bridge { #if IS_ENABLED(CONFIG_BRIDGE_MRP) struct list_head mrp_list; #endif +#if IS_ENABLED(CONFIG_BRIDGE_CFM) + struct hlist_head mep_list; +#endif }; struct br_input_skb_cb { -- 2.28.0