All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Tony Nguyen <anthony.l.nguyen@intel.com>
Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
	edumazet@google.com, netdev@vger.kernel.org,
	Ahmed Zaki <ahmed.zaki@intel.com>,
	Michal Kubiak <michal.kubiak@intel.com>,
	Rafal Romanowski <rafal.romanowski@intel.com>
Subject: Re: [PATCH net 3/3] iavf: do not track VLAN 0 filters
Date: Wed, 15 Mar 2023 10:48:56 +0200	[thread overview]
Message-ID: <20230315084856.GN36557@unreal> (raw)
In-Reply-To: <20230314174423.1048526-4-anthony.l.nguyen@intel.com>

On Tue, Mar 14, 2023 at 10:44:23AM -0700, Tony Nguyen wrote:
> From: Ahmed Zaki <ahmed.zaki@intel.com>
> 
> When an interface with the maximum number of VLAN filters is brought up,
> a spurious error is logged:
> 
>     [257.483082] 8021q: adding VLAN 0 to HW filter on device enp0s3
>     [257.483094] iavf 0000:00:03.0 enp0s3: Max allowed VLAN filters 8. Remove existing VLANs or disable filtering via Ethtool if supported.
> 
> The VF driver complains that it cannot add the VLAN 0 filter.
> 
> On the other hand, the PF driver always adds VLAN 0 filter on VF
> initialization. The VF does not need to ask the PF for that filter at
> all.
> 
> Fix the error by not tracking VLAN 0 filters altogether. With that, the
> check added by commit 0e710a3ffd0c ("iavf: Fix VF driver counting VLAN 0
> filters") in iavf_virtchnl.c is useless and might be confusing if left as
> it suggests that we track VLAN 0.
> 
> Fixes: 0e710a3ffd0c ("iavf: Fix VF driver counting VLAN 0 filters")
> Signed-off-by: Ahmed Zaki <ahmed.zaki@intel.com>
> Reviewed-by: Michal Kubiak <michal.kubiak@intel.com>
> Tested-by: Rafal Romanowski <rafal.romanowski@intel.com>
> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
> ---
>  drivers/net/ethernet/intel/iavf/iavf_main.c     | 4 ++++
>  drivers/net/ethernet/intel/iavf/iavf_virtchnl.c | 2 --
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c
> index 3273aeb8fa67..eb8f944276ff 100644
> --- a/drivers/net/ethernet/intel/iavf/iavf_main.c
> +++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
> @@ -893,6 +893,10 @@ static int iavf_vlan_rx_add_vid(struct net_device *netdev,
>  {
>  	struct iavf_adapter *adapter = netdev_priv(netdev);
>  
> +	/* Do not track VLAN 0 filter, always added by the PF on VF init */
> +	if (!vid)
> +		return 0;

I would expect similar check in iavf_vlan_rx_kill_vid(),

Thanks

> +
>  	if (!VLAN_FILTERING_ALLOWED(adapter))
>  		return -EIO;
>  
> diff --git a/drivers/net/ethernet/intel/iavf/iavf_virtchnl.c b/drivers/net/ethernet/intel/iavf/iavf_virtchnl.c
> index 6d23338604bb..4e17d006c52d 100644
> --- a/drivers/net/ethernet/intel/iavf/iavf_virtchnl.c
> +++ b/drivers/net/ethernet/intel/iavf/iavf_virtchnl.c
> @@ -2446,8 +2446,6 @@ void iavf_virtchnl_completion(struct iavf_adapter *adapter,
>  		list_for_each_entry(f, &adapter->vlan_filter_list, list) {
>  			if (f->is_new_vlan) {
>  				f->is_new_vlan = false;
> -				if (!f->vlan.vid)
> -					continue;
>  				if (f->vlan.tpid == ETH_P_8021Q)
>  					set_bit(f->vlan.vid,
>  						adapter->vsi.active_cvlans);
> -- 
> 2.38.1
> 

  reply	other threads:[~2023-03-15  8:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-14 17:44 [PATCH net 0/3][pull request] Intel Wired LAN Driver Updates 2023-03-14 (iavf) Tony Nguyen
2023-03-14 17:44 ` [PATCH net 1/3] iavf: fix inverted Rx hash condition leading to disabled hash Tony Nguyen
2023-03-15  8:49   ` Leon Romanovsky
2023-03-14 17:44 ` [PATCH net 2/3] iavf: fix non-tunneled IPv6 UDP packet type and hashing Tony Nguyen
2023-03-15  8:50   ` Leon Romanovsky
2023-03-14 17:44 ` [PATCH net 3/3] iavf: do not track VLAN 0 filters Tony Nguyen
2023-03-15  8:48   ` Leon Romanovsky [this message]
2023-03-16 13:15     ` Ahmed Zaki
2023-03-16 20:59       ` Jakub Kicinski
2023-03-16 21:11         ` Ahmed Zaki
2023-03-19  7:20         ` Leon Romanovsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230315084856.GN36557@unreal \
    --to=leon@kernel.org \
    --cc=ahmed.zaki@intel.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=michal.kubiak@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rafal.romanowski@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.