Intel-Wired-Lan Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Bowers, AndrewX <andrewx.bowers@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [PATCH S35 02/15] ice: Fix VF spoofchk
Date: Wed, 18 Dec 2019 22:15:29 +0000	[thread overview]
Message-ID: <21882071588b4cbbb08aa1b259c9eeba@intel.com> (raw)
In-Reply-To: <20191212111307.33566-2-anthony.l.nguyen@intel.com>

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On
> Behalf Of Tony Nguyen
> Sent: Thursday, December 12, 2019 3:13 AM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [PATCH S35 02/15] ice: Fix VF spoofchk
> 
> From: Brett Creeley <brett.creeley@intel.com>
> 
> There are many things wrong with the function ice_set_vf_spoofchk().
> 
> 1. The VSI being modified is the PF VSI, not the VF VSI.
> 2. We are enabling Rx VLAN pruning instead of Tx VLAN anti-spoof.
> 3. The spoofchk setting for each VF is not initialized correctly
>    or re-initialized correctly on reset.
> 
> To fix [1] we need to make sure we are modifying the VF VSI.
> This is done by using the vf->lan_vsi_idx to index into the PF's VSI array.
> 
> To fix [2] replace setting Rx VLAN pruning in ice_set_vf_spoofchk() with
> setting Tx VLAN anti-spoof.
> 
> To Fix [3] we need to make sure the initial VSI settings match what is done in
> ice_set_vf_spoofchk() for spoofchk=on. Also make sure this also works for
> VF reset. This was done by modifying ice_vsi_init() to account for the current
> spoofchk state of the VF VSI.
> 
> Because of these changes, Tx VLAN anti-spoof needs to be removed from
> ice_cfg_vlan_pruning(). This is okay for the VF because this is now controlled
> from the admin enabling/disabling spoofchk. For the PF, Tx VLAN anti-spoof
> should not be set. This change requires us to call ice_set_vf_spoofchk()
> when configuring promiscuous mode for the VF which requires
> ice_set_vf_spoofchk() to move in order to prevent a forward declaration
> prototype.
> 
> Also, add VLAN 0 by default when allocating a VF since the PF is unaware if
> the guest OS is running the 8021q module. Without this, MDD events will
> trigger on untagged traffic because spoofcheck is enabled by default. Due to
> this change, ignore add/delete messages for VLAN 0 from VIRTCHNL since
> this is added/deleted during VF initialization/teardown respectively and
> should not be modified.
> 
> Signed-off-by: Brett Creeley <brett.creeley@intel.com>
> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
> ---
>  drivers/net/ethernet/intel/ice/ice.h          |   1 +
>  drivers/net/ethernet/intel/ice/ice_lib.c      |  34 +--
>  .../net/ethernet/intel/ice/ice_virtchnl_pf.c  | 207 +++++++++++-------
>  .../net/ethernet/intel/ice/ice_virtchnl_pf.h  |   1 -
>  4 files changed, 146 insertions(+), 97 deletions(-)

Tested-by: Andrew Bowers <andrewx.bowers@intel.com>



  reply	other threads:[~2019-12-18 22:15 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-12 11:12 [Intel-wired-lan] [PATCH S35 01/15] ice: Support UDP segmentation offload Tony Nguyen
2019-12-12 11:12 ` [Intel-wired-lan] [PATCH S35 02/15] ice: Fix VF spoofchk Tony Nguyen
2019-12-18 22:15   ` Bowers, AndrewX [this message]
2019-12-12 11:12 ` [Intel-wired-lan] [PATCH S35 03/15] ice: Add code to keep track of current dflt_vsi Tony Nguyen
2019-12-18 22:16   ` Bowers, AndrewX
2019-12-12 11:12 ` [Intel-wired-lan] [PATCH S35 04/15] ice: Add ice_for_each_vf() macro Tony Nguyen
2019-12-18 22:18   ` Bowers, AndrewX
2019-12-12 11:12 ` [Intel-wired-lan] [PATCH S35 05/15] ice: Set default value for ITR in alloc function Tony Nguyen
2019-12-18 22:20   ` Bowers, AndrewX
2019-12-12 11:12 ` [Intel-wired-lan] [PATCH S35 06/15] ice: Restore interrupt throttle settings after VSI rebuild Tony Nguyen
2019-12-18 22:20   ` Bowers, AndrewX
2019-12-12 11:12 ` [Intel-wired-lan] [PATCH S35 07/15] ice: Return error on not supported ethtool -C parameters Tony Nguyen
2019-12-18 22:23   ` Bowers, AndrewX
2019-12-12 11:13 ` [Intel-wired-lan] [PATCH S35 08/15] ice: Remove Rx flex descriptor programming Tony Nguyen
2019-12-18 22:25   ` Bowers, AndrewX
2019-12-12 11:13 ` [Intel-wired-lan] [PATCH S35 09/15] ice: Fix VF link state when it's IFLA_VF_LINK_STATE_AUTO Tony Nguyen
2019-12-18 22:26   ` Bowers, AndrewX
2019-12-12 11:13 ` [Intel-wired-lan] [PATCH S35 10/15] ice: Enable ip link show on the PF to display VF unicast MAC(s) Tony Nguyen
2019-12-18 22:29   ` Bowers, AndrewX
2019-12-12 11:13 ` [Intel-wired-lan] [PATCH S35 11/15] ice: Demote MTU change print to debug Tony Nguyen
2019-12-18 22:31   ` Bowers, AndrewX
2019-12-12 11:13 ` [Intel-wired-lan] [PATCH S35 12/15] ice: suppress checked_return error Tony Nguyen
2019-12-18 22:32   ` Bowers, AndrewX
2019-12-12 11:13 ` [Intel-wired-lan] [PATCH S35 13/15] ice: add extra check for null rx descriptor Tony Nguyen
2019-12-18 22:32   ` Bowers, AndrewX
2019-12-12 11:13 ` [Intel-wired-lan] [PATCH S35 14/15] ice: Add a boundary check in ice_xsk_umem() Tony Nguyen
2019-12-18 22:34   ` Bowers, AndrewX
2019-12-12 11:13 ` [Intel-wired-lan] [PATCH S35 15/15] ice: Suppress Coverity warnings for xdp_rxq_info_reg Tony Nguyen
2019-12-18 22:34   ` Bowers, AndrewX
2019-12-18 22:11 ` [Intel-wired-lan] [PATCH S35 01/15] ice: Support UDP segmentation offload Bowers, AndrewX

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=21882071588b4cbbb08aa1b259c9eeba@intel.com \
    --to=andrewx.bowers@intel.com \
    --cc=intel-wired-lan@osuosl.org \
    /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