intel-wired-lan.lists.osuosl.org archive mirror
 help / color / mirror / Atom feed
* [Intel-wired-lan] [PATCH v2] iavf/iavf_main: actually log ->src mask when talking about it
@ 2022-12-20  6:32 Daniil Tatianin
  2022-12-20  7:50 ` Michal Swiatkowski
  0 siblings, 1 reply; 2+ messages in thread
From: Daniil Tatianin @ 2022-12-20  6:32 UTC (permalink / raw)
  To: Jesse Brandeburg
  Cc: intel-wired-lan, linux-kernel, Eric Dumazet, Tony Nguyen,
	Jeff Kirsher, netdev, Jakub Kicinski, Daniil Tatianin,
	Paolo Abeni

This fixes a copy-paste issue where dev_err would log the dst mask even
though it is clearly talking about src.

Found by Linux Verification Center (linuxtesting.org) with the SVACE
static analysis tool.

Fixes: 0075fa0fadd0 ("i40evf: Add support to apply cloud filters")
Signed-off-by: Daniil Tatianin <d-tatianin@yandex-team.ru>
---
 drivers/net/ethernet/intel/iavf/iavf_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c
index c4e451ef7942..adc02adef83a 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_main.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
@@ -3850,7 +3850,7 @@ static int iavf_parse_cls_flower(struct iavf_adapter *adapter,
 				field_flags |= IAVF_CLOUD_FIELD_IIP;
 			} else {
 				dev_err(&adapter->pdev->dev, "Bad ip src mask 0x%08x\n",
-					be32_to_cpu(match.mask->dst));
+					be32_to_cpu(match.mask->src));
 				return -EINVAL;
 			}
 		}
-- 
2.25.1

_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

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

* Re: [Intel-wired-lan] [PATCH v2] iavf/iavf_main: actually log ->src mask when talking about it
  2022-12-20  6:32 [Intel-wired-lan] [PATCH v2] iavf/iavf_main: actually log ->src mask when talking about it Daniil Tatianin
@ 2022-12-20  7:50 ` Michal Swiatkowski
  0 siblings, 0 replies; 2+ messages in thread
From: Michal Swiatkowski @ 2022-12-20  7:50 UTC (permalink / raw)
  To: Daniil Tatianin
  Cc: intel-wired-lan, Jesse Brandeburg, linux-kernel, Eric Dumazet,
	Tony Nguyen, Jeff Kirsher, netdev, Jakub Kicinski, Paolo Abeni

On Tue, Dec 20, 2022 at 09:32:46AM +0300, Daniil Tatianin wrote:
> This fixes a copy-paste issue where dev_err would log the dst mask even
> though it is clearly talking about src.
> 
> Found by Linux Verification Center (linuxtesting.org) with the SVACE
> static analysis tool.
> 
> Fixes: 0075fa0fadd0 ("i40evf: Add support to apply cloud filters")
> Signed-off-by: Daniil Tatianin <d-tatianin@yandex-team.ru>
> ---
>  drivers/net/ethernet/intel/iavf/iavf_main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c
> index c4e451ef7942..adc02adef83a 100644
> --- a/drivers/net/ethernet/intel/iavf/iavf_main.c
> +++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
> @@ -3850,7 +3850,7 @@ static int iavf_parse_cls_flower(struct iavf_adapter *adapter,
>  				field_flags |= IAVF_CLOUD_FIELD_IIP;
>  			} else {
>  				dev_err(&adapter->pdev->dev, "Bad ip src mask 0x%08x\n",
> -					be32_to_cpu(match.mask->dst));
> +					be32_to_cpu(match.mask->src));
>  				return -EINVAL;
>  			}
>  		}
> -- 
> 2.25.1

Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>

It is good practise to include changelog in message when You send
another version. For example:

v1:
 * change fix tag to 12 chars
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

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

end of thread, other threads:[~2022-12-20 16:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-20  6:32 [Intel-wired-lan] [PATCH v2] iavf/iavf_main: actually log ->src mask when talking about it Daniil Tatianin
2022-12-20  7:50 ` Michal Swiatkowski

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).