All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keller, Jacob E <jacob.e.keller@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [net-next 03/10] fm10k: don't store sw_vid at reset
Date: Tue, 23 Jun 2015 18:23:14 +0000	[thread overview]
Message-ID: <1435083794.20240.11.camel@intel.com> (raw)
In-Reply-To: <5584E612.1030001@gmail.com>

On Fri, 2015-06-19 at 21:03 -0700, Alexander Duyck wrote:
> On 06/19/2015 04:37 PM, Jacob Keller wrote:
> > If we store the sw_vid at reset of PF, then we accidentally prevent 
> > the
> > VF from receiving the message to update its default VID. This only
> > occurs if the VF is created before the PF has come up, which is the
> > standard way of creating VFs when using the module parameter.
> 
> The upstream driver doesn't have a module parameter for VFs.  It uses 
> 
> sysfs.  It isn't clear but can this issue occur if you use the sysfs?
> 

Yes, I can re-work the comment. It can happen if you instantiate VFs
before you bring up the PF such as:

modprobe fm10k
echo N > /sys/class/.../sriov_numvfs
ip link set DEVICE up

If you do that in this order VFs will have the issue.

> > This fixes an issue where we request the incorrect MAC/VLAN
> > combinations, and prevents us from accidentally reporting some 
> > frames as
> > vlan tagged.
> > 
> > Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> > ---
> >   drivers/net/ethernet/intel/fm10k/fm10k_iov.c | 3 ---
> >   1 file changed, 3 deletions(-)
> > 
> > diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_iov.c 
> > b/drivers/net/ethernet/intel/fm10k/fm10k_iov.c
> > index 94571e6e790c..0e25a80417b9 100644
> > --- a/drivers/net/ethernet/intel/fm10k/fm10k_iov.c
> > +++ b/drivers/net/ethernet/intel/fm10k/fm10k_iov.c
> > @@ -228,9 +228,6 @@ int fm10k_iov_resume(struct pci_dev *pdev)
> >   		hw->iov.ops.set_lport(hw, vf_info, i,
> >   				     
> >  FM10K_VF_FLAG_MULTI_CAPABLE);
> >   
> > -		/* assign our default vid to the VF following 
> > reset */
> > -		vf_info->sw_vid = hw->mac.default_vid;
> > -
> >   		/* mailbox is disconnected so we don't send a 
> > message */
> >   		hw->iov.ops.assign_default_mac_vlan(hw, vf_info);
> >   
> 
> The patch itself looks fine.  I assume the Switch API will send a 
> message to force us onto the correct VID if there is one already 
> reserved for this VF.
> 
> I probably shouldn't have used the PF VLAN ID for the VFs anyway. 
> Just 
> letting the Switch API bounce a message through is a much better way 
> to go.


Yes, the switch sends a message which we receive on coming up.

Regards,
Jake

  reply	other threads:[~2015-06-23 18:23 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-19 23:37 [Intel-wired-lan] [net-next 01/10] fm10k: remove is_slot_appropriate Jacob Keller
2015-06-19 23:37 ` [Intel-wired-lan] [net-next 02/10] fm10k: allow creation of vlan interfaces even while down Jacob Keller
2015-06-19 23:37 ` [Intel-wired-lan] [net-next 03/10] fm10k: don't store sw_vid at reset Jacob Keller
2015-06-20  4:03   ` Alexander Duyck
2015-06-23 18:23     ` Keller, Jacob E [this message]
2015-06-19 23:37 ` [Intel-wired-lan] [net-next 04/10] fm10k: TRIVIAL fix up ordering of __always_unused and style Jacob Keller
2015-06-19 23:37 ` [Intel-wired-lan] [net-next 05/10] fm10k: add support for extra debug statistics Jacob Keller
2015-06-19 23:37 ` [Intel-wired-lan] [net-next 06/10] fm10k: send traffic on default vid to vlan device if we have one Jacob Keller
2015-06-20  4:20   ` Alexander Duyck
2015-06-23 16:11     ` Vick, Matthew
2015-06-23 18:24     ` Keller, Jacob E
2015-06-23 22:18     ` Keller, Jacob E
2015-06-24 22:13       ` Alexander Duyck
2015-06-24 22:38         ` Keller, Jacob E
2015-06-19 23:37 ` [Intel-wired-lan] [net-next 07/10] fm10k: TRIVIAL fix typo in fm10k_netdev.c Jacob Keller
2015-06-19 23:37 ` [Intel-wired-lan] [net-next 08/10] fm10k: re-enable VF after a full reset on detection of a Malicious event Jacob Keller
2015-06-19 23:37 ` [Intel-wired-lan] [net-next 09/10] fm10k: Only trigger data path reset if fabric is up Jacob Keller
2015-06-19 23:37 ` [Intel-wired-lan] [net-next 10/10] fm10k: fix iov_msg_mac_vlan_pf VID checks Jacob Keller
2015-06-20  4:41   ` Alexander Duyck
2015-06-23 18:26     ` Keller, Jacob E

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=1435083794.20240.11.camel@intel.com \
    --to=jacob.e.keller@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 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.