Netdev List
 help / color / mirror / Atom feed
* [RFC net-next 0/2] hsr: Use only one MAC address per node
@ 2026-07-14 10:52 Felix Maurer
  2026-07-14 10:52 ` [RFC net-next 1/2] hsr: Set equal MAC addresses on port A and B for HSR Felix Maurer
  2026-07-14 10:52 ` [RFC net-next 2/2] hsr: Remove second MAC address from node table Felix Maurer
  0 siblings, 2 replies; 3+ messages in thread
From: Felix Maurer @ 2026-07-14 10:52 UTC (permalink / raw)
  To: netdev, davem, edumazet, kuba, pabeni, horms
  Cc: bigeasy, fmancera, liuhangbin, luka.gejak, xiaoliang.yang_1,
	kexinsun, ssrane_b23, michael.bommarito, 2022090917019,
	yury.norov, jvaclav, maoyixie.tju

Many places in the hsr module assumed that a single node could be using
multiple MAC addresses to communicate in the network. The standard is
explicit that PRP nodes should use the same MAC for frames on both
ports and commit b65999e7238e ("net: hsr: sync hw addr of slave2
according to slave1 hw addr on PRP") made this clear. For HSR, the
standard is less explicit. But after quite some discussions and reading
standards, Fernando, Sebastian, and I concluded that it never mentions
different MAC addresses for HSR either and instead often suggests using
equal addresses for both ports and this should be what hsr interfaces
do.

A short history of how this assumption formed in the kernel supports
this as well: the original HSRv0 code implemented IEC 62439-3:2010 where
node tables had two MAC addresses per node. It was an optional feature
to support an unspecified address substitution mechanism for _PRP_, also
referred to as PICS_SUBS. Note that we never even supported PRPv0 from
the :2010 standard. In IEC 62439-3:2012, the feature was explicitly
removed. But with two addresses per node in the node table and selftests
setting different addresses for both interfaces, the assumption emerged
that all nodes can have two addresses. In :2010, this was optional and
the standard is written so that a node not supporting PICS_SUBS could
just ignore it. Since 2012:, nodes must use the same address for both
ports in the ring.

To prevent misconfiguration and simplify the hsr code, this patchset
removes the notion of two different MAC addresses for one node in the
network entirely. The first patch sets equal addresses on both ports so
that we are not running in invalid configurations. I also updates the
selftest to not use/expect different addresses on the two ports. The
second patch removes MAC address B from the node table and thereby
eliminates a lot of code, including the node merging.

I am posting as an RFC for now mostly for two reasons: First, I want to
make sure it's generally accepted to have only a single MAC address per
node and give everyone the chance to speak up against this.

Second, I adapted the PRP address handling to HSR as well, i.e., to copy
the address from port A to port B and master, mostly because it is low
effort. I am not sure though if this is the best approach now that we
touch this part of the code anyways. I have two alternative ideas how
addresses should be handled:

1) Make the master control the port MAC addresses: when the hsr
   interface is created, generate a MAC address and assign it to both
   ports. Changing the address afterwards would also only go through the
   hsr interface which would update both ports.
2) Don't change the MAC addresses of the port interfaces at all. Instead
   behave similar to bridge where the ports keep their addresses and
   traffic from the bridge/master gets its own MAC address assigned.

What do you think? Do you prefer any of these approaches?

Thanks,
   Felix


Cc: Fernando Fernandez Mancera <fmancera@suse.de>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>

Felix Maurer (2):
  hsr: Set equal MAC addresses on port A and B for HSR
  hsr: Remove second MAC address from node table

 net/hsr/hsr_debugfs.c                         |   9 +-
 net/hsr/hsr_device.c                          |  23 +-
 net/hsr/hsr_forward.c                         |   8 +-
 net/hsr/hsr_framereg.c                        | 250 ++----------------
 net/hsr/hsr_framereg.h                        |  14 +-
 net/hsr/hsr_main.c                            |  18 +-
 net/hsr/hsr_main.h                            |   5 +-
 net/hsr/hsr_netlink.c                         |  18 +-
 tools/testing/selftests/net/hsr/hsr_ping.sh   |  33 +--
 tools/testing/selftests/net/hsr/hsr_redbox.sh |  13 +-
 .../testing/selftests/net/hsr/link_faults.sh  |  26 --
 11 files changed, 62 insertions(+), 355 deletions(-)


base-commit: f6f3b36c15ed44de1fbb44e645e4fae8c4a4453e
--
2.55.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [RFC net-next 1/2] hsr: Set equal MAC addresses on port A and B for HSR
  2026-07-14 10:52 [RFC net-next 0/2] hsr: Use only one MAC address per node Felix Maurer
@ 2026-07-14 10:52 ` Felix Maurer
  2026-07-14 10:52 ` [RFC net-next 2/2] hsr: Remove second MAC address from node table Felix Maurer
  1 sibling, 0 replies; 3+ messages in thread
From: Felix Maurer @ 2026-07-14 10:52 UTC (permalink / raw)
  To: netdev, davem, edumazet, kuba, pabeni, horms
  Cc: bigeasy, fmancera, liuhangbin, luka.gejak, xiaoliang.yang_1,
	kexinsun, ssrane_b23, michael.bommarito, 2022090917019,
	yury.norov, jvaclav, maoyixie.tju

