[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <52BD22BB.1060705@huawei.com>
Date: Fri, 27 Dec 2013 14:48:27 +0800
From: Ding Tianhong <dingtianhong@...wei.com>
To: Jeff Kirsher <jeffrey.t.kirsher@...el.com>,
Jesse Brandeburg <jesse.brandeburg@...el.com>,
Carolyn Wyborny <carolyn.wyborny@...el.com>,
Don Skidmore <donald.c.skidmore@...el.com>,
"David S. Miller" <davem@...emloft.net>,
Netdev <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: [PATCH net-next 06/20] net: igbvf: slight optimization of addr compare
Use possibly more efficient ether_addr_equal
to instead of memcmp.
Cc: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
Cc: Jesse Brandeburg <jesse.brandeburg@...el.com>
Cc: Carolyn Wyborny <carolyn.wyborny@...el.com>
Cc: Don Skidmore <donald.c.skidmore@...el.com>
Signed-off-by: Ding Tianhong <dingtianhong@...wei.com>
---
drivers/net/ethernet/intel/igbvf/netdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/igbvf/netdev.c b/drivers/net/ethernet/intel/igbvf/netdev.c
index 04bf22e..675435f 100644
--- a/drivers/net/ethernet/intel/igbvf/netdev.c
+++ b/drivers/net/ethernet/intel/igbvf/netdev.c
@@ -1745,7 +1745,7 @@ static int igbvf_set_mac(struct net_device *netdev, void *p)
hw->mac.ops.rar_set(hw, hw->mac.addr, 0);
- if (memcmp(addr->sa_data, hw->mac.addr, 6))
+ if (!ether_addr_equal(addr->sa_data, hw->mac.addr))
return -EADDRNOTAVAIL;
memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len);
--
1.8.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists