aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
diff options
context:
space:
mode:
authorYan Burman <yanb@mellanox.com>2013-02-07 02:25:20 +0000
committerDavid S. Miller <davem@davemloft.net>2013-02-07 23:26:12 -0500
commit6bbb6d99f3d2653e634657ea0d85ef4c0fc49463 (patch)
tree8edfb6633a11ebb647273271e21f4b310a5c1789 /drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
parentnet/mlx4_en: Optimize loopback related checks in data path (diff)
downloadlinux-dev-6bbb6d99f3d2653e634657ea0d85ef4c0fc49463.tar.xz
linux-dev-6bbb6d99f3d2653e634657ea0d85ef4c0fc49463.zip
net/mlx4_en: Optimize Rx fast path filter checks
Currently, RX path code that does RX filtering is not optimized and does an expensive conversion. In order to use ether_addr_equal_64bits which is optimized for such cases, we need the MAC address kept by the device to be in the form of unsigned char array instead of u64. Store the MAC address as unsigned char array and convert to/from u64 out of the fast path when needed. Side effect of this is that we no longer need priv->mac, since it's the same as dev->dev_addr. This optimization was suggested by Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: Yan Burman <yanb@mellanox.com> Signed-off-by: Amir Vadai <amirv@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/mlx4_en.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h b/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
index 696dcf33619f..9d0105d3eaf3 100644
--- a/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
+++ b/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
@@ -198,7 +198,6 @@ enum cq_type {
*/
#define ROUNDUP_LOG2(x) ilog2(roundup_pow_of_two(x))
#define XNOR(x, y) (!(x) == !(y))
-#define ILLEGAL_MAC(addr) (addr == 0xffffffffffffULL || addr == 0x0)
struct mlx4_en_tx_info {
@@ -483,7 +482,7 @@ struct mlx4_en_priv {
int registered;
int allocated;
int stride;
- u64 mac;
+ unsigned char prev_mac[ETH_ALEN + 2];
int mac_index;
unsigned max_mtu;
int base_qpn;