Skip to content

Commit

Permalink
net:ethernet:adi:adin1110: Fix forwarding offload
Browse files Browse the repository at this point in the history
[ Upstream commit 32530db ]

Currently, when a new fdb entry is added (with both ports of the
ADIN2111 bridged), the driver configures the MAC filters for the wrong
port, which results in the forwarding being done by the host, and not
actually hardware offloaded.

The ADIN2111 offloads the forwarding by setting filters on the
destination MAC address of incoming frames. Based on these, they may be
routed to the other port. Thus, if a frame has to be forwarded from port
1 to port 2, the required configuration for the ADDR_FILT_UPRn register
should set the APPLY2PORT1 bit (instead of APPLY2PORT2, as it's
currently the case).

Fixes: bc93e19 ("net: ethernet: adi: Add ADIN1110 support")
Signed-off-by: Ciprian Regus <ciprian.regus@analog.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
CiprianRegus authored and gregkh committed Sep 19, 2023
1 parent 499d86b commit 93546f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/adi/adin1110.c
Expand Up @@ -1385,7 +1385,7 @@ static int adin1110_fdb_add(struct adin1110_port_priv *port_priv,
return -ENOMEM;

other_port = priv->ports[!port_priv->nr];
port_rules = adin1110_port_rules(port_priv, false, true);
port_rules = adin1110_port_rules(other_port, false, true);
eth_broadcast_addr(mask);

return adin1110_write_mac_address(other_port, mac_nr, (u8 *)fdb->addr,
Expand Down

0 comments on commit 93546f9

Please sign in to comment.