Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp171300pxb; Mon, 13 Sep 2021 16:11:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzrfIGeMVUHOJw7eZo04yVooRxnUFhIuc+rDW2fxVb8iKH7D6Lqr0MV/LQkZ0Ru3PUX73Ho X-Received: by 2002:a92:cbce:: with SMTP id s14mr9744242ilq.20.1631574719507; Mon, 13 Sep 2021 16:11:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631574719; cv=none; d=google.com; s=arc-20160816; b=FemD4kBOYDWa17NiNT/DOy2jZLii1ZD/sg0nXI2/IZEB6RZCYhnpW8KVh/J6fIfbrx g6+RbGkHJDr/GIGwPL5+AOipYBoYqOm/a/gkOB8GiJsMvYSyHaVFhQxZurazU9JtMK2Y lUxK2UYXFm/tHgK2GESrpm4dl3tp2agtTeJYaXUqzL/KXKRM7tw1vRdqbZeUSiKrCa1+ d1HDoZpb5ixUHmcGbfu6R5tO0ZUyt9kU9k1omxgFygqArcavtJzTiRgRgGyIF+zl9+VF vdf90OEK7p3+f6HrnbiNS830eRcHbDYpnTu1xANNDYM3nLXJx66uFnK7BmMA9FAbpAXa gXxw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=E6AjXCN0bCfl9GTQYpdusQNoTsp6VkjsZ4a5YoGQH2g=; b=pZR8SjOUKK3YQEqz2g53zUt4BEEfrUW3bkXMnsFut2u0BUz8ZFNRQPt9/43v/Lj+w/ sg1byBMduHOi8pvd3/HOx3KIlNg5b0wXYOAn5FeFqm9JTwFlNZhfIDlygq7xKv2QVIeo g2Q5vcBGXl2i1dZk7AMUBEP6HqfUqCSbtEdsR7kFzo5e7RNw6zdNnWBR8RapWxxic8QD aJRu1wGehSnrUaMD2YH/HAydFEGjOztQ6J4BD5RvQ4FpTYlXsyhLJvtSp0TCpzrxiFOe NySfEQ0PncARvwDzPv78A26zyuWrF8Do070izSNWV0h4PDM5g8WHUFLdG8tumMNVHELv NyIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=anVSt+7P; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r2si7853593ila.178.2021.09.13.16.11.47; Mon, 13 Sep 2021 16:11:59 -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=pass header.i=@linuxfoundation.org header.s=korg header.b=anVSt+7P; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347098AbhIMOkS (ORCPT + 99 others); Mon, 13 Sep 2021 10:40:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:51894 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347507AbhIMOel (ORCPT ); Mon, 13 Sep 2021 10:34:41 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DA7CF61BCF; Mon, 13 Sep 2021 13:53:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631541182; bh=6nmA9n4kK62ghSGdCzVMvQVavRXk0YcfciuHa7ei03A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=anVSt+7PVX/eX10jr9fjmTvzhN2YZzMGHFPrX+g+ssZC+3BHhfR4r8j44PuI/AlcE IKJR6en6vU3ClAbutD5Id0HPKb4oXAhkh8CWClIqS2PYKZf9wnMB8RpzeE61purH7f 2iDg1kxRmnQFNrXv1+x/epcorfDKTO/XLGv3ml8U= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vladimir Oltean , "David S. Miller" , Sasha Levin Subject: [PATCH 5.14 169/334] net: dsa: build tag_8021q.c as part of DSA core Date: Mon, 13 Sep 2021 15:13:43 +0200 Message-Id: <20210913131119.054037398@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913131113.390368911@linuxfoundation.org> References: <20210913131113.390368911@linuxfoundation.org> User-Agent: quilt/0.66 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 From: Vladimir Oltean [ Upstream commit 8b6e638b4be2ad77f61fb93b4e1776c6ccc2edab ] Upcoming patches will add tag_8021q related logic to switch.c and port.c, in order to allow it to make use of cross-chip notifiers. In addition, a struct dsa_8021q_context *ctx pointer will be added to struct dsa_switch. It seems fairly low-reward to #ifdef the *ctx from struct dsa_switch and to provide shim implementations of the entire tag_8021q.c calling surface (not even clear what to do about the tag_8021q cross-chip notifiers to avoid compiling them). The runtime overhead for switches which don't use tag_8021q is fairly small because all helpers will check for ds->tag_8021q_ctx being a NULL pointer and stop there. So let's make it part of dsa_core.o. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- net/dsa/Kconfig | 12 ------------ net/dsa/Makefile | 3 +-- net/dsa/tag_8021q.c | 2 -- 3 files changed, 1 insertion(+), 16 deletions(-) diff --git a/net/dsa/Kconfig b/net/dsa/Kconfig index 00bb89b2d86f..bca1b5d66df2 100644 --- a/net/dsa/Kconfig +++ b/net/dsa/Kconfig @@ -18,16 +18,6 @@ if NET_DSA # Drivers must select the appropriate tagging format(s) -config NET_DSA_TAG_8021Q - tristate - select VLAN_8021Q - help - Unlike the other tagging protocols, the 802.1Q config option simply - provides helpers for other tagging implementations that might rely on - VLAN in one way or another. It is not a complete solution. - - Drivers which use these helpers should select this as dependency. - config NET_DSA_TAG_AR9331 tristate "Tag driver for Atheros AR9331 SoC with built-in switch" help @@ -126,7 +116,6 @@ config NET_DSA_TAG_OCELOT_8021Q tristate "Tag driver for Ocelot family of switches, using VLAN" depends on MSCC_OCELOT_SWITCH_LIB || \ (MSCC_OCELOT_SWITCH_LIB=n && COMPILE_TEST) - select NET_DSA_TAG_8021Q help Say Y or M if you want to enable support for tagging frames with a custom VLAN-based header. Frames that require timestamping, such as @@ -149,7 +138,6 @@ config NET_DSA_TAG_LAN9303 config NET_DSA_TAG_SJA1105 tristate "Tag driver for NXP SJA1105 switches" - select NET_DSA_TAG_8021Q select PACKING help Say Y or M if you want to enable support for tagging frames with the diff --git a/net/dsa/Makefile b/net/dsa/Makefile index 44bc79952b8b..67ea009f242c 100644 --- a/net/dsa/Makefile +++ b/net/dsa/Makefile @@ -1,10 +1,9 @@ # SPDX-License-Identifier: GPL-2.0 # the core obj-$(CONFIG_NET_DSA) += dsa_core.o -dsa_core-y += dsa.o dsa2.o master.o port.o slave.o switch.o +dsa_core-y += dsa.o dsa2.o master.o port.o slave.o switch.o tag_8021q.o # tagging formats -obj-$(CONFIG_NET_DSA_TAG_8021Q) += tag_8021q.o obj-$(CONFIG_NET_DSA_TAG_AR9331) += tag_ar9331.o obj-$(CONFIG_NET_DSA_TAG_BRCM_COMMON) += tag_brcm.o obj-$(CONFIG_NET_DSA_TAG_DSA_COMMON) += tag_dsa.o diff --git a/net/dsa/tag_8021q.c b/net/dsa/tag_8021q.c index 4aa29f90ecea..0d1db3e37668 100644 --- a/net/dsa/tag_8021q.c +++ b/net/dsa/tag_8021q.c @@ -493,5 +493,3 @@ void dsa_8021q_rcv(struct sk_buff *skb, int *source_port, int *switch_id, skb->priority = (tci & VLAN_PRIO_MASK) >> VLAN_PRIO_SHIFT; } EXPORT_SYMBOL_GPL(dsa_8021q_rcv); - -MODULE_LICENSE("GPL v2"); -- 2.30.2