Skip to contentSkip to conversation

net: ti: icssg-prueth: Fix start counter for ft1 filter

PATCH Applied MD Danish Anwar 2 participants 2 messages May 27, 2024 – May 28, 2024

Subsystems (3)
lore
Share & tools
lore

MD Danish Anwar

author reviewer
#0 lore raw

PATCH v2 1/1 net: ti: icssg-prueth: Fix start counter for ft1 filter

The start counter for FT1 filter is wrongly set to 0 in the driver. FT1 is used for source address violation (SAV) check and source address starts at Byte 6 not Byte 0. Fix this by changing start counter to ETH_ALEN in icssg_ft1_set_mac_addr().

Fixes e9b4ece7d74b ("net: ti: icssg-prueth: Add Firmware config and classification APIs.")

---
Cc: Florian Fainelli <[email protected]>

Changes from v1 to v2:
*) Using ETH_ALEN instead of hardcoding the values to 6 as suggested by
Florian Fainelli <[email protected]>

v1: https://lore.kernel.org/all/[email protected]/

 drivers/net/ethernet/ti/icssg/icssg_classifier.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/ti/icssg/icssg_classifier.c +1 -1
index 79ba47bb3602..f7d21da1a0fb 100644
@@ -455,7 +455,7 @@ void icssg_ft1_set_mac_addr(struct regmap *miig_rt, int slice, u8 *mac_addr)
 {
 	const u8 mask_addr[] = { 0, 0, 0, 0, 0, 0, };
 
-	rx_class_ft1_set_start_len(miig_rt, slice, 0, 6);
+	rx_class_ft1_set_start_len(miig_rt, slice, ETH_ALEN, ETH_ALEN);
 	rx_class_ft1_set_da(miig_rt, slice, 0, mac_addr);
 	rx_class_ft1_set_da_mask(miig_rt, slice, 0, mask_addr);
 	rx_class_ft1_cfg_set_type(miig_rt, slice, 0, FT1_CFG_TYPE_EQ);

base-commit: 0b4f5add9fa59bfd42c1030f572db2e4c395181b

Signature · 1 line
2.34.1
#1 lore raw
This patch was applied to netdev/net.git (main) by Paolo Abeni <[email protected]>:

Hello:

This patch was applied to netdev/net.git (main)
by Paolo Abeni <[email protected]>:

Quoted 9 lines · On Mon, 27 May 2024 12:00:15 +0530 you wrote:

The start counter for FT1 filter is wrongly set to 0 in the driver. FT1 is used for source address violation (SAV) check and source address starts at Byte 6 not Byte 0. Fix this by changing start counter to ETH_ALEN in icssg_ft1_set_mac_addr().

Fixes e9b4ece7d74b ("net: ti: icssg-prueth: Add Firmware config and classification APIs.")

[...]

Here is the summary with links:
- [net,v2] net: ti: icssg-prueth: Fix start counter for ft1 filter

    https://git.kernel.org/netdev/net/c/56a5cf538c3f

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html