All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alice Michael <alice.michael@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [next PATCH S80-V3 02/11] i40evf: fix mac filter removal timing issue
Date: Thu,  7 Sep 2017 08:05:47 -0400	[thread overview]
Message-ID: <20170907120556.45699-2-alice.michael@intel.com> (raw)
In-Reply-To: <20170907120556.45699-1-alice.michael@intel.com>

From: Alan Brady <alan.brady@intel.com>

Due to the asynchronous nature in which mac filters are added and
deleted, there exists a bug in which filters are erroneously removed if
removed then added again quickly.

The events are as such:
    - filter marked for removal
    - same filter is re-added before watchdog that cleans up filters
    - we skip re-adding the filter because we have it already in the
list
    - watchdog filter cleanup kicks off and filter is removed

So when we were re-adding the same filter, it didn't actually get added
because it already existed in the list, but was marked for removal and
had yet to actually be removed.

This patch fixes the issue by making sure that when adding a filter, if
we find it already existing in our list, make sure it is not marked to
be removed.

Signed-off-by: Alan Brady <alan.brady@intel.com>
---
 drivers/net/ethernet/intel/i40evf/i40evf_main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index c5371da..4496c48 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -880,6 +880,8 @@ i40evf_mac_filter *i40evf_add_filter(struct i40evf_adapter *adapter,
 		list_add_tail(&f->list, &adapter->mac_filter_list);
 		f->add = true;
 		adapter->aq_required |= I40EVF_FLAG_AQ_ADD_MAC_FILTER;
+	} else {
+		f->remove = false;
 	}
 
 	clear_bit(__I40EVF_IN_CRITICAL_TASK, &adapter->crit_section);
-- 
2.9.4


  reply	other threads:[~2017-09-07 12:05 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-07 12:05 [Intel-wired-lan] [next PATCH S80-V3 01/11] i40e: use the safe hash table iterator when deleting mac filters Alice Michael
2017-09-07 12:05 ` Alice Michael [this message]
2017-09-12 20:23   ` [Intel-wired-lan] [next PATCH S80-V3 02/11] i40evf: fix mac filter removal timing issue Bowers, AndrewX
2017-09-07 12:05 ` [Intel-wired-lan] [next PATCH S80-V3 03/11] i40e/i40evf: fix incorrect default ITR values on driver load Alice Michael
2017-09-12 20:30   ` Bowers, AndrewX
2017-09-07 12:05 ` [Intel-wired-lan] [next PATCH S80-V3 04/11] i40e/i40evf: always set the CLEARPBA flag when re-enabling interrupts Alice Michael
2017-09-12 20:46   ` Bowers, AndrewX
2017-10-05 18:31     ` Duyck, Alexander H
2017-10-05 22:24       ` Keller, Jacob E
2017-10-05 23:01         ` Jesse Brandeburg
2017-10-05 23:25           ` Keller, Jacob E
2017-09-07 12:05 ` [Intel-wired-lan] [next PATCH S80-V3 05/11] i40e: reduce lrxqthresh from 2 to 1 Alice Michael
2017-09-12 21:33   ` Bowers, AndrewX
2017-09-07 12:05 ` [Intel-wired-lan] [next PATCH S80-V3 06/11] i40e/i40evf: bump tail only in multiples of 8 Alice Michael
2017-09-12 21:40   ` Bowers, AndrewX
2017-09-07 12:05 ` [Intel-wired-lan] [next PATCH S80-V3 07/11] i40e/i40evf: bundle more descriptors when allocating buffers Alice Michael
2017-09-12 21:41   ` Bowers, AndrewX
2017-09-07 12:05 ` [Intel-wired-lan] [next PATCH S80-V3 08/11] i40e: allow XPS with QoS enabled Alice Michael
2017-09-12 21:47   ` Bowers, AndrewX
2017-09-07 12:05 ` [Intel-wired-lan] [next PATCH S80-V3 09/11] i40e: add check for return from find_first_bit call Alice Michael
2017-09-12 21:48   ` Bowers, AndrewX
2017-09-07 12:05 ` [Intel-wired-lan] [next PATCH S80-V3 10/11] i40e: Retry AQC GetPhyAbilities to overcome I2CRead hangs Alice Michael
2017-09-12 22:15   ` Bowers, AndrewX
2017-09-07 12:05 ` [Intel-wired-lan] [next PATCH S80-V3 11/11] i40e: use a local variable instead of calculating multiple times Alice Michael
2017-09-12 21:52   ` Bowers, AndrewX
2017-09-12 16:53 ` [Intel-wired-lan] [next PATCH S80-V3 01/11] i40e: use the safe hash table iterator when deleting mac filters 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=20170907120556.45699-2-alice.michael@intel.com \
    --to=alice.michael@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.