Commit 8263ee81 authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

Merge branch 'remove-dsa_priv-h'

Vladimir Oltean says:

====================
Remove dsa_priv.h

After working on the "Autoload DSA tagging driver when dynamically
changing protocol" series:
https://patchwork.kernel.org/project/netdevbpf/cover/20221115011847.2843127-1-vladimir.oltean@nxp.com/

it became clear to me that the situation with DSA headers is a bit
messy, and I put the tagging protocol driver macros in a pretty random
temporary spot in dsa_priv.h.

Now is the time to make the net/dsa/ folder a bit more organized, and to
make tagging protocol driver modules include just headers they're going
to use.

Another thing is the merging and cleanup of dsa.c and dsa2.c. Before,
dsa.c had 589 lines and dsa2.c had 1817 lines. Now, the combined dsa.c
has 1749 lines, the rest went to some other places.

Sorry for the set size, I know the rules, but since this is basically
code movement for the most part, I thought more patches are better.
====================

Link: https://lore.kernel.org/r/20221121135555.1227271-1-vladimir.oltean@nxp.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 815bc3ac 5917bfe6
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ config NET_DSA_BCM_SF2

config NET_DSA_LOOP
	tristate "DSA mock-up Ethernet switch chip support"
	select NET_DSA_TAG_NONE
	select FIXED_PHY
	help
	  This enables support for a fake mock-up switch chip which
@@ -99,6 +100,7 @@ config NET_DSA_SMSC_LAN9303_MDIO

config NET_DSA_VITESSE_VSC73XX
	tristate
	select NET_DSA_TAG_NONE
	select FIXED_PHY
	select VITESSE_PHY
	select GPIOLIB
+1 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
menuconfig B53
	tristate "Broadcom BCM53xx managed switch support"
	depends on NET_DSA
	select NET_DSA_TAG_NONE
	select NET_DSA_TAG_BRCM
	select NET_DSA_TAG_BRCM_LEGACY
	select NET_DSA_TAG_BRCM_PREPEND
+1 −0
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@ menuconfig NET_DSA_MICROCHIP_KSZ_COMMON
	tristate "Microchip KSZ8795/KSZ9477/LAN937x series switch support"
	depends on NET_DSA
	select NET_DSA_TAG_KSZ
	select NET_DSA_TAG_NONE
	help
	  This driver adds support for Microchip KSZ9477 series switch and
	  KSZ8795/KSZ88x3 switch chips.
+1 −30
Original line number Diff line number Diff line
@@ -5,28 +5,8 @@
#ifndef _NET_DSA_8021Q_H
#define _NET_DSA_8021Q_H

#include <linux/refcount.h>
#include <linux/types.h>
#include <net/dsa.h>

struct dsa_switch;
struct dsa_port;
struct sk_buff;
struct net_device;

struct dsa_tag_8021q_vlan {
	struct list_head list;
	int port;
	u16 vid;
	refcount_t refcount;
};

struct dsa_8021q_context {
	struct dsa_switch *ds;
	struct list_head vlans;
	/* EtherType of RX VID, used for filtering on master interface */
	__be16 proto;
};
#include <linux/types.h>

int dsa_tag_8021q_register(struct dsa_switch *ds, __be16 proto);

@@ -38,15 +18,6 @@ int dsa_tag_8021q_bridge_join(struct dsa_switch *ds, int port,
void dsa_tag_8021q_bridge_leave(struct dsa_switch *ds, int port,
				struct dsa_bridge bridge);

struct sk_buff *dsa_8021q_xmit(struct sk_buff *skb, struct net_device *netdev,
			       u16 tpid, u16 tci);

void dsa_8021q_rcv(struct sk_buff *skb, int *source_port, int *switch_id,
		   int *vbid);

struct net_device *dsa_tag_8021q_find_port_by_vbid(struct net_device *master,
						   int vbid);

u16 dsa_tag_8021q_bridge_vid(unsigned int bridge_num);

u16 dsa_tag_8021q_standalone_vid(const struct dsa_port *dp);
+1 −2
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@
#include <net/devlink.h>
#include <net/switchdev.h>

struct dsa_8021q_context;
struct tc_action;
struct phy_device;
struct fixed_phy_status;
@@ -1285,8 +1286,6 @@ struct dsa_switch_driver {
	const struct dsa_switch_ops *ops;
};

struct net_device *dsa_dev_to_net_device(struct device *dev);

bool dsa_fdb_present_in_other_db(struct dsa_switch *ds, int port,
				 const unsigned char *addr, u16 vid,
				 struct dsa_db db);
Loading