Skip to content

Commit

Permalink
net/mlx4_en: Limit the RFS filter IDs to be < RPS_NO_FILTER
Browse files Browse the repository at this point in the history
RFS filter id can't have the special value RPS_NO_FILTER,
need to skip it when allocating id's.

CC: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Amir Vadai authored and David S. Miller committed Jul 26, 2012
1 parent 5243e7b commit ee64c0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/mellanox/mlx4/en_netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ mlx4_en_filter_alloc(struct mlx4_en_priv *priv, int rxq_index, __be32 src_ip,

filter->flow_id = flow_id;

filter->id = priv->last_filter_id++;
filter->id = priv->last_filter_id++ % RPS_NO_FILTER;

list_add_tail(&filter->next, &priv->filters);
hlist_add_head(&filter->filter_chain,
Expand Down

0 comments on commit ee64c0e

Please sign in to comment.