net/mlx5: Add new list to store deleted flow counters
In order to prevent flow counters stats work function from traversing whole flow counters tree while searching for deleted flow counters, new list to store deleted flow counters is added to struct mlx5_fc_stats. Lockless NULL-terminated single linked list data type is used due to following reasons: - This use case only needs to add single element to list and remove/iterate whole list. Lockless list doesn't require any additional synchronization for these operations. - First cache line of flow counter data structure only has space to store single additional pointer, which precludes usage of double linked list. Remove flow counter 'deleted' flag that is no longer needed. Signed-off-by: Vlad Buslov <vladbu@mellanox.com> Acked-by: Amir Vadai <amir@vadai.me> Reviewed-by: Paul Blakey <paulb@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
This commit is contained in:

committed by
Saeed Mahameed

parent
83033688b7
commit
6e5e228391
@@ -585,6 +585,7 @@ struct mlx5_irq_info {
|
||||
struct mlx5_fc_stats {
|
||||
struct rb_root counters;
|
||||
struct llist_head addlist;
|
||||
struct llist_head dellist;
|
||||
|
||||
struct workqueue_struct *wq;
|
||||
struct delayed_work work;
|
||||
|
Reference in New Issue
Block a user