]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: tag_8021q: refactor RX VLAN parsing into a dedicated function
authorVladimir Oltean <vladimir.oltean@nxp.com>
Fri, 11 Jun 2021 19:01:27 +0000 (22:01 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 11 Jun 2021 19:45:38 +0000 (12:45 -0700)
commit8c5410dd4fed2b5285c8e7e07fee7d96e1ba5748
treee81a1d7306f4cd6bbb6531dd89764b7b1bb0033c
parentc6f77c8e49f503667b3d07236a752896c46dfbca
net: dsa: tag_8021q: refactor RX VLAN parsing into a dedicated function

The added value of this function is that it can deal with both the case
where the VLAN header is in the skb head, as well as in the offload field.
This is something I was not able to do using other functions in the
network stack.

Since both ocelot-8021q and sja1105 need to do the same stuff, let's
make it a common service provided by tag_8021q.

This is done as refactoring for the new SJA1110 tagger, which partly
uses tag_8021q as well (just like SJA1105), and will be the third caller.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/dsa/8021q.h
net/dsa/tag_8021q.c
net/dsa/tag_ocelot_8021q.c
net/dsa/tag_sja1105.c