Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp333059pxk; Thu, 1 Oct 2020 03:41:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCDbStspV2aSlciMAUFksnTo5rUP5ahC8NI18ckeBAQP/Q2D5RIO26PudGxUexLVVz2wMC X-Received: by 2002:a17:906:4b18:: with SMTP id y24mr7160396eju.471.1601548872916; Thu, 01 Oct 2020 03:41:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601548872; cv=none; d=google.com; s=arc-20160816; b=JPC6iy2EhzYFbSIbIWar8m9GVfaWmhAFxrEqcUjTCH/M5igWPiZrx4jMhUIOn6fixU E0MPw+OIHyJcD64kYapSDKIfF7LTFxmSiWP9NMAShaNZ39J9FhTFtSKzRCkdkMW1IyD0 PJMJj79lH/nGgSQHd7ef76NDlkU5u3BrfbF8u9butjgn1YqR2DVGBVwQbyZGny5Pb3i9 yTtTemZhELRPmUIBBf5cGsEzkgyGFf7Tq73FIEdGlhV/ySlDukAeO5MHO+7FSuGXRIIY hwmmzefvhvVwEHiYN2RV+uktuS8jXG2DlXF6Y2SY+32RONKMdkO901HrwiSgs41b2B8W zoaw== 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=3rzWhqZ0V9e9LU8AFhOelmxusDtN8HJ8Z6By3boSGCk=; b=YUfsdwFSa39xGgGV0wSVAleJXlfTC3Fcj1iq9MFCfqakqFmA6+DWFG83NtGgLajmsB dzTZM7yfAYKhAPY8JKq+xLj4mUyT8aQl/ghR0l+8F7zrN/LIQbKKIxp7K4WqcmYCqcMS nn6MvNf4i2GLNCKTUL7nJVA/ieX1JWttz0OI60nqQuOmuubNH0NnsQcQ+bs0MIUJN1h0 nR/AYnKYuhCydT3OKioxULcdRglFMiHtwK5vpBUQGuXsuIPHUfB0JKu76LKfBnZ2YYX2 ASPIzSFBThnAS3Sx3GLkrz5EwqOtsINkuIbsUs02FrRUvX8pacuLPV1+IopxQkHmyDEn iOvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=R3fCD11V; 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 bm17si3137608ejb.356.2020.10.01.03.40.50; Thu, 01 Oct 2020 03:41:12 -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=R3fCD11V; 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 S1732012AbgJAKjs (ORCPT + 99 others); Thu, 1 Oct 2020 06:39:48 -0400 Received: from esa2.microchip.iphmx.com ([68.232.149.84]:57700 "EHLO esa2.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731131AbgJAKjs (ORCPT ); Thu, 1 Oct 2020 06:39:48 -0400 X-Greylist: delayed 426 seconds by postgrey-1.27 at vger.kernel.org; Thu, 01 Oct 2020 06:39:47 EDT DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1601548787; x=1633084787; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Hy/X4MWlgIswHAuMy/xndHrV6UV0/kJxBVphfflqOAM=; b=R3fCD11VV7+ZVBHsAaGw0aSAjXQaLEOmNHLbcM5TPb6LL8k6RgydtACy +ltoPhNQXEMWbCjiNPH//WqhqeCY7y0QReL1YjxWNNRFEvOglfrPm4qcg BHhRQm/B+3JN7dQhn9egRetFCOlexTi1fFqm7MFZh0HSkJa1SQUMtjY6F VK+6AQ3q10oPHihMcOM4gJO2bWYfsv+1leT6y67dtiSpuGcPzxLM26KLP 0+QRc//fjHreOn8fZsUNkw38QgiZOUyJKHlp9dKYjiWAZE/L4vIvz/4el 4d0tmu0RWMFn/ntEKlH3ZaTG0k7kAfXc4En6LAbcvsLzjWyZ2DVog8ltO g==; IronPort-SDR: jL1SAslHADupuHTzddd9uQaB8HDaeNfYbyRVjeD8kJR/6t9lteO0hKwFT/JyksYkpsgMndv53u qSPFwg5wb2ettm8cF6bQm8EEpmc2Qz/5s0qNhDzVHV3Ix/8a3fjg7xNMrDuBCFgKCvSZATGZrE jAzONqF7+RNL1HfiVazSBmrfXlQHeqIyBb/UO5TcAr4EwzNyswi65w6eLY5cMyNCKeUhhu9Rth hSO2PL1uJBoGe2A5S3MvpH+6ExUid7Ym6wV3KNwwYQLn1yHjtYj370Mr66kS6CTCDjQ6Unc4NK e9Q= X-IronPort-AV: E=Sophos;i="5.77,323,1596524400"; d="scan'208";a="91069515" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 01 Oct 2020 03:32:40 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Thu, 1 Oct 2020 03:32:15 -0700 Received: from soft-test08.microsemi.net (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.1979.3 via Frontend Transport; Thu, 1 Oct 2020 03:32:13 -0700 From: Henrik Bjoernlund To: , , , , , , , , , CC: Henrik Bjoernlund , Horatiu Vultur Subject: [net-next v2 02/11] bridge: cfm: Add BRIDGE_CFM to Kconfig. Date: Thu, 1 Oct 2020 10:30:10 +0000 Message-ID: <20201001103019.1342470-3-henrik.bjoernlund@microchip.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201001103019.1342470-1-henrik.bjoernlund@microchip.com> References: <20201001103019.1342470-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. Reviewed-by: Horatiu Vultur Signed-off-by: Henrik Bjoernlund --- 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 747f6f08f439..c7b0e91547f6 100644 --- a/net/bridge/br_private.h +++ b/net/bridge/br_private.h @@ -492,6 +492,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