netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* PATCH: i40e Improve trusted VF MAC addresses logging when limit is reached
@ 2025-07-31 14:06 Dave Hill
  2025-07-31 14:48 ` Dawid Osuchowski
  0 siblings, 1 reply; 2+ messages in thread
From: Dave Hill @ 2025-07-31 14:06 UTC (permalink / raw)
  To: netdev

From: David Hill<dhill@redhat.com>

When a VF reaches the limit introduced in this commit [1], the host reports an error in the syslog but doesn't mention which VF reached its limit and what the limit is actually is which makes troubleshooting of networking issue a bit tedious.   This commit simply improves this error reporting by adding which VF number has reached a limit and what that limit is.

Signed-off-by: David Hill<dhill@redhat.com>

diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c 
b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c

index 9b8efdeafbcf..dc0e7a80d83a 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
@@ -2953,7 +2953,8 @@ static inline int i40e_check_vf_permission(struct 
i40e_vf *vf,
I40E_VC_MAX_MACVLAN_PER_TRUSTED_VF(pf->num_alloc_vfs,
hw->num_ports)) {
                         dev_err(&pf->pdev->dev,
-                               "Cannot add more MAC addresses, trusted 
VF exhausted it's resources\n");
+                               "Cannot add more MAC addresses, trusted 
VF %d uses %d out of %d MAC addresses\n", vf->vf_id, 
i40e_count_filters(vsi) +
+          mac2add_cnt, 
I40E_VC_MAX_MACVLAN_PER_TRUSTED_VF(pf->num_alloc_vfs,num_ports)));
                         return -EPERM;
                 }
         }

[1] commit cfb1d572c986a39fd288f48a6305d81e6f8d04a3
Author: Karen Sornek <karen.sornek@intel.com>
Date:   Thu Jun 17 09:19:26 2021 +0200


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

* Re: PATCH: i40e Improve trusted VF MAC addresses logging when limit is reached
  2025-07-31 14:06 PATCH: i40e Improve trusted VF MAC addresses logging when limit is reached Dave Hill
@ 2025-07-31 14:48 ` Dawid Osuchowski
  0 siblings, 0 replies; 2+ messages in thread
From: Dawid Osuchowski @ 2025-07-31 14:48 UTC (permalink / raw)
  To: Dave Hill, netdev

Hey David,

On 2025-07-31 4:06 PM, Dave Hill wrote:
> From: David Hill<dhill@redhat.com>

s/David Hill<dhill@redhat.com>/David Hill <dhill@redhat.com>/g

The patch formatting is really mangled and not possible to be applied 
with standard tooling.

It is advised to create patches using `git format-patch` and use `git 
send-email` tool for patch submissions, as it ensures proper formatting.

It is also advised to add the maintainers for a given piece of code to 
To: or Cc:, you can find them using ./scripts/get_maintainer.pl

Please take a look at 
https://docs.kernel.org/process/submitting-patches.html on information 
how to submit patches properly.

> When a VF reaches the limit introduced in this commit [1], the host 
> reports an error in the syslog but doesn't mention which VF reached its 
> limit and what the limit is actually is which makes troubleshooting of 
> networking issue a bit tedious.   This commit simply improves this error 
> reporting by adding which VF number has reached a limit and what that 
> limit is.
> 
> Signed-off-by: David Hill<dhill@redhat.com>
> 
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/ 
> drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
> 
> index 9b8efdeafbcf..dc0e7a80d83a 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
> @@ -2953,7 +2953,8 @@ static inline int i40e_check_vf_permission(struct 
> i40e_vf *vf,
> I40E_VC_MAX_MACVLAN_PER_TRUSTED_VF(pf->num_alloc_vfs,
> hw->num_ports)) {
>                          dev_err(&pf->pdev->dev,
> -                               "Cannot add more MAC addresses, trusted 
> VF exhausted it's resources\n");
> +                               "Cannot add more MAC addresses, trusted 
> VF %d uses %d out of %d MAC addresses\n", vf->vf_id, 
> i40e_count_filters(vsi) +
> +          mac2add_cnt, I40E_VC_MAX_MACVLAN_PER_TRUSTED_VF(pf- 
>  >num_alloc_vfs,num_ports)));
>                          return -EPERM;
>                  }
>          }
> 
> [1] commit cfb1d572c986a39fd288f48a6305d81e6f8d04a3
> Author: Karen Sornek <karen.sornek@intel.com>
> Date:   Thu Jun 17 09:19:26 2021 +0200

The above should be just below your signoff tag as follows:

Signed-off-by: David Hill <dhill@redhat.com>
---
[1] commit cfb1d572c986a39fd288f48a6305d81e6f8d04a3
Author: Karen Sornek <karen.sornek@intel.com>
Date:   Thu Jun 17 09:19:26 2021 +0200
---

Best regards,
Dawid

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

end of thread, other threads:[~2025-07-31 14:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-31 14:06 PATCH: i40e Improve trusted VF MAC addresses logging when limit is reached Dave Hill
2025-07-31 14:48 ` Dawid Osuchowski

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