Netdev List
 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, gospo@redhat.com, sassmann@redhat.com,
	Jesse Brandeburg <jesse.brandeburg@intel.com>,
	Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next v3 09/17] i40e: allow VF to remove any MAC filter
Date: Fri, 10 Jan 2014 16:47:22 -0800	[thread overview]
Message-ID: <1389401250-11509-10-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1389401250-11509-1-git-send-email-jeffrey.t.kirsher@intel.com>

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

If you use ip to change the MAC address of a VF while the VF
driver is loaded, closing the VF interface or unloading the VF
driver will cause the VF driver to remove the MAC filter for its
original (now invalid) MAC address. This would cause the PF
driver to kick an error message to the log, and back to the VF
driver.

Since the VF driver has not really done anything naughty, let's
not punish it. Don't check for MAC address overrides on the
delete operation, just make sure it's a valid address. This keeps
us from spamming the log with confusing errors.

Change-ID: I1f051bd4014e50855457d928c9ee8b0766981b2f
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
index 51a4f61..d04a776 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
@@ -1525,9 +1525,13 @@ static int i40e_vc_del_mac_addr_msg(struct i40e_vf *vf, u8 *msg, u16 msglen)
 	}
 
 	for (i = 0; i < al->num_elements; i++) {
-		ret = i40e_check_vf_permission(vf, al->list[i].addr);
-		if (ret)
+		if (is_broadcast_ether_addr(al->list[i].addr) ||
+		    is_zero_ether_addr(al->list[i].addr)) {
+			dev_err(&pf->pdev->dev, "invalid VF MAC addr %pM\n",
+				al->list[i].addr);
+			ret = I40E_ERR_INVALID_MAC_ADDR;
 			goto error_param;
+		}
 	}
 	vsi = pf->vsi[vsi_id];
 
-- 
1.8.3.1

  parent reply	other threads:[~2014-01-11  0:47 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-11  0:47 [net-next v3 00/17][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
2014-01-11  0:47 ` [net-next v3 01/17] i40e: use assignment instead of memcpy Jeff Kirsher
2014-01-11  0:47 ` [net-next v3 02/17] i40e: drop unused macros Jeff Kirsher
2014-01-11  0:47 ` [net-next v3 03/17] i40e: Update the Current NVM version Low value Jeff Kirsher
2014-01-11  0:47 ` [net-next v3 04/17] i40e: Bump version Jeff Kirsher
2014-01-11  0:47 ` [net-next v3 05/17] i40e: fix long lines Jeff Kirsher
2014-01-11  0:47 ` [net-next v3 06/17] i40e: Cleanup Doxygen warnings Jeff Kirsher
2014-01-11  0:47 ` [net-next v3 07/17] i40e: Setting queue count to 1 using ethtool is valid Jeff Kirsher
2014-01-11  0:47 ` [net-next v3 08/17] i40e: do not bail when disabling if Tx queue disable fails Jeff Kirsher
2014-01-11  0:47 ` Jeff Kirsher [this message]
2014-01-11  0:47 ` [net-next v3 10/17] i40e: check for possible incorrect ipv6 checksum Jeff Kirsher
2014-01-11  0:47 ` [net-next v3 11/17] i40e: adjust ITR max and min values Jeff Kirsher
2014-01-11  0:47 ` [net-next v3 12/17] i40e: clear qtx_head before enabling Tx queue Jeff Kirsher
2014-01-11  0:47 ` [net-next v3 13/17] i40e: call clear_pxe after adminq is initialized Jeff Kirsher
2014-01-11  0:47 ` [net-next v3 14/17] i40e: enable PTP Jeff Kirsher
2014-01-11  0:47 ` [net-next v3 15/17] i40e: fix log message wording Jeff Kirsher
2014-01-11  0:47 ` [net-next v3 16/17] i40e: Bump version Jeff Kirsher
2014-01-11  0:47 ` [net-next v3 17/17] i40evf: fix s390 build failure due to implicit prefetch.h Jeff Kirsher
2014-01-12  4:51 ` [net-next v3 00/17][pull request] Intel Wired LAN Driver Updates 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=1389401250-11509-10-git-send-email-jeffrey.t.kirsher@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=davem@davemloft.net \
    --cc=gospo@redhat.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=mitch.a.williams@intel.com \
    --cc=netdev@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox