net/mlx5e: Replace PTP clock lock from RW lock to seq lock
[sfrench/cifs-2.6.git] / include / linux / mlx5 / driver.h
index 7a452716de4be0a7902f26ccc97ce124c6b168ff..b7fce2c9443dc830fff27bfca4c3ef89c494970f 100644 (file)
@@ -583,10 +583,11 @@ struct mlx5_irq_info {
 };
 
 struct mlx5_fc_stats {
-       struct rb_root counters;
-       struct list_head addlist;
-       /* protect addlist add/splice operations */
-       spinlock_t addlist_lock;
+       spinlock_t counters_idr_lock; /* protects counters_idr */
+       struct idr counters_idr;
+       struct list_head counters;
+       struct llist_head addlist;
+       struct llist_head dellist;
 
        struct workqueue_struct *wq;
        struct delayed_work work;
@@ -804,7 +805,7 @@ struct mlx5_pps {
 };
 
 struct mlx5_clock {
-       rwlock_t                   lock;
+       seqlock_t                  lock;
        struct cyclecounter        cycles;
        struct timecounter         tc;
        struct hwtstamp_config     hwtstamp_config;