From: Sathya Perla <sathya.perla@emulex.com>
To: <netdev@vger.kernel.org>
Subject: [PATCH net-next 2/3] be2net: ignore VF mac address setting for the same mac
Date: Fri, 1 Aug 2014 17:47:31 +0530 [thread overview]
Message-ID: <1406895452-29514-3-git-send-email-sathya.perla@emulex.com> (raw)
In-Reply-To: <1406895452-29514-1-git-send-email-sathya.perla@emulex.com>
From: Vasundhara Volam <vasundhara.volam@emulex.com>
ndo_set_vf_mac() call may be issued for a mac-addr that is already
active on a VF. If so, silently ignore the request.
Signed-off-by: Vasundhara Volam <vasundhara.volam@emulex.com>
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
---
drivers/net/ethernet/emulex/benet/be_main.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index da4d386..db4ff14 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -1270,6 +1270,12 @@ static int be_set_vf_mac(struct net_device *netdev, int vf, u8 *mac)
if (!is_valid_ether_addr(mac) || vf >= adapter->num_vfs)
return -EINVAL;
+ /* Proceed further only if user provided MAC is different
+ * from active MAC
+ */
+ if (ether_addr_equal(mac, vf_cfg->mac_addr))
+ return 0;
+
if (BEx_chip(adapter)) {
be_cmd_pmac_del(adapter, vf_cfg->if_handle, vf_cfg->pmac_id,
vf + 1);
--
1.7.1
next prev parent reply other threads:[~2014-08-01 12:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-01 12:17 [PATCH net-next 0/3] be2net: patch set Sathya Perla
2014-08-01 12:17 ` [PATCH net-next 1/3] be2net: ignore get/set profile FW cmd failures Sathya Perla
2014-08-01 12:17 ` Sathya Perla [this message]
2014-08-01 12:17 ` [PATCH net-next 3/3] be2net: support deleting FW dump via ethtool (only for Lancer) Sathya Perla
2014-08-02 22:59 ` [PATCH net-next 0/3] be2net: patch set 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=1406895452-29514-3-git-send-email-sathya.perla@emulex.com \
--to=sathya.perla@emulex.com \
--cc=netdev@vger.kernel.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 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).