diff options
author | Nogah Frankel <nogahf@mellanox.com> | 2017-11-06 07:23:48 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-11-08 12:23:38 +0900 |
commit | 861fb8294d83ad950dfaa62b0bf8384c66e2cd5e (patch) | |
tree | 62572e3cf06d808c7ede86d7ff9b05a137ceec0d /drivers/net/ethernet/mellanox/mlxsw/spectrum.h | |
parent | 075ab8adaf4e7443159bee6412cb85434c63ed15 (diff) | |
download | lwn-861fb8294d83ad950dfaa62b0bf8384c66e2cd5e.tar.gz lwn-861fb8294d83ad950dfaa62b0bf8384c66e2cd5e.zip |
mlxsw: spectrum: Support RED xstats
Add support for ndo_setup_tc with enum tc_setup_type value of
TC_SETUP_RED_XSTATS. This call returns the RED qdisc xstats from the cache
if the handle ID that is asked for matching the root qdisc ID and fails
otherwise.
Signed-off-by: Nogah Frankel <nogahf@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/spectrum.h')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h index e68299e6a963..a86a493788dd 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h @@ -48,6 +48,7 @@ #include <linux/notifier.h> #include <net/psample.h> #include <net/pkt_cls.h> +#include <net/red.h> #include "port.h" #include "core.h" @@ -211,6 +212,14 @@ enum mlxsw_sp_qdisc_type { struct mlxsw_sp_qdisc { u32 handle; enum mlxsw_sp_qdisc_type type; + struct red_stats xstats_base; + union { + struct { + u64 tail_drop_base; + u64 ecn_base; + u64 wred_drop_base; + } red; + } xstats; }; /* No need an internal lock; At worse - miss a single periodic iteration */ |