net/mlx5: Move flow counters data structures from flow steering header
authorSaeed Mahameed <saeedm@mellanox.com>
Wed, 5 Dec 2018 02:03:03 +0000 (18:03 -0800)
committerSaeed Mahameed <saeedm@mellanox.com>
Mon, 10 Dec 2018 02:16:16 +0000 (18:16 -0800)
After the following flow counters API refactoring:
("net/mlx5: Use flow counter IDs and not the wrapping cache object")
flow counters private data structures mlx5_fc_cache and mlx5_fc are
redundantly exposed in fs_core.h, they have nothing to do with flow
steering core and they are private to fs_counter.c, this patch moves them
to where they belong and reduces their exposure in the driver.

Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/fs_core.h
drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c

index b51ad217da32d608a95a16909fd5577174a755d0..2dc86347af58716633476a3fc0362aca4a4f1c44 100644 (file)
@@ -145,29 +145,6 @@ struct mlx5_flow_table {
        struct rhltable                 fgs_hash;
 };
 
-struct mlx5_fc_cache {
-       u64 packets;
-       u64 bytes;
-       u64 lastuse;
-};
-
-struct mlx5_fc {
-       struct list_head list;
-       struct llist_node addlist;
-       struct llist_node dellist;
-
-       /* last{packets,bytes} members are used when calculating the delta since
-        * last reading
-        */
-       u64 lastpackets;
-       u64 lastbytes;
-
-       u32 id;
-       bool aging;
-
-       struct mlx5_fc_cache cache ____cacheline_aligned_in_smp;
-};
-
 struct mlx5_ft_underlay_qp {
        struct list_head list;
        u32 qpn;
index 32accd6b041b3b3d16402bcb03204be730794c3c..c6c28f56aa2942cee106ce298d1c3f59d8462914 100644 (file)
 /* Max number of counters to query in bulk read is 32K */
 #define MLX5_SW_MAX_COUNTERS_BULK BIT(15)
 
+struct mlx5_fc_cache {
+       u64 packets;
+       u64 bytes;
+       u64 lastuse;
+};
+
+struct mlx5_fc {
+       struct list_head list;
+       struct llist_node addlist;
+       struct llist_node dellist;
+
+       /* last{packets,bytes} members are used when calculating the delta since
+        * last reading
+        */
+       u64 lastpackets;
+       u64 lastbytes;
+
+       u32 id;
+       bool aging;
+
+       struct mlx5_fc_cache cache ____cacheline_aligned_in_smp;
+};
+
 /* locking scheme:
  *
  * It is the responsibility of the user to prevent concurrent calls or bad