* [PATCH net-next v2 07/20] net: ixgbe: slight optimization of addr compare
@ 2013-12-28 6:17 Ding Tianhong
2013-12-28 13:16 ` Jeff Kirsher
2013-12-28 13:16 ` Jeff Kirsher
0 siblings, 2 replies; 3+ messages in thread
From: Ding Tianhong @ 2013-12-28 6:17 UTC (permalink / raw)
To: Jeff Kirsher, Jesse Brandeburg, Bruce Allan, David S. Miller,
Netdev, linux-kernel@vger.kernel.org
Use possibly more efficient ether_addr_equal
to instead of memcmp.
Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>
Cc: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
index d6f0c0d..9ce07f3 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
@@ -715,8 +715,7 @@ static int ixgbe_set_vf_mac_addr(struct ixgbe_adapter *adapter,
}
if (adapter->vfinfo[vf].pf_set_mac &&
- memcmp(adapter->vfinfo[vf].vf_mac_addresses, new_mac,
- ETH_ALEN)) {
+ !ether_addr_equal(adapter->vfinfo[vf].vf_mac_addresses, new_mac)) {
e_warn(drv,
"VF %d attempted to override administratively set MAC address\n"
"Reload the VF driver to resume operations\n",
--
1.8.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next v2 07/20] net: ixgbe: slight optimization of addr compare
2013-12-28 6:17 [PATCH net-next v2 07/20] net: ixgbe: slight optimization of addr compare Ding Tianhong
@ 2013-12-28 13:16 ` Jeff Kirsher
2013-12-28 13:16 ` Jeff Kirsher
1 sibling, 0 replies; 3+ messages in thread
From: Jeff Kirsher @ 2013-12-28 13:16 UTC (permalink / raw)
To: Ding Tianhong
Cc: Jesse Brandeburg, Bruce Allan, David S. Miller, Netdev,
linux-kernel@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 537 bytes --]
On Sat, 2013-12-28 at 14:17 +0800, Ding Tianhong wrote:
> Use possibly more efficient ether_addr_equal
> to instead of memcmp.
>
> Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>
> Cc: Bruce Allan <bruce.w.allan@intel.com>
> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
> ---
> drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
Thanks Ding, I will update the patch in my queue with this updated
version.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next v2 07/20] net: ixgbe: slight optimization of addr compare
2013-12-28 6:17 [PATCH net-next v2 07/20] net: ixgbe: slight optimization of addr compare Ding Tianhong
2013-12-28 13:16 ` Jeff Kirsher
@ 2013-12-28 13:16 ` Jeff Kirsher
1 sibling, 0 replies; 3+ messages in thread
From: Jeff Kirsher @ 2013-12-28 13:16 UTC (permalink / raw)
To: Ding Tianhong
Cc: Jesse Brandeburg, Bruce Allan, David S. Miller, Netdev,
linux-kernel@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 537 bytes --]
On Sat, 2013-12-28 at 14:17 +0800, Ding Tianhong wrote:
> Use possibly more efficient ether_addr_equal
> to instead of memcmp.
>
> Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>
> Cc: Bruce Allan <bruce.w.allan@intel.com>
> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
> ---
> drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
Thanks Ding, I will update the patch in my queue with this updated
version.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-12-28 13:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-28 6:17 [PATCH net-next v2 07/20] net: ixgbe: slight optimization of addr compare Ding Tianhong
2013-12-28 13:16 ` Jeff Kirsher
2013-12-28 13:16 ` Jeff Kirsher
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).