netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Brett Creeley <brett.creeley@intel.com>,
	netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
	Tony Nguyen <anthony.l.nguyen@intel.com>,
	Andrew Bowers <andrewx.bowers@intel.com>,
	Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next v2 09/15] ice: Correct setting VLAN pruning
Date: Tue, 10 Mar 2020 13:45:28 -0700	[thread overview]
Message-ID: <20200310204534.2071912-10-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <20200310204534.2071912-1-jeffrey.t.kirsher@intel.com>

From: Brett Creeley <brett.creeley@intel.com>

VLAN pruning is not always being set correctly due to a previous change
that set Tx antispoof off. ice_vsi_is_vlan_pruning_ena() currently checks
for both Tx antispoof and Rx pruning. The expectation for this function is
to only check Rx pruning so fix the check.

Fixes: cd6d6b83316a ("ice: Fix VF spoofchk")
Signed-off-by: Brett Creeley <brett.creeley@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/ice/ice_lib.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c
index 9230abdb4ee8..1ee6a86f507d 100644
--- a/drivers/net/ethernet/intel/ice/ice_lib.c
+++ b/drivers/net/ethernet/intel/ice/ice_lib.c
@@ -1877,20 +1877,14 @@ int ice_vsi_stop_xdp_tx_rings(struct ice_vsi *vsi)
  * ice_vsi_is_vlan_pruning_ena - check if VLAN pruning is enabled or not
  * @vsi: VSI to check whether or not VLAN pruning is enabled.
  *
- * returns true if Rx VLAN pruning and Tx VLAN anti-spoof is enabled and false
- * otherwise.
+ * returns true if Rx VLAN pruning is enabled and false otherwise.
  */
 bool ice_vsi_is_vlan_pruning_ena(struct ice_vsi *vsi)
 {
-	u8 rx_pruning = ICE_AQ_VSI_SW_FLAG_RX_VLAN_PRUNE_ENA;
-	u8 tx_pruning = ICE_AQ_VSI_SEC_TX_VLAN_PRUNE_ENA <<
-		ICE_AQ_VSI_SEC_TX_PRUNE_ENA_S;
-
 	if (!vsi)
 		return false;
 
-	return ((vsi->info.sw_flags2 & rx_pruning) &&
-		(vsi->info.sec_flags & tx_pruning));
+	return (vsi->info.sw_flags2 & ICE_AQ_VSI_SW_FLAG_RX_VLAN_PRUNE_ENA);
 }
 
 /**
-- 
2.24.1


  parent reply	other threads:[~2020-03-10 20:46 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-10 20:45 [net-next v2 00/15][pull request] 100GbE Intel Wired LAN Driver Updates 2020-03-10 Jeff Kirsher
2020-03-10 20:45 ` [net-next v2 01/15] ice: Cleanup unneeded parenthesis Jeff Kirsher
2020-03-10 20:45 ` [net-next v2 02/15] iavf: Enable support for up to 16 queues Jeff Kirsher
2020-03-10 20:45 ` [net-next v2 03/15] ice: allow bigger VFs Jeff Kirsher
2020-03-10 20:45 ` [net-next v2 04/15] ice: Improve clarity of prints and variables Jeff Kirsher
2020-03-10 20:45 ` [net-next v2 05/15] ice: Fix removing driver while bare-metal VFs pass traffic Jeff Kirsher
2020-03-10 20:45 ` [net-next v2 06/15] ice: Display Link detected via Ethtool in safe mode Jeff Kirsher
2020-03-10 20:45 ` [net-next v2 07/15] ice: Fix corner case when switching from IEEE to CEE Jeff Kirsher
2020-03-10 20:45 ` [net-next v2 08/15] ice: renegotiate link after FW DCB on Jeff Kirsher
2020-03-10 20:45 ` Jeff Kirsher [this message]
2020-03-10 20:45 ` [net-next v2 10/15] ice: Increase mailbox receive queue length to maximum Jeff Kirsher
2020-03-10 20:45 ` [net-next v2 11/15] ice: fix use of deprecated strlcpy() Jeff Kirsher
2020-03-10 20:45 ` [net-next v2 12/15] ice: Fix format specifier Jeff Kirsher
2020-03-10 20:45 ` [net-next v2 13/15] ice: Use EOPNOTSUPP instead of ENOTSUPP Jeff Kirsher
2020-03-10 20:45 ` [net-next v2 14/15] ice: use variable name more descriptive than type Jeff Kirsher
2020-03-10 20:45 ` [net-next v2 15/15] ice: fix incorrect size description of ice_get_nvm_version Jeff Kirsher
2020-03-10 21:51 ` [net-next v2 00/15][pull request] 100GbE Intel Wired LAN Driver Updates 2020-03-10 Jakub Kicinski
2020-03-10 23:21   ` David Miller

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=20200310204534.2071912-10-jeffrey.t.kirsher@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=andrewx.bowers@intel.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=brett.creeley@intel.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@redhat.com \
    --cc=sassmann@redhat.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 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).