netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
To: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Cc: netdev@vger.kernel.org, wojciech.drewek@intel.com,
	intel-wired-lan@lists.osuosl.org
Subject: Re: [Intel-wired-lan] [iwl-net v1] iavf: allow changing VLAN state without calling PF
Date: Thu, 5 Sep 2024 11:04:17 +0200	[thread overview]
Message-ID: <Ztl0ES4k0dyI7Qio@mev-dev.igk.intel.com> (raw)
In-Reply-To: <65f17b12-860e-4cd0-a996-459fee71b4f8@intel.com>

On Thu, Sep 05, 2024 at 08:19:58AM +0200, Przemek Kitszel wrote:
> On 9/4/24 14:00, Michal Swiatkowski wrote:
> > First case:
> 
> [...]
> 
> > Second case:
> 
> [...]
> 
> > With fix for previous case we end up with no VLAN filters in hardware.
> > We have to remove VLAN filters if the state is IAVF_VLAN_ADD and delete
> > VLAN was called. It is save as IAVF_VLAN_ADD means that virtchnl message
> > wasn't sent yet.
> 
> I'm fine with combining the two cases into one commit as that is related
> 
> > 
> > Fixes: 0c0da0e95105 ("iavf: refactor VLAN filter states")
> > Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> > ---
> >   drivers/net/ethernet/intel/iavf/iavf_main.c | 18 ++++++++++++++++--
> >   1 file changed, 16 insertions(+), 2 deletions(-)
> 
> [...]
> 
> > @@ -793,8 +798,17 @@ static void iavf_del_vlan(struct iavf_adapter *adapter, struct iavf_vlan vlan)
> >   	f = iavf_find_vlan(adapter, vlan);
> >   	if (f) {
> > -		f->state = IAVF_VLAN_REMOVE;
> 
> you forgot to put this line in else case below
> 

Oh, sorry, thanks for finding that. Will send v2.

> > -		iavf_schedule_aq_request(adapter, IAVF_FLAG_AQ_DEL_VLAN_FILTER);
> > +		/* IAVF_ADD_VLAN means that VLAN wasn't even added yet.
> > +		 * Remove it from the list.
> > +		 */
> > +		if (f->state == IAVF_VLAN_ADD) {
> > +			list_del(&f->list);
> > +			kfree(f);
> > +			adapter->num_vlan_filters--;
> > +		} else {
> > +			iavf_schedule_aq_request(adapter,
> > +						 IAVF_FLAG_AQ_DEL_VLAN_FILTER);
> > +		}
> >   	}
> >   	spin_unlock_bh(&adapter->mac_vlan_list_lock);
> 

      reply	other threads:[~2024-09-05  9:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-04 12:00 [iwl-net v1] iavf: allow changing VLAN state without calling PF Michal Swiatkowski
2024-09-05  6:19 ` [Intel-wired-lan] " Przemek Kitszel
2024-09-05  9:04   ` Michal Swiatkowski [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=Ztl0ES4k0dyI7Qio@mev-dev.igk.intel.com \
    --to=michal.swiatkowski@linux.intel.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=netdev@vger.kernel.org \
    --cc=przemyslaw.kitszel@intel.com \
    --cc=wojciech.drewek@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 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).