> From: [email protected] [mailto:[email protected]]
> On Behalf Of Ding Tianhong
> Sent: Friday, December 27, 2013 10:17 PM
> To: Kirsher, Jeffrey T; Brandeburg, Jesse; Wyborny, Carolyn; Skidmore,
> Donald C; David S. Miller; Netdev; [email protected]
> Subject: [PATCH net-next v2 06/20] net: igbvf: slight optimization of addr
> compare
> 
> Use possibly more efficient ether_addr_equal to instead of memcmp.
> 
> Cc: Jeff Kirsher <[email protected]>
> Cc: Jesse Brandeburg <[email protected]>
> Cc: Carolyn Wyborny <[email protected]>
> Cc: Don Skidmore <[email protected]>
> Signed-off-by: Ding Tianhong <[email protected]>

Signed-off-by: Aaron Brown <[email protected]> 
Tested by: Aaron Brown <[email protected]>

> ---
>  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 netdev" in
> the body of a message to [email protected]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
N�����r��y����b�X��ǧv�^�)޺{.n�+����{����zX����ܨ}���Ơz�&j:+v�������zZ+��+zf���h���~����i���z��w���?�����&�)ߢf��^jǫy�m��@A�a���
0��h���i

Reply via email to