* [net] net:ethernet:adi:adin1110: Fix forwarding offload
@ 2023-09-08 12:58 Ciprian Regus
2023-09-10 15:04 ` Simon Horman
0 siblings, 1 reply; 2+ messages in thread
From: Ciprian Regus @ 2023-09-08 12:58 UTC (permalink / raw)
To: linux-kernel
Cc: Ciprian Regus, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Alexandru Tachici, Yang Yingliang,
Amit Kumar Mahapatra, Andrew Lunn, Lennart Franzen, netdev
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: bc93e19d088b ("net: ethernet: adi: Add ADIN1110 support")
Signed-off-by: Ciprian Regus <ciprian.regus@analog.com>
---
drivers/net/ethernet/adi/adin1110.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/adi/adin1110.c b/drivers/net/ethernet/adi/adin1110.c
index 1c009b485188..ca66b747b7c5 100644
--- a/drivers/net/ethernet/adi/adin1110.c
+++ b/drivers/net/ethernet/adi/adin1110.c
@@ -1387,3 +1387,3 @@ static int adin1110_fdb_add(struct adin1110_port_priv *port_priv,
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);
--
2.39.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [net] net:ethernet:adi:adin1110: Fix forwarding offload
2023-09-08 12:58 [net] net:ethernet:adi:adin1110: Fix forwarding offload Ciprian Regus
@ 2023-09-10 15:04 ` Simon Horman
0 siblings, 0 replies; 2+ messages in thread
From: Simon Horman @ 2023-09-10 15:04 UTC (permalink / raw)
To: Ciprian Regus
Cc: linux-kernel, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Alexandru Tachici, Yang Yingliang,
Amit Kumar Mahapatra, Andrew Lunn, Lennart Franzen, netdev
On Fri, Sep 08, 2023 at 03:58:08PM +0300, Ciprian Regus wrote:
> 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: bc93e19d088b ("net: ethernet: adi: Add ADIN1110 support")
> Signed-off-by: Ciprian Regus <ciprian.regus@analog.com>
I think the subject prefix might be better written as:
'net: ethernet: adi: adin1110: '.
But that notwithstanding this patch looks good to me.
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-09-10 15:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-08 12:58 [net] net:ethernet:adi:adin1110: Fix forwarding offload Ciprian Regus
2023-09-10 15:04 ` Simon Horman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).