]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
net: sch: red: Change the name of the stats struct to be generic
authorNogah Frankel <nogahf@mellanox.com>
Wed, 10 Jan 2018 13:59:58 +0000 (14:59 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 10 Jan 2018 21:07:40 +0000 (16:07 -0500)
Change the name of the stats struct to be generic, so it could be used for
other qdisc offload, that will be added in the next patches.

Signed-off-by: Nogah Frankel <nogahf@mellanox.com>
Reviewed-by: Yuval Mintz <yuvalm@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c
include/net/pkt_cls.h

index 8172cc902f123705cd5cd6c2dc1d05c834d9a27c..3e2841872f640481e20f9987e1c1b611475eede9 100644 (file)
@@ -229,7 +229,7 @@ static int
 mlxsw_sp_qdisc_get_red_stats(struct mlxsw_sp_port *mlxsw_sp_port, u32 handle,
                             struct mlxsw_sp_qdisc *mlxsw_sp_qdisc,
                             int tclass_num,
-                            struct tc_red_qopt_offload_stats *res)
+                            struct tc_qopt_offload_stats *res)
 {
        u64 tx_bytes, tx_packets, overlimits, drops;
        struct mlxsw_sp_port_xstats *xstats;
index c4f4e46ea8d691914504840175907ff45a3533e0..0d1343cba84cd3e735d325d8c716febb9b058161 100644 (file)
@@ -731,6 +731,11 @@ struct tc_cookie {
        u32 len;
 };
 
+struct tc_qopt_offload_stats {
+       struct gnet_stats_basic_packed *bstats;
+       struct gnet_stats_queue *qstats;
+};
+
 enum tc_red_command {
        TC_RED_REPLACE,
        TC_RED_DESTROY,
@@ -744,10 +749,6 @@ struct tc_red_qopt_offload_params {
        u32 probability;
        bool is_ecn;
 };
-struct tc_red_qopt_offload_stats {
-       struct gnet_stats_basic_packed *bstats;
-       struct gnet_stats_queue *qstats;
-};
 
 struct tc_red_qopt_offload {
        enum tc_red_command command;
@@ -755,7 +756,7 @@ struct tc_red_qopt_offload {
        u32 parent;
        union {
                struct tc_red_qopt_offload_params set;
-               struct tc_red_qopt_offload_stats stats;
+               struct tc_qopt_offload_stats stats;
                struct red_stats *xstats;
        };
 };