Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp4144592pxb; Mon, 30 Aug 2021 20:37:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzGp2FTFvKMW2DJsYoSv3blzCWis/xXs3+epSakRCns3FT9VWJXBVHzl7Fg8nkCswB7N/c2 X-Received: by 2002:aa7:c24c:: with SMTP id y12mr27329832edo.149.1630381021800; Mon, 30 Aug 2021 20:37:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630381021; cv=none; d=google.com; s=arc-20160816; b=k7cNGfIP/goX2botGT9vN3iu9m2U4hTQUvHNAL3tbbHaNeDD6TOA6ftYnZh3/aBasG QcEXpvN87oMCSasE2DCakoGpEONR7dmwDw2XO/8iEF85mXHtiqRJalLEnvws8sArfB4Z 6csHgn7PRYwkOdhzTmgh2C06g4fLBIgsFnFRO6MPNr4tLCOE3na4vRjIrOzIIWaFALTp ICc2CS8iGaptSN1JA4BF2gYLhJGEliw/KhxFBfk//PmHVo6GP+PJmWgo1qF7/1LzthD+ dZQFLdNDL5wYJwPZM99iaYJWz/34oM17s/SQKo0slzWFpnu2OVbuErqcJPJeqTSCj7h+ ehxQ== 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=kSBH++JD+vm4+0jiTBkpGTzBTJNLERIOMnphq/LasST+0ESIRGnpv9R034X4l5ThjF VfBkWQ7UfkjOrFXx7Yp9COr6KG4Bxp7EWTcPC4DwF80bF63/rqbDuwjALteZVaZYXeLX giKLZ3iPyj3lpVATEuFIYMhxJmMS7OrMuVXuiczQxQMxCHild+acVtpPJFcsvplQhzHO PjG2flZ81WfY33zc/8JmnJYuo+6nxBjfidfXuM8QO7DjbgeYA61RS0DzoS/lsjRJVODE GrB1pPyHk7ULpKM2HnhQ2VQ9bhzhUbkGDpUHS8jXePzSvo1Y/V73iotPmRU5Gk+yUkEs JkKg== 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 a6si7932388edx.229.2021.08.30.20.36.38; Mon, 30 Aug 2021 20:37:01 -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 S239527AbhHaDgF (ORCPT + 99 others); Mon, 30 Aug 2021 23:36:05 -0400 Received: from inva020.nxp.com ([92.121.34.13]:41248 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236968AbhHaDgD (ORCPT ); Mon, 30 Aug 2021 23:36:03 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 331AD1A0B3C; Tue, 31 Aug 2021 05:35:08 +0200 (CEST) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id EE6991A256A; Tue, 31 Aug 2021 05:35:07 +0200 (CEST) Received: from localhost.localdomain (mega.ap.freescale.net [10.192.208.232]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id D3225183ACDE; Tue, 31 Aug 2021 11:35:05 +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 Subject: [PATCH v3 net-next 1/8] net: mscc: ocelot: export struct ocelot_mact_entry Date: Tue, 31 Aug 2021 11:45:29 +0800 Message-Id: <20210831034536.17497-2-xiaoliang.yang_1@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210831034536.17497-1-xiaoliang.yang_1@nxp.com> References: <20210831034536.17497-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