aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mlx5/driver.h
diff options
context:
space:
mode:
authorVlad Buslov <vladbu@mellanox.com>2018-07-23 11:32:05 +0300
committerSaeed Mahameed <saeedm@mellanox.com>2018-09-05 21:14:57 -0700
commit6e5e22839136fdb466af0aa46ff2404713dff974 (patch)
treef08f3838fa6975aa4ceee8ce4c728f5f98a64a48 /include/linux/mlx5/driver.h
parentnet/mlx5: Change flow counters addlist type to single linked list (diff)
downloadlinux-dev-6e5e22839136fdb466af0aa46ff2404713dff974.tar.xz
linux-dev-6e5e22839136fdb466af0aa46ff2404713dff974.zip
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>
Diffstat (limited to 'include/linux/mlx5/driver.h')
-rw-r--r--include/linux/mlx5/driver.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h
index c00549293982..4b53ac64004b 100644
--- a/include/linux/mlx5/driver.h
+++ b/include/linux/mlx5/driver.h
@@ -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;