Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 342161
b: refs/heads/master
c: c402b94
h: refs/heads/master
i:
  342159: 5d4916f
v: v3
  • Loading branch information
Yan Burman authored and David S. Miller committed Dec 12, 2012
1 parent b347dc1 commit fae1cde
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d4676eac0de2e6d88eb3e2c02b4e9813d7d7f205
refs/heads/master: c402b9477b44f768c232726d10bd103ec6e46b07
6 changes: 2 additions & 4 deletions trunk/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -613,8 +613,6 @@ static int mlx4_en_validate_flow(struct net_device *dev,
struct ethtool_usrip4_spec *l3_mask;
struct ethtool_tcpip4_spec *l4_mask;
struct ethhdr *eth_mask;
u64 full_mac = ~0ull;
u64 zero_mac = 0;

if (cmd->fs.location >= MAX_NUM_OF_FS_RULES)
return -EINVAL;
Expand Down Expand Up @@ -644,11 +642,11 @@ static int mlx4_en_validate_flow(struct net_device *dev,
case ETHER_FLOW:
eth_mask = &cmd->fs.m_u.ether_spec;
/* source mac mask must not be set */
if (memcmp(eth_mask->h_source, &zero_mac, ETH_ALEN))
if (!is_zero_ether_addr(eth_mask->h_source))
return -EINVAL;

/* dest mac mask must be ff:ff:ff:ff:ff:ff */
if (memcmp(eth_mask->h_dest, &full_mac, ETH_ALEN))
if (!is_broadcast_ether_addr(eth_mask->h_dest))
return -EINVAL;

if (!all_zeros_or_all_ones(eth_mask->h_proto))
Expand Down

0 comments on commit fae1cde

Please sign in to comment.