Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp344439pxu; Thu, 15 Oct 2020 05:34:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyILrVMytALoRShr+lzP5YNCZ0QL7rQSVpDTlQQ2vH82KNzf8xjF/7cIlvnxUxbOpWO5A3L X-Received: by 2002:a17:906:b784:: with SMTP id dt4mr4455549ejb.376.1602765294599; Thu, 15 Oct 2020 05:34:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602765294; cv=none; d=google.com; s=arc-20160816; b=1D1US7VRPcaz5TEzGDH+wAxMzT9QysN6duVkKYhmD4xdoEcYt74d2W8AaklDB8rYq6 sX2MVRo0TAddRGNHI86gPv696bH0fHQd5ndRYRvpQHAB0B312j60/v4hjtF8o5FAgs0H FsKw882kN4dZqOY4/hfMbkOyCt/78m8cmT5AvMNjxVd3bgTLiBZrw4YvMoNIRrcOYgtz gXfB7QJkdSid0clG08aGj7NlMNKU6aaPL23WPdXWn0gDQ93V+7LXgJl03hCkLQh4ZI/g 5QrSlHUFWMVXaDAB3EB6a3F/cW6lUzYyCdry7iN2nfeJi7mLwHNBot8MaBSFZQXeRny/ VOBw== 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=cNZxkVDfVezz2DlTmR+TVy1YPeWGaOc2TCEYy8yZh4k=; b=ceo8WX5UNEysZ9NlUA96bmC3ETp26fZW3arCYf9FjaI5gh8KPcaS623iU4ivY2/e4L UeVGKKWKT24guB1jKREwRBJ3OoQ14Ephi0JiXw8OSUW0edxIyu0QvkAaQ6o+5CMA+IFe SeJnzC44URkA2W9PZ0MI+GWgMKGhi2ZGx82ll4ozIJwTZWAzQRWfcll3kqQefp2cF281 jtyr0QqYUI2knafAa4mjhyTHuFHiDk8hwCqHXxvXeRahCRe6PswN+KomAHBFQ6KnjtsQ uCfhlelNhrikrYC5pWAJPJh67u3++fgWpr/MZXsg8sES41O2bUezebplusJk4qWa5uxc bJ7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=cQ0Dfohe; 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 o18si1925530ejx.472.2020.10.15.05.34.28; Thu, 15 Oct 2020 05:34:54 -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=cQ0Dfohe; 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 S1728431AbgJOMAP (ORCPT + 99 others); Thu, 15 Oct 2020 08:00:15 -0400 Received: from esa1.microchip.iphmx.com ([68.232.147.91]:43478 "EHLO esa1.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729918AbgJOL4K (ORCPT ); Thu, 15 Oct 2020 07:56:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1602762970; x=1634298970; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=nPqTgibgbIoCFDYZdgCNuNWAh9nm0hqB0zY9m4kalGI=; b=cQ0DfoheH2Pin7tPzeO6OX9q+DxcYdrUo9bYrAuxPZ7EDAincs1yfQ+D JfvTm312Q9f1N5uzqdEYfdECoHGO5taQdDaEowdByBEIR6swUt6n+Ve6S b13VnmDVZv2BxIPbqP5Nw48pc3p1Po8LcZMgGjavObWcezRkJyAbn5usy qdcKjwjM2XJU5UzyaGyvbHDDEhl0EPtHrVQ8GcGKWGGyycjqDI6i4TS+g AdfGLHtJ/kko0tw0siN0opEQ8CvzjgxSqniASb3dndrHB392PDqGB+/Y+ 73ZphJoWHnqzLovdZcXf9WzRk+SzkpeUP5lwyyfEzFFaGTpH9DBwg9c0H g==; IronPort-SDR: X8pw5eX/DL7huRFWUjVnc/MP6IABFxiK3bg52PaOcHh7DRSAR7v+FaU4Dvi0i4705P/v3UuRI1 fDaDCXrSyF50c91JzdOK2pC3tnD+JUI6D0eVRIFKrSYO3VMTYjvPHyCXEwgElCRRS466Qmnxnz xSgqu1xIeVZksCRgY9IQWFhQbPn24Nj9cWa6yS9aT/Dix788mWuHzRv8p12Zqo6HgZMFrxaBzS ay6zkwfcGYyHUr8mH04hi5Csp3yJgJWctyBICXR+cnFcjvdhR+5M8wpcV98vBVUtrTsgTFT1np /YU= X-IronPort-AV: E=Sophos;i="5.77,378,1596524400"; d="scan'208";a="99627353" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 15 Oct 2020 04:56:09 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Thu, 15 Oct 2020 04:56:09 -0700 Received: from soft-test08.microsemi.net (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.1979.3 via Frontend Transport; Thu, 15 Oct 2020 04:56:07 -0700 From: Henrik Bjoernlund To: , , , , , , , , , CC: Henrik Bjoernlund , Horatiu Vultur Subject: [PATCH net-next v6 02/10] bridge: cfm: Add BRIDGE_CFM to Kconfig. Date: Thu, 15 Oct 2020 11:54:10 +0000 Message-ID: <20201015115418.2711454-3-henrik.bjoernlund@microchip.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201015115418.2711454-1-henrik.bjoernlund@microchip.com> References: <20201015115418.2711454-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 Acked-by: Nikolay Aleksandrov --- 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 15c6445fa998..9b5d62744acc 100644 --- a/net/bridge/br_device.c +++ b/net/bridge/br_device.c @@ -457,6 +457,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 2fe8b88d090e..90ead48fa762 100644 --- a/net/bridge/br_private.h +++ b/net/bridge/br_private.h @@ -484,6 +484,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