Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp350692pxb; Wed, 22 Sep 2021 03:45:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/uGVcjdoK0po/D8CLbd51sqq7ic89OhMcAavuORX4jullQDEpu0FybWwzWAMdr91y/gCk X-Received: by 2002:aa7:d459:: with SMTP id q25mr40391034edr.62.1632307537244; Wed, 22 Sep 2021 03:45:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632307537; cv=none; d=google.com; s=arc-20160816; b=kftajprpbg7BX7lTj2Vc5aH9imD05Fj/J00nLrrRSZvwn1s3XTEsWooQ8TFvL61NHG 5xFxPSOaQ7kQmTwVwFIttRHo6gUQVZojkl5BwqPLhT4ZBp+fvpI8hMqpQSP1vnsDGb+w Bz04qtUpjvTncGxkJ9p1PBys4qV2mMom8DqkJs6YuIf21Xu3f1pIMgT4aVMbiqxqlnuJ jNzrk0A5xhtKrp3yYH7fiXiFNw0HKT34f+34w9YtpybuFhKFScTVuLW1c/rgywI3tbKI mQbJHsNSb/Mdx5HH5ynB02rNSEZV4vqMRcc4JcWyXs0PdzURtrSyy7JQwpZNegW8tgpY 3VxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=IwxFeo7Rvaoz6RhIcT8Xk0JpBEuTPfAJb+HJ3PAxU0E=; b=Jn8bJgbivebRU8gRRLb6Zvj0KT95zfomUFjS8GU+So1NZIiDsKh3oJHLFa17OT9z45 Lh7LMD4RrirYO5CAS1xRPAlUQ3h6DwzIp1SBq1HqE0ts2xK6N9ad+SauaNrN0K7FfJVF T9bFgVmdsATM2mbkeLrDjsPQGgTMIwVxkTf+jinHd4yvUaWKre/Yt7WFioRDqKZlDhPO +Bv+rUe/s1lSIucniYXku8h26Cix+4E3oNOfZ4gjACCbmcQEfIrYl2sYQYwvJzytjHFe 5yv//BRrasPAaTqwrdEmwfdh2v8hS3q61Yba2wP5BNbTMrjP12y3DBfFYV64UAiHdalW Z2pA== ARC-Authentication-Results: i=1; mx.google.com; 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=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id di7si2063185ejc.345.2021.09.22.03.45.13; Wed, 22 Sep 2021 03:45:37 -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; 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=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235169AbhIVKnp (ORCPT + 99 others); Wed, 22 Sep 2021 06:43:45 -0400 Received: from inva021.nxp.com ([92.121.34.21]:54478 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235146AbhIVKno (ORCPT ); Wed, 22 Sep 2021 06:43:44 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 4516E202619; Wed, 22 Sep 2021 12:42:13 +0200 (CEST) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id CCE8F2010CC; Wed, 22 Sep 2021 12:42:12 +0200 (CEST) Received: from localhost.localdomain (mega.ap.freescale.net [10.192.208.232]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id 50075183AD27; Wed, 22 Sep 2021 18:42:10 +0800 (+08) From: Xiaoliang Yang To: davem@davemloft.net, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: allan.nielsen@microchip.com, joergen.andreasen@microchip.com, UNGLinuxDriver@microchip.com, vinicius.gomes@intel.com, michael.chan@broadcom.com, vishal@chelsio.com, saeedm@mellanox.com, jiri@mellanox.com, idosch@mellanox.com, alexandre.belloni@bootlin.com, kuba@kernel.org, xiaoliang.yang_1@nxp.com, po.liu@nxp.com, vladimir.oltean@nxp.com, leoyang.li@nxp.com, f.fainelli@gmail.com, andrew@lunn.ch, vivien.didelot@gmail.com, claudiu.manoil@nxp.com Subject: [PATCH v4 net-next 1/8] net: mscc: ocelot: export struct ocelot_mact_entry Date: Wed, 22 Sep 2021 18:51:55 +0800 Message-Id: <20210922105202.12134-2-xiaoliang.yang_1@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210922105202.12134-1-xiaoliang.yang_1@nxp.com> References: <20210922105202.12134-1-xiaoliang.yang_1@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vladimir Oltean Felix DSA needs to use this struct to export MAC table write and lookup operations as well, for its stream identification functions, so export them in preparation of that. Signed-off-by: Vladimir Oltean Signed-off-by: Xiaoliang Yang --- drivers/net/ethernet/mscc/ocelot.c | 6 ------ drivers/net/ethernet/mscc/ocelot.h | 13 ------------- include/soc/mscc/ocelot.h | 19 +++++++++++++++++++ 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/drivers/net/ethernet/mscc/ocelot.c b/drivers/net/ethernet/mscc/ocelot.c index c581b955efb3..39a5cee81677 100644 --- a/drivers/net/ethernet/mscc/ocelot.c +++ b/drivers/net/ethernet/mscc/ocelot.c @@ -14,12 +14,6 @@ #define TABLE_UPDATE_SLEEP_US 10 #define TABLE_UPDATE_TIMEOUT_US 100000 -struct ocelot_mact_entry { - u8 mac[ETH_ALEN]; - u16 vid; - enum macaccess_entry_type type; -}; - static inline u32 ocelot_mact_read_macaccess(struct ocelot *ocelot) { return ocelot_read(ocelot, ANA_TABLES_MACACCESS); diff --git a/drivers/net/ethernet/mscc/ocelot.h b/drivers/net/ethernet/mscc/ocelot.h index 1952d6a1b98a..a77050b13d18 100644 --- a/drivers/net/ethernet/mscc/ocelot.h +++ b/drivers/net/ethernet/mscc/ocelot.h @@ -54,19 +54,6 @@ struct ocelot_dump_ctx { int idx; }; -/* MAC table entry types. - * ENTRYTYPE_NORMAL is subject to aging. - * ENTRYTYPE_LOCKED is not subject to aging. - * ENTRYTYPE_MACv4 is not subject to aging. For IPv4 multicast. - * ENTRYTYPE_MACv6 is not subject to aging. For IPv6 multicast. - */ -enum macaccess_entry_type { - ENTRYTYPE_NORMAL = 0, - ENTRYTYPE_LOCKED, - ENTRYTYPE_MACv4, - ENTRYTYPE_MACv6, -}; - /* A (PGID) port mask structure, encoding the 2^ocelot->num_phys_ports * possibilities of egress port masks for L2 multicast traffic. * For a switch with 9 user ports, there are 512 possible port masks, but the diff --git a/include/soc/mscc/ocelot.h b/include/soc/mscc/ocelot.h index 06706a9fd5b1..32b3c60d6046 100644 --- a/include/soc/mscc/ocelot.h +++ b/include/soc/mscc/ocelot.h @@ -698,6 +698,25 @@ struct ocelot_skb_cb { u8 ts_id; }; +/* MAC table entry types. + * ENTRYTYPE_NORMAL is subject to aging. + * ENTRYTYPE_LOCKED is not subject to aging. + * ENTRYTYPE_MACv4 is not subject to aging. For IPv4 multicast. + * ENTRYTYPE_MACv6 is not subject to aging. For IPv6 multicast. + */ +enum macaccess_entry_type { + ENTRYTYPE_NORMAL = 0, + ENTRYTYPE_LOCKED, + ENTRYTYPE_MACv4, + ENTRYTYPE_MACv6, +}; + +struct ocelot_mact_entry { + u8 mac[ETH_ALEN]; + u16 vid; + enum macaccess_entry_type type; +}; + #define OCELOT_SKB_CB(skb) \ ((struct ocelot_skb_cb *)((skb)->cb)) -- 2.17.1