Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Vladimir Oltean and committed by
David S. Miller
b6362bdf 04b67e18

+7 -7
+1 -1
drivers/net/dsa/sja1105/sja1105_vl.c
··· 306 306 307 307 bridge_num = dsa_port_bridge_num_get(dp); 308 308 309 - return dsa_8021q_bridge_tx_fwd_offload_vid(bridge_num); 309 + return dsa_tag_8021q_bridge_vid(bridge_num); 310 310 } 311 311 312 312 static int sja1105_init_virtual_links(struct sja1105_private *priv,
+1 -1
include/linux/dsa/8021q.h
··· 47 47 struct net_device *dsa_tag_8021q_find_port_by_vbid(struct net_device *master, 48 48 int vbid); 49 49 50 - u16 dsa_8021q_bridge_tx_fwd_offload_vid(unsigned int bridge_num); 50 + u16 dsa_tag_8021q_bridge_vid(unsigned int bridge_num); 51 51 52 52 u16 dsa_tag_8021q_standalone_vid(const struct dsa_port *dp); 53 53
+4 -4
net/dsa/tag_8021q.c
··· 62 62 #define DSA_8021Q_PORT(x) (((x) << DSA_8021Q_PORT_SHIFT) & \ 63 63 DSA_8021Q_PORT_MASK) 64 64 65 - u16 dsa_8021q_bridge_tx_fwd_offload_vid(unsigned int bridge_num) 65 + u16 dsa_tag_8021q_bridge_vid(unsigned int bridge_num) 66 66 { 67 67 /* The VBID value of 0 is reserved for precise TX, but it is also 68 68 * reserved/invalid for the bridge_num, so all is well. 69 69 */ 70 70 return DSA_8021Q_RSV | DSA_8021Q_VBID(bridge_num); 71 71 } 72 - EXPORT_SYMBOL_GPL(dsa_8021q_bridge_tx_fwd_offload_vid); 72 + EXPORT_SYMBOL_GPL(dsa_tag_8021q_bridge_vid); 73 73 74 74 /* Returns the VID that will be installed as pvid for this switch port, sent as 75 75 * tagged egress towards the CPU port and decoded by the rcv function. ··· 289 289 * bridging VLAN 290 290 */ 291 291 standalone_vid = dsa_tag_8021q_standalone_vid(dp); 292 - bridge_vid = dsa_8021q_bridge_tx_fwd_offload_vid(bridge.num); 292 + bridge_vid = dsa_tag_8021q_bridge_vid(bridge.num); 293 293 294 294 err = dsa_port_tag_8021q_vlan_add(dp, bridge_vid, true); 295 295 if (err) ··· 312 312 * standalone VLAN 313 313 */ 314 314 standalone_vid = dsa_tag_8021q_standalone_vid(dp); 315 - bridge_vid = dsa_8021q_bridge_tx_fwd_offload_vid(bridge.num); 315 + bridge_vid = dsa_tag_8021q_bridge_vid(bridge.num); 316 316 317 317 err = dsa_port_tag_8021q_vlan_add(dp, standalone_vid, false); 318 318 if (err) {
+1 -1
net/dsa/tag_sja1105.c
··· 226 226 * TX VLAN that targets the bridge's entire broadcast domain, 227 227 * instead of just the specific port. 228 228 */ 229 - tx_vid = dsa_8021q_bridge_tx_fwd_offload_vid(bridge_num); 229 + tx_vid = dsa_tag_8021q_bridge_vid(bridge_num); 230 230 231 231 return dsa_8021q_xmit(skb, netdev, sja1105_xmit_tpid(dp), tx_vid); 232 232 }