All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bimmy Pujari <bimmy.pujari@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [next PATCH S45 05/10] i40e: fix deleting mac filters
Date: Tue,  6 Sep 2016 18:05:07 -0700	[thread overview]
Message-ID: <1473210312-29592-6-git-send-email-bimmy.pujari@intel.com> (raw)
In-Reply-To: <1473210312-29592-1-git-send-email-bimmy.pujari@intel.com>

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

There exists a bug in which deleting a mac filter does not actually
occur.  The driver reports that the filter has been deleted with no
error.  The problem occurs because the wrong cmd_flag is passed to the
firmware when deleting the filter.  The firmware reports an error back
to the driver but it is expressly ignored.

This fixes the bug by using the correct flag when deleting a filter.
Without this patch, deleted filters remain in firmware and function as
if they had not been deleted.

Signed-off-by: Alan Brady <alan.brady@intel.com>
Change-ID: I5f22b874f3b83f457702f18f0d5602ca21ac40c3
---
Testing-hints:
        I used 'tcpdump -npi <iface>' to watch traffic.

        1.  Pass traffic with mac header 00:aa:00:aa:02:01 - no traffic
        2.  Add mac filter - ip maddr add 00:aa:00:aa:02:01 dev enp5s0f0
        3.  Pass traffic with mac header 00:aa:00:aa:02:01 - traffic
        4.  Delete mac filter - ip maddr del 00:aa:00:aa:02:01 dev enp5s0f0
        5.  Pass traffic with mac header 00:aa:00:aa:02:01
                Expected - no traffic
                Actual - traffic

 drivers/net/ethernet/intel/i40e/i40e_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index e83b317..4c3c6ce 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -1315,7 +1315,7 @@ static void i40e_rm_default_mac_filter(struct i40e_vsi *vsi, u8 *macaddr)
 	element.vlan_tag = 0;
 	/* ...and some firmware does it this way. */
 	element.flags = I40E_AQC_MACVLAN_DEL_PERFECT_MATCH |
-			I40E_AQC_MACVLAN_ADD_IGNORE_VLAN;
+			I40E_AQC_MACVLAN_DEL_IGNORE_VLAN;
 	i40e_aq_remove_macvlan(&pf->hw, vsi->seid, &element, 1, NULL);
 }
 
@@ -1908,7 +1908,7 @@ int i40e_sync_vsi_filters(struct i40e_vsi *vsi)
 			ether_addr_copy(del_list[num_del].mac_addr, f->macaddr);
 			if (f->vlan == I40E_VLAN_ANY) {
 				del_list[num_del].vlan_tag = 0;
-				cmd_flags |= I40E_AQC_MACVLAN_ADD_IGNORE_VLAN;
+				cmd_flags |= I40E_AQC_MACVLAN_DEL_IGNORE_VLAN;
 			} else {
 				del_list[num_del].vlan_tag =
 					cpu_to_le16((u16)(f->vlan));
-- 
2.4.11


  parent reply	other threads:[~2016-09-07  1:05 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-07  1:05 [Intel-wired-lan] [next PATCH S45-V2 00/10] i40e/i40evf updates Bimmy Pujari
2016-09-07  1:05 ` [Intel-wired-lan] [next PATCH S45 01/10] i40evf: remove unnecessary error checking against i40evf_up_complete Bimmy Pujari
2016-09-08 16:47   ` Bowers, AndrewX
2016-09-07  1:05 ` [Intel-wired-lan] [next PATCH S45 02/10] i40e: Limit TX descriptor count in cases where frag size is greater than 16K Bimmy Pujari
2016-09-08 16:53   ` Bowers, AndrewX
2016-09-07  1:05 ` [Intel-wired-lan] [next PATCH S45 03/10] i40evf: remove unnecessary error checking against i40e_shutdown_adminq Bimmy Pujari
2016-09-08 16:59   ` Bowers, AndrewX
2016-09-07  1:05 ` [Intel-wired-lan] [next PATCH S45 04/10] i40e: Remove 100 Mbps SGMII support for X722 Bimmy Pujari
2016-09-09 20:38   ` Bowers, AndrewX
2016-09-07  1:05 ` Bimmy Pujari [this message]
2016-09-08 21:19   ` [Intel-wired-lan] [next PATCH S45 05/10] i40e: fix deleting mac filters Bowers, AndrewX
2016-09-07  1:05 ` [Intel-wired-lan] [next PATCH S45 06/10] i40e: add encap csum VF offload flag Bimmy Pujari
2016-09-08 17:26   ` Bowers, AndrewX
2016-09-07  1:05 ` [Intel-wired-lan] [next PATCH S45 07/10] i40e: cleanup ATR auto_disable_flags use Bimmy Pujari
2016-09-09 19:50   ` Bowers, AndrewX
2016-09-07  1:05 ` [Intel-wired-lan] [next PATCH S45 08/10] i40e: check conflicting ntuple/sideband rules when re-enabling ATR Bimmy Pujari
2016-09-08 20:57   ` Keller, Jacob E
2016-09-09 20:10   ` Bowers, AndrewX
2016-09-07  1:05 ` [Intel-wired-lan] [next PATCH S45 09/10] i40e: removing unreachable code Bimmy Pujari
2016-09-08 17:43   ` Bowers, AndrewX
2016-09-07  1:05 ` [Intel-wired-lan] [next PATCH S45 10/10] i40e/i40evf: Changed version to 1.6.16 Bimmy Pujari
2016-09-08 17:43   ` Bowers, AndrewX
  -- strict thread matches above, loose matches on Subject: below --
2016-09-06 19:39 [Intel-wired-lan] [next PATCH S45 00/10] i40e/i40evf updates Bimmy Pujari
2016-09-06 19:40 ` [Intel-wired-lan] [next PATCH S45 05/10] i40e: fix deleting mac filters Bimmy Pujari

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=1473210312-29592-6-git-send-email-bimmy.pujari@intel.com \
    --to=bimmy.pujari@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.