All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
	edumazet@google.com
Cc: Michal Jaron <michalx.jaron@intel.com>,
	netdev@vger.kernel.org, anthony.l.nguyen@intel.com,
	Przemyslaw Patynowski <przemyslawx.patynowski@intel.com>,
	Kamil Maziarz <kamil.maziarz@intel.com>,
	Konrad Jankowski <konrad0.jankowski@intel.com>
Subject: [PATCH net 3/3] iavf: Fix VF driver counting VLAN 0 filters
Date: Tue,  8 Nov 2022 15:51:16 -0800	[thread overview]
Message-ID: <20221108235116.3522941-4-anthony.l.nguyen@intel.com> (raw)
In-Reply-To: <20221108235116.3522941-1-anthony.l.nguyen@intel.com>

From: Michal Jaron <michalx.jaron@intel.com>

VF driver mistakenly counts VLAN 0 filters, when no PF driver
counts them.
Do not count VLAN 0 filters, when VLAN_V2 is engaged.
Counting those filters in, will affect filters size by -1, when
sending batched VLAN addition message.

Fixes: 968996c070ef ("iavf: Fix VLAN_V2 addition/rejection")
Signed-off-by: Przemyslaw Patynowski <przemyslawx.patynowski@intel.com>
Signed-off-by: Michal Jaron <michalx.jaron@intel.com>
Signed-off-by: Kamil Maziarz <kamil.maziarz@intel.com>
Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/iavf/iavf_virtchnl.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/intel/iavf/iavf_virtchnl.c b/drivers/net/ethernet/intel/iavf/iavf_virtchnl.c
index 5a9e6563923e..24a701fd140e 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_virtchnl.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_virtchnl.c
@@ -2438,6 +2438,8 @@ 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.35.1


      parent reply	other threads:[~2022-11-08 23:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-08 23:51 [PATCH net 0/3][pull request] Intel Wired LAN Driver Updates 2022-11-08 (ice, iavf) Tony Nguyen
2022-11-08 23:51 ` [PATCH net 1/3] ice: Fix spurious interrupt during removal of trusted VF Tony Nguyen
2022-11-08 23:51 ` [PATCH net 2/3] ice: use int for n_per_out loop Tony Nguyen
2022-11-09 16:37   ` Alexander Lobakin
2022-11-09 20:19     ` Jacob Keller
2022-11-08 23:51 ` Tony Nguyen [this message]

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=20221108235116.3522941-4-anthony.l.nguyen@intel.com \
    --to=anthony.l.nguyen@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kamil.maziarz@intel.com \
    --cc=konrad0.jankowski@intel.com \
    --cc=kuba@kernel.org \
    --cc=michalx.jaron@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=przemyslawx.patynowski@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.