diff mbox series

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

Message ID 20240524093719.68353-1-danishanwar@ti.com (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series [net] net: ti: icssg-prueth: Fix start counter for ft1 filter | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag present in non-next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit fail Errors and warnings before: 45 this patch: 45
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 9 of 9 maintainers
netdev/build_clang fail Errors and warnings before: 36 this patch: 36
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn fail Errors and warnings before: 45 this patch: 45
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

MD Danish Anwar May 24, 2024, 9:37 a.m. UTC
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 6 in
icssg_ft1_set_mac_addr().

Fixes: e9b4ece7d74b ("net: ti: icssg-prueth: Add Firmware config and classification APIs.")
Signed-off-by: MD Danish Anwar <danishanwar@ti.com>
---
 drivers/net/ethernet/ti/icssg/icssg_classifier.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


base-commit: 66ad4829ddd0b5540dc0b076ef2818e89c8f720e

Comments

Florian Fainelli May 24, 2024, 10:05 p.m. UTC | #1
On 5/24/24 02:37, MD Danish Anwar 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 6 in
> icssg_ft1_set_mac_addr().
> 
> Fixes: e9b4ece7d74b ("net: ti: icssg-prueth: Add Firmware config and classification APIs.")
> Signed-off-by: MD Danish Anwar <danishanwar@ti.com>

Would using ETH_ALEN not be a bit clearer here?

> ---
>   drivers/net/ethernet/ti/icssg/icssg_classifier.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/ti/icssg/icssg_classifier.c b/drivers/net/ethernet/ti/icssg/icssg_classifier.c
> index 79ba47bb3602..8dee737639b6 100644
> --- a/drivers/net/ethernet/ti/icssg/icssg_classifier.c
> +++ b/drivers/net/ethernet/ti/icssg/icssg_classifier.c
> @@ -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, 6, 6);
>   	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: 66ad4829ddd0b5540dc0b076ef2818e89c8f720e
MD Danish Anwar May 27, 2024, 6:23 a.m. UTC | #2
On 25/05/24 3:35 am, Florian Fainelli wrote:
> On 5/24/24 02:37, MD Danish Anwar 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 6 in
>> icssg_ft1_set_mac_addr().
>>
>> Fixes: e9b4ece7d74b ("net: ti: icssg-prueth: Add Firmware config and
>> classification APIs.")
>> Signed-off-by: MD Danish Anwar <danishanwar@ti.com>
> 
> Would using ETH_ALEN not be a bit clearer here?
> 

Yes that would make more sense. I will change it and post v2.

>> ---
>>   drivers/net/ethernet/ti/icssg/icssg_classifier.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/ethernet/ti/icssg/icssg_classifier.c
>> b/drivers/net/ethernet/ti/icssg/icssg_classifier.c
>> index 79ba47bb3602..8dee737639b6 100644
>> --- a/drivers/net/ethernet/ti/icssg/icssg_classifier.c
>> +++ b/drivers/net/ethernet/ti/icssg/icssg_classifier.c
>> @@ -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, 6, 6);
>>       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: 66ad4829ddd0b5540dc0b076ef2818e89c8f720e
>
diff mbox series

Patch

diff --git a/drivers/net/ethernet/ti/icssg/icssg_classifier.c b/drivers/net/ethernet/ti/icssg/icssg_classifier.c
index 79ba47bb3602..8dee737639b6 100644
--- a/drivers/net/ethernet/ti/icssg/icssg_classifier.c
+++ b/drivers/net/ethernet/ti/icssg/icssg_classifier.c
@@ -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, 6, 6);
 	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);