All hsr interfaces are created with their MAC address set to the MAC
address of port A. Since commit b65999e7238e ("net: hsr: sync hw addr of
slave2 according to slave1 hw addr on PRP"), we are copying the MAC address
of port A to port B as well for PRP interfaces because for correct
operation, a node in a PRP network must use the same MAC address on both
ports. IOW, the frames sent over port A and port B must only differ in the
LAN ID in their PRP redundancy control trailer, i.e., must not differ in
their source MAC address.

The same applies to HSR: for correct operation of the ring, the frames sent
from port A and port B must not differ in their source MAC address.
Therefore, extend the address copying behavior from PRP to HSR interfaces.

In the selftests, we now set only the addresses of port A which is how HSR
is intended to be used. The address is copied over to port B anyways. With
only a single address per node, there is also no reason anymore to wait for
nodes in the table to get merged. While touching the MAC addresses in the
hsr_redbox test, I noticed that the bridge in ns3 and its ports have the
same addresses; fixing that as well.

Signed-off-by: Felix Maurer <fmaurer@redhat.com>
---
 net/hsr/hsr_device.c                          |  6 ++--
 net/hsr/hsr_main.c                            | 12 +++----
 tools/testing/selftests/net/hsr/hsr_ping.sh   | 33 +++----------------
 tools/testing/selftests/net/hsr/hsr_redbox.sh | 13 +++-----
 .../testing/selftests/net/hsr/link_faults.sh  | 26 ---------------
 5 files changed, 16 insertions(+), 74 deletions(-)

diff --git a/net/hsr/hsr_device.c b/net/hsr/hsr_device.c
index 5555b71ab19b..a52079eb2adb 100644
--- a/net/hsr/hsr_device.c
+++ b/net/hsr/hsr_device.c
@@ -795,10 +795,8 @@ int hsr_dev_finalize(struct net_device *hsr_dev, struct net_device *slave[2],
 	if (res)
 		goto err_unregister;
 
-	if (protocol_version == PRP_V1) {
-		eth_hw_addr_set(slave[1], slave[0]->dev_addr);
-		call_netdevice_notifiers(NETDEV_CHANGEADDR, slave[1]);
-	}
+	eth_hw_addr_set(slave[1], slave[0]->dev_addr);
+	call_netdevice_notifiers(NETDEV_CHANGEADDR, slave[1]);
 
 	if (interlink) {
 		res = hsr_add_port(hsr, interlink, HSR_PT_INTERLINK, extack);
diff --git a/net/hsr/hsr_main.c b/net/hsr/hsr_main.c
index 33951d9bd3c5..202cf2a3625f 100644
--- a/net/hsr/hsr_main.c
+++ b/net/hsr/hsr_main.c
@@ -79,13 +79,11 @@ static int hsr_netdev_notify(struct notifier_block *nb, unsigned long event,
 			call_netdevice_notifiers(NETDEV_CHANGEADDR,
 						 master->dev);
 
-			if (hsr->prot_version == PRP_V1) {
-				port = hsr_port_get_hsr(hsr, HSR_PT_SLAVE_B);
-				if (port) {
-					eth_hw_addr_set(port->dev, dev->dev_addr);
-					call_netdevice_notifiers(NETDEV_CHANGEADDR,
-								 port->dev);
-				}
+			port = hsr_port_get_hsr(hsr, HSR_PT_SLAVE_B);
+			if (port) {
+				eth_hw_addr_set(port->dev, dev->dev_addr);
+				call_netdevice_notifiers(NETDEV_CHANGEADDR,
+							 port->dev);
 			}
 		}
 
diff --git a/tools/testing/selftests/net/hsr/hsr_ping.sh b/tools/testing/selftests/net/hsr/hsr_ping.sh
index f4d685df4345..454c6fdfd834 100755
--- a/tools/testing/selftests/net/hsr/hsr_ping.sh
+++ b/tools/testing/selftests/net/hsr/hsr_ping.sh
@@ -51,25 +51,6 @@ do_ping_tests()
 	do_ping "$ns3" "dead:beef:$netid::2"
 	stop_if_error "Initial validation failed on IPv6."
 
-# Wait until supervisor all supervision frames have been processed and the node
-# entries have been merged. Otherwise duplicate frames will be observed which is
-# valid at this stage.
-	echo "INFO: Wait for node table entries to be merged."
-	WAIT=5
-	while [ ${WAIT} -gt 0 ]
-	do
-		grep 00:00:00:00:00:00 /sys/kernel/debug/hsr/hsr*/node_table
-		if [ $? -ne 0 ]
-		then
-			break
-		fi
-		sleep 1
-		let "WAIT = WAIT - 1"
-	done
-
-# Just a safety delay in case the above check didn't handle it.
-	sleep 1
-
 	echo "INFO: Longer ping test."
 	do_ping_long "$ns1" "100.64.$netid.2"
 	do_ping_long "$ns1" "dead:beef:$netid::2"
@@ -110,6 +91,11 @@ setup_hsr_interfaces()
 	ip link add ns1eth2 netns "$ns1" type veth peer name ns3eth1 netns "$ns3"
 	ip link add ns3eth2 netns "$ns3" type veth peer name ns2eth2 netns "$ns2"
 
+	# MAC addresses will be copied from LAN A interfaces
+	ip -net "$ns1" link set address 00:11:22:00:01:01 dev ns1eth1
+	ip -net "$ns2" link set address 00:11:22:00:02:01 dev ns2eth1
+	ip -net "$ns3" link set address 00:11:22:00:03:01 dev ns3eth1
+
 	# HSRv0/1
 	ip -net "$ns1" link add name hsr1 type hsr slave1 ns1eth1 \
 		slave2 ns1eth2 supervision 45 version "$HSRv" proto 0
@@ -126,15 +112,6 @@ setup_hsr_interfaces()
 	ip -net "$ns3" addr add 100.64.0.3/24 dev hsr3
 	ip -net "$ns3" addr add dead:beef:0::3/64 dev hsr3 nodad
 
-	ip -net "$ns1" link set address 00:11:22:00:01:01 dev ns1eth1
-	ip -net "$ns1" link set address 00:11:22:00:01:02 dev ns1eth2
-
-	ip -net "$ns2" link set address 00:11:22:00:02:01 dev ns2eth1
-	ip -net "$ns2" link set address 00:11:22:00:02:02 dev ns2eth2
-
-	ip -net "$ns3" link set address 00:11:22:00:03:01 dev ns3eth1
-	ip -net "$ns3" link set address 00:11:22:00:03:02 dev ns3eth2
-
 	# All Links up
 	ip -net "$ns1" link set ns1eth1 up
 	ip -net "$ns1" link set ns1eth2 up
diff --git a/tools/testing/selftests/net/hsr/hsr_redbox.sh b/tools/testing/selftests/net/hsr/hsr_redbox.sh
index 998103502d5d..f945d7d82fa1 100755
--- a/tools/testing/selftests/net/hsr/hsr_redbox.sh
+++ b/tools/testing/selftests/net/hsr/hsr_redbox.sh
@@ -23,10 +23,6 @@ do_complete_ping_test()
 	do_ping "${ns5}" 100.64.0.1
 	stop_if_error "Initial validation failed."
 
-	# Wait for MGNT HSR frames being received and nodes being
-	# merged.
-	sleep 5
-
 	echo "INFO: Longer ping test (HSR-SAN/RedBox)."
 	# Ping from SAN to hsr1 (via hsr2)
 	do_ping_long "${ns3}" 100.64.0.1
@@ -96,16 +92,15 @@ setup_hsr_interfaces()
 	ip -n "${ns4}" link set ns4eth1 up
 	ip -n "${ns5}" link set ns5eth1 up
 
+	# Setting MAC addresses to help with debugging
 	ip -net "$ns1" link set address 00:11:22:00:01:01 dev ns1eth1
-	ip -net "$ns1" link set address 00:11:22:00:01:02 dev ns1eth2
 
 	ip -net "$ns2" link set address 00:11:22:00:02:01 dev ns2eth1
-	ip -net "$ns2" link set address 00:11:22:00:02:02 dev ns2eth2
 	ip -net "$ns2" link set address 00:11:22:00:02:03 dev ns2eth3
 
-	ip -net "$ns3" link set address 00:11:22:00:03:11 dev ns3eth1
-	ip -net "$ns3" link set address 00:11:22:00:03:11 dev ns3eth2
-	ip -net "$ns3" link set address 00:11:22:00:03:11 dev ns3eth3
+	ip -net "$ns3" link set address 00:11:22:00:03:01 dev ns3eth1
+	ip -net "$ns3" link set address 00:11:22:00:03:02 dev ns3eth2
+	ip -net "$ns3" link set address 00:11:22:00:03:03 dev ns3eth3
 	ip -net "$ns3" link set address 00:11:22:00:03:11 dev ns3br1
 
 	ip -net "$ns4" link set address 00:11:22:00:04:01 dev ns4eth1
diff --git a/tools/testing/selftests/net/hsr/link_faults.sh b/tools/testing/selftests/net/hsr/link_faults.sh
index be526281571c..c002390acc07 100755
--- a/tools/testing/selftests/net/hsr/link_faults.sh
+++ b/tools/testing/selftests/net/hsr/link_faults.sh
@@ -59,13 +59,8 @@ setup_hsr_topo()
 
 	# MAC addresses (not needed for HSR operation, but helps with debugging)
 	ip -net "$node1" link set address 00:11:22:00:01:01 dev vethA
-	ip -net "$node1" link set address 00:11:22:00:01:02 dev vethB
-
 	ip -net "$node2" link set address 00:11:22:00:02:01 dev vethA
-	ip -net "$node2" link set address 00:11:22:00:02:02 dev vethB
-
 	ip -net "$node3" link set address 00:11:22:00:03:01 dev vethA
-	ip -net "$node3" link set address 00:11:22:00:03:02 dev vethB
 
 	# HSR interfaces
 	ip -net "$node1" link add name hsr1 type hsr proto 0 version "$ver" \
@@ -134,35 +129,14 @@ setup_prp_topo()
 	ip -net "$node2" link set prp2 up
 }
 
-wait_for_hsr_node_table()
-{
-	log_info "Wait for node table entries to be merged."
-	WAIT=5
-	while [ "${WAIT}" -gt 0 ]; do
-		nts=$(cat /sys/kernel/debug/hsr/hsr*/node_table)
-
-		# We need entries in the node tables, and they need to be merged
-		if (echo "$nts" | grep -qE "^([0-9a-f]{2}:){5}") && \
-		    ! (echo "$nts" | grep -q "00:00:00:00:00:00"); then
-			return
-		fi
-
-		sleep 1
-		((WAIT--))
-	done
-	check_err 1 "Failed to wait for merged node table entries"
-}
-
 setup_topo()
 {
 	local proto="$1"
 
 	if [ "$proto" = "HSRv0" ]; then
 		setup_hsr_topo 0
-		wait_for_hsr_node_table
 	elif [ "$proto" = "HSRv1" ]; then
 		setup_hsr_topo 1
-		wait_for_hsr_node_table
 	elif [ "$proto" = "PRP" ]; then
 		setup_prp_topo
 	else
-- 
2.55.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [RFC net-next 2/2] hsr: Remove second MAC address from node table
  2026-07-14 10:52 [RFC net-next 0/2] hsr: Use only one MAC address per node Felix Maurer
  2026-07-14 10:52 ` [RFC net-next 1/2] hsr: Set equal MAC addresses on port A and B for HSR Felix Maurer
@ 2026-07-14 10:52 ` Felix Maurer
  1 sibling, 0 replies; 3+ messages in thread
From: Felix Maurer @ 2026-07-14 10:52 UTC (permalink / raw)
  To: netdev, davem, edumazet, kuba, pabeni, horms
  Cc: bigeasy, fmancera, liuhangbin, luka.gejak, xiaoliang.yang_1,
	kexinsun, ssrane_b23, michael.bommarito, 2022090917019,
	yury.norov, jvaclav, maoyixie.tju

Since its creation, the hsr module supported two MAC addresses per node in
the node table. Presumably, this was initially implemented to support an
address substitution mechanism for PRP. The IEC 62439-3:2010 calls this
property PICS_SUBS and it is optional to implement:

"Some applications require different MAC addresses on the redundant ports,
and these MAC addresses may be different from the default MAC address of
that node. This involves address substitution mechanisms which are not
specified in this International Standard. However, the basic protocol and
the frame format are prepared for such extension." (IEC 62439-3:2010,
4.1.7)

Note that this is from IEC 62439-3:2010, which standardizes PRPv0 which we
do not support at all. IEC 62439-3:2012 explicitly removed this address
substitution mechanism completely, leaving only a single MAC address per
node in the node table.

While the initial implementation aimed at supporting PICS_SUBS, this
developed into a situation where a lot of the code in the hsr module
assumed that nodes can/should have different MAC addresses on their two
ports. This is not the case.

Therefore, remove all references to MAC address B and concepts depending on
it (like the addr_B_port, i.e., the port where the second MAC address
should be used; and notably the address A terminology). This allows to get
rid of the node merging code as well. As the supervision frame parsing was
mostly superficial afterwards and we don't do anything with the data, it is
removed as well. Proper parsing of supervision frames can be added at a
later point again (probably after reworking the whole rx path a bit).

Signed-off-by: Felix Maurer <fmaurer@redhat.com>
---
 net/hsr/hsr_debugfs.c  |   9 +-
 net/hsr/hsr_device.c   |  17 ++-
 net/hsr/hsr_forward.c  |   8 +-
 net/hsr/hsr_framereg.c | 250 +++++------------------------------------
 net/hsr/hsr_framereg.h |  14 +--
 net/hsr/hsr_main.c     |   6 +-
 net/hsr/hsr_main.h     |   5 +-
 net/hsr/hsr_netlink.c  |  18 +--
 8 files changed, 46 insertions(+), 281 deletions(-)

diff --git a/net/hsr/hsr_debugfs.c b/net/hsr/hsr_debugfs.c
index 5b2cfac3b2ba..c6dcc9cdddee 100644
--- a/net/hsr/hsr_debugfs.c
+++ b/net/hsr/hsr_debugfs.c
@@ -23,8 +23,7 @@ hsr_node_table_show(struct seq_file *sfp, void *data)
 
 	seq_printf(sfp, "Node Table entries for (%s) device\n",
 		   (priv->prot_version == PRP_V1 ? "PRP" : "HSR"));
-	seq_puts(sfp, "MAC-Address-A,    MAC-Address-B,    time_in[A], ");
-	seq_puts(sfp, "time_in[B], Address-B port, ");
+	seq_puts(sfp, "MAC-Address-A,    time_in[A], time_in[B], ");
 	if (priv->prot_version == PRP_V1)
 		seq_puts(sfp, "SAN-A, SAN-B, DAN-P\n");
 	else
@@ -33,13 +32,11 @@ hsr_node_table_show(struct seq_file *sfp, void *data)
 	rcu_read_lock();
 	list_for_each_entry_rcu(node, &priv->node_db, mac_list) {
 		/* skip self node */
-		if (hsr_addr_is_self(priv, node->macaddress_A))
+		if (hsr_addr_is_self(priv, node->macaddress))
 			continue;
-		seq_printf(sfp, "%pM ", &node->macaddress_A[0]);
-		seq_printf(sfp, "%pM ", &node->macaddress_B[0]);
+		seq_printf(sfp, "%pM ", &node->macaddress[0]);
 		seq_printf(sfp, "%10lx, ", node->time_in[HSR_PT_SLAVE_A]);
 		seq_printf(sfp, "%10lx, ", node->time_in[HSR_PT_SLAVE_B]);
-		seq_printf(sfp, "%14x, ", node->addr_B_port);
 
 		if (priv->prot_version == PRP_V1)
 			seq_printf(sfp, "%5x, %5x, %5x\n",
diff --git a/net/hsr/hsr_device.c b/net/hsr/hsr_device.c
index a52079eb2adb..35457016a841 100644
--- a/net/hsr/hsr_device.c
+++ b/net/hsr/hsr_device.c
@@ -341,9 +341,9 @@ static void send_hsr_supervision_frame(struct hsr_port *port,
 	hsr_stag->tlv.HSR_TLV_length = hsr->prot_version ?
 				sizeof(struct hsr_sup_payload) : 12;
 
-	/* Payload: MacAddressA / SAN MAC from ProxyNodeTable */
+	/* Payload: MacAddress / SAN MAC from ProxyNodeTable */
 	hsr_sp = skb_put(skb, sizeof(struct hsr_sup_payload));
-	ether_addr_copy(hsr_sp->macaddress_A, addr);
+	ether_addr_copy(hsr_sp->macaddress, addr);
 
 	if (hsr->redbox &&
 	    hsr_is_node_in_db(&hsr->proxy_node_db, addr)) {
@@ -353,7 +353,7 @@ static void send_hsr_supervision_frame(struct hsr_port *port,
 
 		/* Payload: MacAddressRedBox */
 		hsr_sp = skb_put(skb, sizeof(struct hsr_sup_payload));
-		ether_addr_copy(hsr_sp->macaddress_A, hsr->macaddress_redbox);
+		ether_addr_copy(hsr_sp->macaddress, hsr->macaddress_redbox);
 	}
 
 	if (skb_put_padto(skb, ETH_ZLEN)) {
@@ -393,9 +393,9 @@ static void send_prp_supervision_frame(struct hsr_port *master,
 	hsr_stag->tlv.HSR_TLV_type = PRP_TLV_LIFE_CHECK_DD;
 	hsr_stag->tlv.HSR_TLV_length = sizeof(struct hsr_sup_payload);
 
-	/* Payload: MacAddressA */
+	/* Payload: MacAddress */
 	hsr_sp = skb_put(skb, sizeof(struct hsr_sup_payload));
-	ether_addr_copy(hsr_sp->macaddress_A, master->dev->dev_addr);
+	ether_addr_copy(hsr_sp->macaddress, master->dev->dev_addr);
 
 	if (skb_put_padto(skb, ETH_ZLEN)) {
 		spin_unlock_bh(&hsr->seqnr_lock);
@@ -445,10 +445,10 @@ static void hsr_proxy_announce(struct timer_list *t)
 		goto done;
 
 	list_for_each_entry_rcu(node, &hsr->proxy_node_db, mac_list) {
-		if (hsr_addr_is_redbox(hsr, node->macaddress_A))
+		if (hsr_addr_is_redbox(hsr, node->macaddress))
 			continue;
 		hsr->proto_ops->send_sv_frame(interlink, &interval,
-					      node->macaddress_A);
+					      node->macaddress);
 	}
 
 	if (is_admin_up(interlink->dev)) {
@@ -745,8 +745,7 @@ int hsr_dev_finalize(struct net_device *hsr_dev, struct net_device *slave[2],
 	}
 
 	/* Make sure we recognize frames from ourselves in hsr_handle_frame() */
-	res = hsr_create_self_node(hsr, hsr_dev->dev_addr,
-				   slave[1]->dev_addr);
+	res = hsr_create_self_node(hsr, hsr_dev->dev_addr);
 	if (res < 0)
 		return res;
 
diff --git a/net/hsr/hsr_forward.c b/net/hsr/hsr_forward.c
index 0774981a65c1..96dd01b9ee82 100644
--- a/net/hsr/hsr_forward.c
+++ b/net/hsr/hsr_forward.c
@@ -28,9 +28,6 @@ struct hsr_node;
  * 2) Use the LifeCheck frames to detect ring breaks. I.e. if no LifeCheck
  *    frame is received from a particular node, we know something is wrong.
  *    We just register these (as with normal frames) and throw them away.
- *
- * 3) Allow different MAC addresses for the two slave interfaces, using the
- *    MacAddressA field.
  */
 static bool is_supervision_frame(struct hsr_priv *hsr, struct sk_buff *skb)
 {
@@ -143,7 +140,7 @@ static bool is_proxy_supervision_frame(struct hsr_priv *hsr,
 	 * frame with MAC addresses from own ProxyNodeTable.
 	 */
 	return hsr_is_node_in_db(&hsr->proxy_node_db,
-				 payload->macaddress_A);
+				 payload->macaddress);
 }
 
 static struct sk_buff *create_stripped_skb_hsr(struct sk_buff *skb_in,
@@ -403,7 +400,6 @@ static void hsr_deliver_master(struct sk_buff *skb, struct net_device *dev,
 	int res, recv_len;
 
 	was_multicast_frame = (skb->pkt_type == PACKET_MULTICAST);
-	hsr_addr_subst_source(node_src, skb);
 	skb_pull(skb, ETH_HLEN);
 	recv_len = skb->len;
 	res = netif_rx(skb);
@@ -421,8 +417,6 @@ static int hsr_xmit(struct sk_buff *skb, struct hsr_port *port,
 		    struct hsr_frame_info *frame)
 {
 	if (frame->port_rcv->type == HSR_PT_MASTER) {
-		hsr_addr_subst_dest(frame->node_src, skb, port);
-
 		/* Address substitution (IEC62439-3 pp 26, 50): replace mac
 		 * address of outgoing frame with that of the outgoing slave's.
 		 */
diff --git a/net/hsr/hsr_framereg.c b/net/hsr/hsr_framereg.c
index e44929871274..12c2b6c4bd66 100644
--- a/net/hsr/hsr_framereg.c
+++ b/net/hsr/hsr_framereg.c
@@ -38,9 +38,7 @@ bool hsr_addr_is_self(struct hsr_priv *hsr, unsigned char *addr)
 	if (!sn)
 		goto out;
 
-	if (ether_addr_equal(addr, sn->macaddress_A) ||
-	    ether_addr_equal(addr, sn->macaddress_B))
-		ret = true;
+	ret = ether_addr_equal(addr, sn->macaddress);
 out:
 	rcu_read_unlock();
 	return ret;
@@ -48,13 +46,13 @@ bool hsr_addr_is_self(struct hsr_priv *hsr, unsigned char *addr)
 
 /* Search for mac entry. Caller must hold rcu read lock.
  */
-static struct hsr_node *find_node_by_addr_A(struct list_head *node_db,
-					    const unsigned char addr[ETH_ALEN])
+static struct hsr_node *find_node_by_addr(struct list_head *node_db,
+					  const unsigned char addr[ETH_ALEN])
 {
 	struct hsr_node *node;
 
 	list_for_each_entry_rcu(node, node_db, mac_list) {
-		if (ether_addr_equal(node->macaddress_A, addr))
+		if (ether_addr_equal(node->macaddress, addr))
 			return node;
 	}
 
@@ -66,15 +64,14 @@ static struct hsr_node *find_node_by_addr_A(struct list_head *node_db,
 bool hsr_is_node_in_db(struct list_head *node_db,
 		       const unsigned char addr[ETH_ALEN])
 {
-	return !!find_node_by_addr_A(node_db, addr);
+	return !!find_node_by_addr(node_db, addr);
 }
 
 /* Helper for device init; the self_node is used in hsr_handle_frame() to
  * recognize frames from self that's been looped over the HSR ring.
  */
 int hsr_create_self_node(struct hsr_priv *hsr,
-			 const unsigned char addr_a[ETH_ALEN],
-			 const unsigned char addr_b[ETH_ALEN])
+			 const unsigned char addr[ETH_ALEN])
 {
 	struct hsr_self_node *sn, *old;
 
@@ -82,8 +79,7 @@ int hsr_create_self_node(struct hsr_priv *hsr,
 	if (!sn)
 		return -ENOMEM;
 
-	ether_addr_copy(sn->macaddress_A, addr_a);
-	ether_addr_copy(sn->macaddress_B, addr_b);
+	ether_addr_copy(sn->macaddress, addr);
 
 	spin_lock_bh(&hsr->list_lock);
 	old = rcu_replace_pointer(hsr->self_node, sn,
@@ -121,40 +117,6 @@ static void hsr_free_node_rcu(struct rcu_head *rn)
 	hsr_free_node(node);
 }
 
-static void hsr_lock_seq_out_pair(struct hsr_node *node_a,
-				  struct hsr_node *node_b)
-{
-	if (node_a == node_b) {
-		spin_lock_bh(&node_a->seq_out_lock);
-		return;
-	}
-
-	if (node_a < node_b) {
-		spin_lock_bh(&node_a->seq_out_lock);
-		spin_lock_nested(&node_b->seq_out_lock, SINGLE_DEPTH_NESTING);
-	} else {
-		spin_lock_bh(&node_b->seq_out_lock);
-		spin_lock_nested(&node_a->seq_out_lock, SINGLE_DEPTH_NESTING);
-	}
-}
-
-static void hsr_unlock_seq_out_pair(struct hsr_node *node_a,
-				    struct hsr_node *node_b)
-{
-	if (node_a == node_b) {
-		spin_unlock_bh(&node_a->seq_out_lock);
-		return;
-	}
-
-	if (node_a < node_b) {
-		spin_unlock(&node_b->seq_out_lock);
-		spin_unlock_bh(&node_a->seq_out_lock);
-	} else {
-		spin_unlock(&node_a->seq_out_lock);
-		spin_unlock_bh(&node_b->seq_out_lock);
-	}
-}
-
 void hsr_del_nodes(struct list_head *node_db)
 {
 	struct hsr_node *node;
@@ -179,7 +141,7 @@ void prp_handle_san_frame(bool san, enum hsr_port_type port,
 		node->san_b = true;
 }
 
-/* Allocate an hsr_node and add it to node_db. 'addr' is the node's address_A.
+/* Allocate an hsr_node and add it to node_db.
  */
 static struct hsr_node *hsr_add_node(struct hsr_priv *hsr,
 				     struct list_head *node_db,
@@ -195,7 +157,7 @@ static struct hsr_node *hsr_add_node(struct hsr_priv *hsr,
 	if (!new_node)
 		return NULL;
 
-	ether_addr_copy(new_node->macaddress_A, addr);
+	ether_addr_copy(new_node->macaddress, addr);
 	spin_lock_init(&new_node->seq_out_lock);
 
 	if (hsr->prot_version == PRP_V1)
@@ -224,9 +186,7 @@ static struct hsr_node *hsr_add_node(struct hsr_priv *hsr,
 	spin_lock_bh(&hsr->list_lock);
 	list_for_each_entry_rcu(node, node_db, mac_list,
 				lockdep_is_held(&hsr->list_lock)) {
-		if (ether_addr_equal(node->macaddress_A, addr))
-			goto out;
-		if (ether_addr_equal(node->macaddress_B, addr))
+		if (ether_addr_equal(node->macaddress, addr))
 			goto out;
 	}
 	list_add_tail_rcu(&new_node->mac_list, node_db);
@@ -267,12 +227,7 @@ struct hsr_node *hsr_get_node(struct hsr_port *port, struct list_head *node_db,
 	ethhdr = (struct ethhdr *)skb_mac_header(skb);
 
 	list_for_each_entry_rcu(node, node_db, mac_list) {
-		if (ether_addr_equal(node->macaddress_A, ethhdr->h_source)) {
-			if (hsr->proto_ops->update_san_info)
-				hsr->proto_ops->update_san_info(node, is_sup);
-			return node;
-		}
-		if (ether_addr_equal(node->macaddress_B, ethhdr->h_source)) {
+		if (ether_addr_equal(node->macaddress, ethhdr->h_source)) {
 			if (hsr->proto_ops->update_san_info)
 				hsr->proto_ops->update_san_info(node, is_sup);
 			return node;
@@ -281,7 +236,7 @@ struct hsr_node *hsr_get_node(struct hsr_port *port, struct list_head *node_db,
 
 	/* Check if required node is not in proxy nodes table */
 	list_for_each_entry_rcu(node, &hsr->proxy_node_db, mac_list) {
-		if (ether_addr_equal(node->macaddress_A, ethhdr->h_source)) {
+		if (ether_addr_equal(node->macaddress, ethhdr->h_source)) {
 			if (hsr->proto_ops->update_san_info)
 				hsr->proto_ops->update_san_info(node, is_sup);
 			return node;
@@ -363,26 +318,19 @@ VISIBLE_IF_KUNIT struct hsr_seq_block *hsr_get_seq_block(struct hsr_node *node,
 }
 EXPORT_SYMBOL_IF_KUNIT(hsr_get_seq_block);
 
-/* Use the Supervision frame's info about an eventual macaddress_B for merging
- * nodes that has previously had their macaddress_B registered as a separate
- * node.
+/* Use the Supervision frame's info to ensure the node is in the node table.
  */
 void hsr_handle_sup_frame(struct hsr_frame_info *frame)
 {
-	struct hsr_node *node_curr = frame->node_src;
 	struct hsr_port *port_rcv = frame->port_rcv;
-	struct hsr_seq_block *src_blk, *merge_blk;
 	struct hsr_priv *hsr = port_rcv->hsr;
-	struct hsr_sup_tlv *hsr_sup_tlv;
 	struct hsr_sup_payload *hsr_sp;
-	struct hsr_node *node_real;
 	struct sk_buff *skb = NULL;
 	struct list_head *node_db;
+	struct hsr_node *node;
 	struct ethhdr *ethhdr;
 	unsigned int total_pull_size = 0;
 	unsigned int pull_size = 0;
-	unsigned long idx;
-	int i;
 
 	/* Here either frame->skb_hsr or frame->skb_prp should be
 	 * valid as supervision frame always will have protocol
@@ -419,146 +367,19 @@ void hsr_handle_sup_frame(struct hsr_frame_info *frame)
 	/* get HSR sup payload */
 	hsr_sp = (struct hsr_sup_payload *)skb->data;
 
-	/* Merge node_curr (registered on macaddress_B) into node_real */
 	node_db = &port_rcv->hsr->node_db;
-	node_real = find_node_by_addr_A(node_db, hsr_sp->macaddress_A);
-	if (!node_real)
-		/* No frame received from AddrA of this node yet */
-		node_real = hsr_add_node(hsr, node_db, hsr_sp->macaddress_A,
-					 true, port_rcv->type);
-	if (!node_real)
-		goto done; /* No mem */
-	if (node_real == node_curr)
-		/* Node has already been merged */
-		goto done;
-
-	/* Leave the first HSR sup payload. */
-	pull_size = sizeof(struct hsr_sup_payload);
-	skb_pull(skb, pull_size);
-	total_pull_size += pull_size;
-
-	/* Get second supervision tlv */
-	hsr_sup_tlv = (struct hsr_sup_tlv *)skb->data;
-	/* And check if it is a redbox mac TLV */
-	if (hsr_sup_tlv->HSR_TLV_type == PRP_TLV_REDBOX_MAC) {
-		/* We could stop here after pushing hsr_sup_payload,
-		 * or proceed and allow macaddress_B and for redboxes.
+	node = find_node_by_addr(node_db, hsr_sp->macaddress);
+	if (!node)
+		/* Node doesn't appear in node_db yet, hsr_add_node() will
+		 * check again under lock before really adding.
 		 */
-		/* Sanity check length */
-		if (hsr_sup_tlv->HSR_TLV_length != 6)
-			goto done;
-
-		/* Leave the second HSR sup tlv. */
-		pull_size = sizeof(struct hsr_sup_tlv);
-		skb_pull(skb, pull_size);
-		total_pull_size += pull_size;
-
-		/* Get redbox mac address. */
-		hsr_sp = (struct hsr_sup_payload *)skb->data;
-
-		/* Check if redbox mac and node mac are equal. */
-		if (!ether_addr_equal(node_real->macaddress_A, hsr_sp->macaddress_A)) {
-			/* This is a redbox supervision frame for a VDAN! */
-			goto done;
-		}
-	}
-
-	ether_addr_copy(node_real->macaddress_B, ethhdr->h_source);
-	hsr_lock_seq_out_pair(node_real, node_curr);
-	for (i = 0; i < HSR_PT_PORTS; i++) {
-		if (!node_curr->time_in_stale[i] &&
-		    time_after(node_curr->time_in[i], node_real->time_in[i])) {
-			node_real->time_in[i] = node_curr->time_in[i];
-			node_real->time_in_stale[i] =
-						node_curr->time_in_stale[i];
-		}
-	}
-
-	xa_for_each(&node_curr->seq_blocks, idx, src_blk) {
-		if (hsr_seq_block_is_old(src_blk))
-			continue;
-
-		merge_blk = hsr_get_seq_block(node_real, src_blk->block_idx);
-		if (!merge_blk)
-			continue;
-		merge_blk->time = min(merge_blk->time, src_blk->time);
-		for (i = 0; i < node_real->seq_port_cnt; i++) {
-			bitmap_or(merge_blk->seq_nrs[i], merge_blk->seq_nrs[i],
-				  src_blk->seq_nrs[i], HSR_SEQ_BLOCK_SIZE);
-		}
-	}
-	hsr_unlock_seq_out_pair(node_real, node_curr);
-	node_real->addr_B_port = port_rcv->type;
+		hsr_add_node(hsr, node_db, hsr_sp->macaddress, true,
+			     port_rcv->type);
 
-	spin_lock_bh(&hsr->list_lock);
-	if (!node_curr->removed) {
-		list_del_rcu(&node_curr->mac_list);
-		node_curr->removed = true;
-		call_rcu(&node_curr->rcu_head, hsr_free_node_rcu);
-	}
-	spin_unlock_bh(&hsr->list_lock);
-
-done:
 	/* Push back here */
 	skb_push(skb, total_pull_size);
 }
 
-/* 'skb' is a frame meant for this host, that is to be passed to upper layers.
- *
- * If the frame was sent by a node's B interface, replace the source
- * address with that node's "official" address (macaddress_A) so that upper
- * layers recognize where it came from.
- */
-void hsr_addr_subst_source(struct hsr_node *node, struct sk_buff *skb)
-{
-	if (!skb_mac_header_was_set(skb)) {
-		WARN_ONCE(1, "%s: Mac header not set\n", __func__);
-		return;
-	}
-
-	memcpy(&eth_hdr(skb)->h_source, node->macaddress_A, ETH_ALEN);
-}
-
-/* 'skb' is a frame meant for another host.
- * 'port' is the outgoing interface
- *
- * Substitute the target (dest) MAC address if necessary, so the it matches the
- * recipient interface MAC address, regardless of whether that is the
- * recipient's A or B interface.
- * This is needed to keep the packets flowing through switches that learn on
- * which "side" the different interfaces are.
- */
-void hsr_addr_subst_dest(struct hsr_node *node_src, struct sk_buff *skb,
-			 struct hsr_port *port)
-{
-	struct hsr_node *node_dst;
-
-	if (!skb_mac_header_was_set(skb)) {
-		WARN_ONCE(1, "%s: Mac header not set\n", __func__);
-		return;
-	}
-
-	if (!is_unicast_ether_addr(eth_hdr(skb)->h_dest))
-		return;
-
-	node_dst = find_node_by_addr_A(&port->hsr->node_db,
-				       eth_hdr(skb)->h_dest);
-	if (!node_dst && port->hsr->redbox)
-		node_dst = find_node_by_addr_A(&port->hsr->proxy_node_db,
-					       eth_hdr(skb)->h_dest);
-
-	if (!node_dst) {
-		if (port->hsr->prot_version != PRP_V1 && net_ratelimit())
-			netdev_err(skb->dev, "%s: Unknown node\n", __func__);
-		return;
-	}
-	if (port->type != node_dst->addr_B_port)
-		return;
-
-	if (is_valid_ether_addr(node_dst->macaddress_B))
-		ether_addr_copy(eth_hdr(skb)->h_dest, node_dst->macaddress_B);
-}
-
 void hsr_register_frame_in(struct hsr_node *node, struct hsr_port *port,
 			   u16 sequence_nr)
 {
@@ -698,7 +519,7 @@ void hsr_prune_nodes(struct timer_list *t)
 		 * the master port. Thus the master node will be repeatedly
 		 * pruned leading to packet loss.
 		 */
-		if (hsr_addr_is_self(hsr, node->macaddress_A))
+		if (hsr_addr_is_self(hsr, node->macaddress))
 			continue;
 
 		/* Shorthand */
@@ -727,14 +548,14 @@ void hsr_prune_nodes(struct timer_list *t)
 			rcu_read_lock();
 			port = get_late_port(hsr, node);
 			if (port)
-				hsr_nl_ringerror(hsr, node->macaddress_A, port);
+				hsr_nl_ringerror(hsr, node->macaddress, port);
 			rcu_read_unlock();
 		}
 
 		/* Prune old entries */
 		if (time_is_before_jiffies(timestamp +
 				msecs_to_jiffies(HSR_NODE_FORGET_TIME))) {
-			hsr_nl_nodedown(hsr, node->macaddress_A);
+			hsr_nl_nodedown(hsr, node->macaddress);
 			if (!node->removed) {
 				list_del_rcu(&node->mac_list);
 				node->removed = true;
@@ -760,7 +581,7 @@ void hsr_prune_proxy_nodes(struct timer_list *t)
 	spin_lock_bh(&hsr->list_lock);
 	list_for_each_entry_safe(node, tmp, &hsr->proxy_node_db, mac_list) {
 		/* Don't prune RedBox node. */
-		if (hsr_addr_is_redbox(hsr, node->macaddress_A))
+		if (hsr_addr_is_redbox(hsr, node->macaddress))
 			continue;
 
 		timestamp = node->time_in[HSR_PT_INTERLINK];
@@ -768,7 +589,7 @@ void hsr_prune_proxy_nodes(struct timer_list *t)
 		/* Prune old entries */
 		if (time_is_before_jiffies(timestamp +
 				msecs_to_jiffies(HSR_PROXY_NODE_FORGET_TIME))) {
-			hsr_nl_nodedown(hsr, node->macaddress_A);
+			hsr_nl_nodedown(hsr, node->macaddress);
 			if (!node->removed) {
 				list_del_rcu(&node->mac_list);
 				node->removed = true;
@@ -794,13 +615,13 @@ void *hsr_get_next_node(struct hsr_priv *hsr, void *_pos,
 		node = list_first_or_null_rcu(&hsr->node_db,
 					      struct hsr_node, mac_list);
 		if (node)
-			ether_addr_copy(addr, node->macaddress_A);
+			ether_addr_copy(addr, node->macaddress);
 		return node;
 	}
 
 	node = _pos;
 	list_for_each_entry_continue_rcu(node, &hsr->node_db, mac_list) {
-		ether_addr_copy(addr, node->macaddress_A);
+		ether_addr_copy(addr, node->macaddress);
 		return node;
 	}
 
@@ -840,23 +661,18 @@ static void fill_last_seq_nrs(struct hsr_node *node, u16 *if1_seq, u16 *if2_seq)
 
 int hsr_get_node_data(struct hsr_priv *hsr,
 		      const unsigned char *addr,
-		      unsigned char addr_b[ETH_ALEN],
-		      unsigned int *addr_b_ifindex,
 		      int *if1_age,
 		      u16 *if1_seq,
 		      int *if2_age,
 		      u16 *if2_seq)
 {
 	struct hsr_node *node;
-	struct hsr_port *port;
 	unsigned long tdiff;
 
-	node = find_node_by_addr_A(&hsr->node_db, addr);
+	node = find_node_by_addr(&hsr->node_db, addr);
 	if (!node)
 		return -ENOENT;
 
-	ether_addr_copy(addr_b, node->macaddress_B);
-
 	tdiff = jiffies - node->time_in[HSR_PT_SLAVE_A];
 	if (node->time_in_stale[HSR_PT_SLAVE_A])
 		*if1_age = INT_MAX;
@@ -883,15 +699,5 @@ int hsr_get_node_data(struct hsr_priv *hsr,
 	if (hsr->prot_version != PRP_V1)
 		fill_last_seq_nrs(node, if1_seq, if2_seq);
 
-	if (node->addr_B_port != HSR_PT_NONE) {
-		port = hsr_port_get_hsr(hsr, node->addr_B_port);
-		if (port)
-			*addr_b_ifindex = port->dev->ifindex;
-		else
-			*addr_b_ifindex = -1;
-	} else {
-		*addr_b_ifindex = -1;
-	}
-
 	return 0;
 }
diff --git a/net/hsr/hsr_framereg.h b/net/hsr/hsr_framereg.h
index c65ecb925734..bb18b15c25ef 100644
--- a/net/hsr/hsr_framereg.h
+++ b/net/hsr/hsr_framereg.h
@@ -38,10 +38,6 @@ void hsr_handle_sup_frame(struct hsr_frame_info *frame);
 bool hsr_addr_is_self(struct hsr_priv *hsr, unsigned char *addr);
 bool hsr_addr_is_redbox(struct hsr_priv *hsr, unsigned char *addr);
 
-void hsr_addr_subst_source(struct hsr_node *node, struct sk_buff *skb);
-void hsr_addr_subst_dest(struct hsr_node *node_src, struct sk_buff *skb,
-			 struct hsr_port *port);
-
 void hsr_register_frame_in(struct hsr_node *node, struct hsr_port *port,
 			   u16 sequence_nr);
 int hsr_register_frame_out(struct hsr_port *port, struct hsr_frame_info *frame);
@@ -50,16 +46,13 @@ void hsr_prune_nodes(struct timer_list *t);
 void hsr_prune_proxy_nodes(struct timer_list *t);
 
 int hsr_create_self_node(struct hsr_priv *hsr,
-			 const unsigned char addr_a[ETH_ALEN],
-			 const unsigned char addr_b[ETH_ALEN]);
+			 const unsigned char addr[ETH_ALEN]);
 
 void *hsr_get_next_node(struct hsr_priv *hsr, void *_pos,
 			unsigned char addr[ETH_ALEN]);
 
 int hsr_get_node_data(struct hsr_priv *hsr,
 		      const unsigned char *addr,
-		      unsigned char addr_b[ETH_ALEN],
-		      unsigned int *addr_b_ifindex,
 		      int *if1_age,
 		      u16 *if1_seq,
 		      int *if2_age,
@@ -99,10 +92,7 @@ struct hsr_node {
 	struct list_head	mac_list;
 	/* Protect R/W access seq_blocks */
 	spinlock_t		seq_out_lock;
-	unsigned char		macaddress_A[ETH_ALEN];
-	unsigned char		macaddress_B[ETH_ALEN];
-	/* Local slave through which AddrB frames are received from this node */
-	enum hsr_port_type	addr_B_port;
+	unsigned char		macaddress[ETH_ALEN];
 	unsigned long		time_in[HSR_PT_PORTS];
 	bool			time_in_stale[HSR_PT_PORTS];
 	/* if the node is a SAN */
diff --git a/net/hsr/hsr_main.c b/net/hsr/hsr_main.c
index 202cf2a3625f..6708145cb423 100644
--- a/net/hsr/hsr_main.c
+++ b/net/hsr/hsr_main.c
@@ -88,12 +88,8 @@ static int hsr_netdev_notify(struct notifier_block *nb, unsigned long event,
 		}
 
 		/* Make sure we recognize frames from ourselves in hsr_handle_frame() */
-		port = hsr_port_get_hsr(hsr, HSR_PT_SLAVE_B);
 		res = hsr_create_self_node(hsr,
-					   master->dev->dev_addr,
-					   port ?
-						port->dev->dev_addr :
-						master->dev->dev_addr);
+					   master->dev->dev_addr);
 		if (res)
 			netdev_warn(master->dev,
 				    "Could not update HSR node address.\n");
diff --git a/net/hsr/hsr_main.h b/net/hsr/hsr_main.h
index 134e4f3fff60..78b24ee6beca 100644
--- a/net/hsr/hsr_main.h
+++ b/net/hsr/hsr_main.h
@@ -97,7 +97,7 @@ struct hsr_sup_tag {
 } __packed;
 
 struct hsr_sup_payload {
-	unsigned char	macaddress_A[ETH_ALEN];
+	unsigned char	macaddress[ETH_ALEN];
 } __packed;
 
 static inline void set_hsr_stag_path(struct hsr_sup_tag *hst, u16 path)
@@ -181,8 +181,7 @@ struct hsr_proto_ops {
 };
 
 struct hsr_self_node {
-	unsigned char	macaddress_A[ETH_ALEN];
-	unsigned char	macaddress_B[ETH_ALEN];
+	unsigned char	macaddress[ETH_ALEN];
 	struct rcu_head	rcu_head;
 };
 
diff --git a/net/hsr/hsr_netlink.c b/net/hsr/hsr_netlink.c
index 8099f2069a74..958b7b3c5be5 100644
--- a/net/hsr/hsr_netlink.c
+++ b/net/hsr/hsr_netlink.c
@@ -327,12 +327,10 @@ static int hsr_get_node_status(struct sk_buff *skb_in, struct genl_info *info)
 	void *msg_head;
 	struct hsr_priv *hsr;
 	struct hsr_port *port;
-	unsigned char hsr_node_addr_b[ETH_ALEN];
 	int hsr_node_if1_age;
 	u16 hsr_node_if1_seq;
 	int hsr_node_if2_age;
 	u16 hsr_node_if2_seq;
-	int addr_b_ifindex;
 	int res;
 
 	if (!info)
@@ -376,8 +374,6 @@ static int hsr_get_node_status(struct sk_buff *skb_in, struct genl_info *info)
 	res = hsr_get_node_data(hsr,
 				(unsigned char *)
 				nla_data(info->attrs[HSR_A_NODE_ADDR]),
-					 hsr_node_addr_b,
-					 &addr_b_ifindex,
 					 &hsr_node_if1_age,
 					 &hsr_node_if1_seq,
 					 &hsr_node_if2_age,
@@ -390,18 +386,6 @@ static int hsr_get_node_status(struct sk_buff *skb_in, struct genl_info *info)
 	if (res < 0)
 		goto nla_put_failure;
 
-	if (addr_b_ifindex > -1) {
-		res = nla_put(skb_out, HSR_A_NODE_ADDR_B, ETH_ALEN,
-			      hsr_node_addr_b);
-		if (res < 0)
-			goto nla_put_failure;
-
-		res = nla_put_u32(skb_out, HSR_A_ADDR_B_IFINDEX,
-				  addr_b_ifindex);
-		if (res < 0)
-			goto nla_put_failure;
-	}
-
 	res = nla_put_u32(skb_out, HSR_A_IF1_AGE, hsr_node_if1_age);
 	if (res < 0)
 		goto nla_put_failure;
@@ -450,7 +434,7 @@ static int hsr_get_node_status(struct sk_buff *skb_in, struct genl_info *info)
 	return res;
 }
 
-/* Get a list of MacAddressA of all nodes known to this node (including self).
+/* Get a list of MAC addresses of all nodes known to this node (including self).
  */
 static int hsr_get_node_list(struct sk_buff *skb_in, struct genl_info *info)
 {
-- 
2.55.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-07-14 10:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-14 10:52 [RFC net-next 0/2] hsr: Use only one MAC address per node Felix Maurer
2026-07-14 10:52 ` [RFC net-next 1/2] hsr: Set equal MAC addresses on port A and B for HSR Felix Maurer
2026-07-14 10:52 ` [RFC net-next 2/2] hsr: Remove second MAC address from node table Felix Maurer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox