Skip to content

Commit

Permalink
net/mlx5: DR, Init lists that are used in rule's member
Browse files Browse the repository at this point in the history
Whenever adding new member of rule object we attach it to 2 lists,
These 2 lists should be initialized first.

Fixes: 41d0707 ("net/mlx5: DR, Expose steering rule functionality")
Signed-off-by: Erez Shitrit <erezsh@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
  • Loading branch information
Erez Shitrit authored and Saeed Mahameed committed Jan 6, 2020
1 parent 6412bb3 commit df55c55
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,9 @@ static int dr_rule_add_member(struct mlx5dr_rule_rx_tx *nic_rule,
if (!rule_mem)
return -ENOMEM;

INIT_LIST_HEAD(&rule_mem->list);
INIT_LIST_HEAD(&rule_mem->use_ste_list);

rule_mem->ste = ste;
list_add_tail(&rule_mem->list, &nic_rule->rule_members_list);

Expand Down

0 comments on commit df55c55

Please sign in to comment.