All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Mitch Williams <mitch.a.williams@intel.com>,
	netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
	jogreene@redhat.com, Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next v2 13/16] i40evf: add MAC address filter in open, not init
Date: Tue, 14 Jul 2015 18:30:37 -0700	[thread overview]
Message-ID: <1436923840-24455-14-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1436923840-24455-1-git-send-email-jeffrey.t.kirsher@intel.com>

From: Mitch Williams <mitch.a.williams@intel.com>

During close, all of the MAC filters are cleared, so the driver would be
unable to receive unicast packets after being closed and reopened.

Add the adapter's "hardware" MAC address filter in open, not init. This
ensures that the correct filter is present each time.

Change-ID: I51a11e9c1200139dab6f66a5353bd38c7d26f875
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/i40evf/i40evf_main.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index 1c2ee97..802e158 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -1858,6 +1858,7 @@ static int i40evf_open(struct net_device *netdev)
 	if (err)
 		goto err_req_irq;
 
+	i40evf_add_filter(adapter, adapter->hw.mac.addr);
 	i40evf_configure(adapter);
 
 	err = i40evf_up_complete(adapter);
@@ -1998,7 +1999,6 @@ static void i40evf_init_task(struct work_struct *work)
 						      struct i40evf_adapter,
 						      init_task.work);
 	struct net_device *netdev = adapter->netdev;
-	struct i40evf_mac_filter *f;
 	struct i40e_hw *hw = &adapter->hw;
 	struct pci_dev *pdev = adapter->pdev;
 	int i, err, bufsz;
@@ -2132,16 +2132,6 @@ static void i40evf_init_task(struct work_struct *work)
 	ether_addr_copy(netdev->dev_addr, adapter->hw.mac.addr);
 	ether_addr_copy(netdev->perm_addr, adapter->hw.mac.addr);
 
-	f = kzalloc(sizeof(*f), GFP_ATOMIC);
-	if (!f)
-		goto err_sw_init;
-
-	ether_addr_copy(f->macaddr, adapter->hw.mac.addr);
-	f->add = true;
-	adapter->aq_required |= I40EVF_FLAG_AQ_ADD_MAC_FILTER;
-
-	list_add(&f->list, &adapter->mac_filter_list);
-
 	init_timer(&adapter->watchdog_timer);
 	adapter->watchdog_timer.function = &i40evf_watchdog_timer;
 	adapter->watchdog_timer.data = (unsigned long)adapter;
-- 
2.4.3

  parent reply	other threads:[~2015-07-15  1:30 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-15  1:30 [net-next v2 00/16][pull request] Intel Wired LAN Driver Updates 2015-07-14 Jeff Kirsher
2015-07-15  1:30 ` [net-next v2 01/16] i40e: Implement ndo_features_check() Jeff Kirsher
2015-07-15  1:30 ` [net-next v2 02/16] i40e/i40evf: Add stats to track FD ATR and SB dynamic enable state Jeff Kirsher
2015-07-15  1:30 ` [net-next v2 03/16] i40e/i40evf: Update Flex-10 related device/function capabilities Jeff Kirsher
2015-07-15  1:30 ` [net-next v2 04/16] i40e/i40evf: improve Tx performance with a small tweak Jeff Kirsher
2015-07-15  1:30 ` [net-next v2 05/16] i40evf: Allow for an abundance of vectors Jeff Kirsher
2015-07-15  1:30 ` [net-next v2 06/16] i40e: ignore duplicate port VLAN requests Jeff Kirsher
2015-07-15 19:24   ` Sergei Shtylyov
2015-07-15  1:30 ` [net-next v2 07/16] i40e: Remove incorrect #ifdef's Jeff Kirsher
2015-07-15  1:30 ` [net-next v2 08/16] i40e/i40evf: Update the admin queue command header Jeff Kirsher
2015-07-15  1:30 ` [net-next v2 09/16] i40e: correctly program filters for VFs Jeff Kirsher
2015-07-15  1:30 ` [net-next v2 10/16] i40e: do a proper reset when disabling a VF Jeff Kirsher
2015-07-15  1:30 ` [net-next v2 11/16] i40e: un-disable VF after reset Jeff Kirsher
2015-07-15  1:30 ` [net-next v2 12/16] i40evf: don't delete all the filters Jeff Kirsher
2015-07-15  1:30 ` Jeff Kirsher [this message]
2015-07-15  1:30 ` [net-next v2 14/16] i40e/i40evf: Add support for pre-allocated pages for PD Jeff Kirsher
2015-07-15  1:30 ` [net-next v2 15/16] i40e: Refine an error message to avoid confusion Jeff Kirsher
2015-07-15  1:30 ` [net-next v2 16/16] i40e/i40evf: Bump version to 1.3.6 for i40e and 1.3.2 for i40evf Jeff Kirsher
2015-07-16  0:31 ` [net-next v2 00/16][pull request] Intel Wired LAN Driver Updates 2015-07-14 David Miller

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=1436923840-24455-14-git-send-email-jeffrey.t.kirsher@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=davem@davemloft.net \
    --cc=jogreene@redhat.com \
    --cc=mitch.a.williams@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@redhat.com \
    --cc=sassmann@redhat.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 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.