Commit b6362bdf authored by Vladimir Oltean's avatar Vladimir Oltean Committed by David S. Miller

net: dsa: tag_8021q: rename dsa_8021q_bridge_tx_fwd_offload_vid

The dsa_8021q_bridge_tx_fwd_offload_vid is no longer used just for
bridge TX forwarding offload, it is the private VLAN reserved for
VLAN-unaware bridging in a way that is compatible with FDB isolation.

So just rename it dsa_tag_8021q_bridge_vid.
Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 04b67e18
...@@ -306,7 +306,7 @@ static u16 sja1105_port_get_tag_8021q_vid(struct dsa_port *dp) ...@@ -306,7 +306,7 @@ static u16 sja1105_port_get_tag_8021q_vid(struct dsa_port *dp)
bridge_num = dsa_port_bridge_num_get(dp); bridge_num = dsa_port_bridge_num_get(dp);
return dsa_8021q_bridge_tx_fwd_offload_vid(bridge_num); return dsa_tag_8021q_bridge_vid(bridge_num);
} }
static int sja1105_init_virtual_links(struct sja1105_private *priv, static int sja1105_init_virtual_links(struct sja1105_private *priv,
......
...@@ -47,7 +47,7 @@ void dsa_8021q_rcv(struct sk_buff *skb, int *source_port, int *switch_id, ...@@ -47,7 +47,7 @@ void dsa_8021q_rcv(struct sk_buff *skb, int *source_port, int *switch_id,
struct net_device *dsa_tag_8021q_find_port_by_vbid(struct net_device *master, struct net_device *dsa_tag_8021q_find_port_by_vbid(struct net_device *master,
int vbid); int vbid);
u16 dsa_8021q_bridge_tx_fwd_offload_vid(unsigned int bridge_num); u16 dsa_tag_8021q_bridge_vid(unsigned int bridge_num);
u16 dsa_tag_8021q_standalone_vid(const struct dsa_port *dp); u16 dsa_tag_8021q_standalone_vid(const struct dsa_port *dp);
......
...@@ -62,14 +62,14 @@ ...@@ -62,14 +62,14 @@
#define DSA_8021Q_PORT(x) (((x) << DSA_8021Q_PORT_SHIFT) & \ #define DSA_8021Q_PORT(x) (((x) << DSA_8021Q_PORT_SHIFT) & \
DSA_8021Q_PORT_MASK) DSA_8021Q_PORT_MASK)
u16 dsa_8021q_bridge_tx_fwd_offload_vid(unsigned int bridge_num) u16 dsa_tag_8021q_bridge_vid(unsigned int bridge_num)
{ {
/* The VBID value of 0 is reserved for precise TX, but it is also /* The VBID value of 0 is reserved for precise TX, but it is also
* reserved/invalid for the bridge_num, so all is well. * reserved/invalid for the bridge_num, so all is well.
*/ */
return DSA_8021Q_RSV | DSA_8021Q_VBID(bridge_num); return DSA_8021Q_RSV | DSA_8021Q_VBID(bridge_num);
} }
EXPORT_SYMBOL_GPL(dsa_8021q_bridge_tx_fwd_offload_vid); EXPORT_SYMBOL_GPL(dsa_tag_8021q_bridge_vid);
/* Returns the VID that will be installed as pvid for this switch port, sent as /* Returns the VID that will be installed as pvid for this switch port, sent as
* tagged egress towards the CPU port and decoded by the rcv function. * tagged egress towards the CPU port and decoded by the rcv function.
...@@ -289,7 +289,7 @@ int dsa_tag_8021q_bridge_join(struct dsa_switch *ds, int port, ...@@ -289,7 +289,7 @@ int dsa_tag_8021q_bridge_join(struct dsa_switch *ds, int port,
* bridging VLAN * bridging VLAN
*/ */
standalone_vid = dsa_tag_8021q_standalone_vid(dp); standalone_vid = dsa_tag_8021q_standalone_vid(dp);
bridge_vid = dsa_8021q_bridge_tx_fwd_offload_vid(bridge.num); bridge_vid = dsa_tag_8021q_bridge_vid(bridge.num);
err = dsa_port_tag_8021q_vlan_add(dp, bridge_vid, true); err = dsa_port_tag_8021q_vlan_add(dp, bridge_vid, true);
if (err) if (err)
...@@ -312,7 +312,7 @@ void dsa_tag_8021q_bridge_leave(struct dsa_switch *ds, int port, ...@@ -312,7 +312,7 @@ void dsa_tag_8021q_bridge_leave(struct dsa_switch *ds, int port,
* standalone VLAN * standalone VLAN
*/ */
standalone_vid = dsa_tag_8021q_standalone_vid(dp); standalone_vid = dsa_tag_8021q_standalone_vid(dp);
bridge_vid = dsa_8021q_bridge_tx_fwd_offload_vid(bridge.num); bridge_vid = dsa_tag_8021q_bridge_vid(bridge.num);
err = dsa_port_tag_8021q_vlan_add(dp, standalone_vid, false); err = dsa_port_tag_8021q_vlan_add(dp, standalone_vid, false);
if (err) { if (err) {
......
...@@ -226,7 +226,7 @@ static struct sk_buff *sja1105_imprecise_xmit(struct sk_buff *skb, ...@@ -226,7 +226,7 @@ static struct sk_buff *sja1105_imprecise_xmit(struct sk_buff *skb,
* TX VLAN that targets the bridge's entire broadcast domain, * TX VLAN that targets the bridge's entire broadcast domain,
* instead of just the specific port. * instead of just the specific port.
*/ */
tx_vid = dsa_8021q_bridge_tx_fwd_offload_vid(bridge_num); tx_vid = dsa_tag_8021q_bridge_vid(bridge_num);
return dsa_8021q_xmit(skb, netdev, sja1105_xmit_tpid(dp), tx_vid); return dsa_8021q_xmit(skb, netdev, sja1105_xmit_tpid(dp), tx_vid);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment