Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[PATCH net-next 07/20] net: ixgbe: slight optimization of addr compare

5 views
Skip to first unread message

Ding Tianhong

unread,
Dec 27, 2013, 2:00:01 AM12/27/13
to
Use possibly more efficient ether_addr_equal
to instead of memcmp.

Cc: Jeff Kirsher <jeffrey....@intel.com>
Cc: Jesse Brandeburg <jesse.br...@intel.com>
Cc: Bruce Allan <bruce....@intel.com>
Signed-off-by: Ding Tianhong <dingti...@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


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majo...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Jeff Kirsher

unread,
Dec 27, 2013, 4:50:02 AM12/27/13
to
On Fri, 2013-12-27 at 14:48 +0800, Ding Tianhong wrote:
> Use possibly more efficient ether_addr_equal
> to instead of memcmp.
>
> Cc: Jeff Kirsher <jeffrey....@intel.com>
> Cc: Jesse Brandeburg <jesse.br...@intel.com>
> Cc: Bruce Allan <bruce....@intel.com>
> Signed-off-by: Ding Tianhong <dingti...@huawei.com>
> ---
> drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)

Thanks Ding, I have added this patch to my queue.
signature.asc

Ding Tianhong

unread,
Dec 28, 2013, 1:30:02 AM12/28/13
to
Use possibly more efficient ether_addr_equal
to instead of memcmp.

Cc: Jeff Kirsher <jeffrey....@intel.com>
Cc: Jesse Brandeburg <jesse.br...@intel.com>
Cc: Bruce Allan <bruce....@intel.com>
Signed-off-by: Ding Tianhong <dingti...@huawei.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

Jeff Kirsher

unread,
Dec 28, 2013, 8:20:01 AM12/28/13
to
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....@intel.com>
> Cc: Jesse Brandeburg <jesse.br...@intel.com>
> Cc: Bruce Allan <bruce....@intel.com>
> Signed-off-by: Ding Tianhong <dingti...@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.
signature.asc

Jeff Kirsher

unread,
Dec 28, 2013, 8:20:02 AM12/28/13
to
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....@intel.com>
> Cc: Jesse Brandeburg <jesse.br...@intel.com>
> Cc: Bruce Allan <bruce....@intel.com>
> Signed-off-by: Ding Tianhong <dingti...@huawei.com>
> ---
> drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)

signature.asc

Ding Tianhong

unread,
Dec 30, 2013, 2:50:03 AM12/30/13
to
Use possibly more efficient ether_addr_equal
to instead of memcmp.

Cc: Jeff Kirsher <jeffrey....@intel.com>
Cc: Jesse Brandeburg <jesse.br...@intel.com>
Cc: Bruce Allan <bruce....@intel.com>
Signed-off-by: Ding Tianhong <dingti...@huawei.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

0 new messages