net: dsa: tag_8021q: add a context structure
While working on another tag_8021q driver implementation, some things became apparent: - It is not mandatory for a DSA driver to offload the tag_8021q VLANs by using the VLAN table per se. For example, it can add custom TCAM rules that simply encapsulate RX traffic, and redirect & decapsulate rules for TX traffic. For such a driver, it makes no sense to receive the tag_8021q configuration through the same callback as it receives the VLAN configuration from the bridge and the 8021q modules. - Currently, sja1105 (the only tag_8021q user) sets a priv->expect_dsa_8021q variable to distinguish between the bridge calling, and tag_8021q calling. That can be improved, to say the least. - The crosschip bridging operations are, in fact, stateful already. The list of crosschip_links must be kept by the caller and passed to the relevant tag_8021q functions. So it would be nice if the tag_8021q configuration was more self-contained. This patch attemp...
Showing
- drivers/net/dsa/sja1105/sja1105.h 1 addition, 2 deletionsdrivers/net/dsa/sja1105/sja1105.h
- drivers/net/dsa/sja1105/sja1105_main.c 125 additions, 88 deletionsdrivers/net/dsa/sja1105/sja1105_main.c
- include/linux/dsa/8021q.h 27 additions, 19 deletionsinclude/linux/dsa/8021q.h
- net/dsa/tag_8021q.c 63 additions, 64 deletionsnet/dsa/tag_8021q.c
Please register or sign in to comment