diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2018-11-20 00:21:43 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-11-20 03:53:46 +0100 |
commit | e49efd5288bd6670cc05860fe04ef611c3887399 (patch) | |
tree | b080eea5df364d9616d79ec4acda64707acfdd1c /include/net/pkt_cls.h | |
parent | net: sched: gred: add basic Qdisc offload (diff) | |
download | linux-e49efd5288bd6670cc05860fe04ef611c3887399.tar.xz linux-e49efd5288bd6670cc05860fe04ef611c3887399.zip |
net: sched: gred: support reporting stats from offloads
Allow drivers which offload GRED to report back statistics. Since
A lot of GRED stats is fairly ad hoc in nature pass to drivers the
standard struct gnet_stats_basic/gnet_stats_queue pairs, and
untangle the values in the core.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: John Hurley <john.hurley@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/pkt_cls.h')
-rw-r--r-- | include/net/pkt_cls.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h index c9198797aaed..d0e9a8091426 100644 --- a/include/net/pkt_cls.h +++ b/include/net/pkt_cls.h @@ -871,6 +871,7 @@ struct tc_red_qopt_offload { enum tc_gred_command { TC_GRED_REPLACE, TC_GRED_DESTROY, + TC_GRED_STATS, }; struct tc_gred_vq_qopt_offload_params { @@ -895,12 +896,19 @@ struct tc_gred_qopt_offload_params { struct tc_gred_vq_qopt_offload_params tab[MAX_DPs]; }; +struct tc_gred_qopt_offload_stats { + struct gnet_stats_basic_packed bstats[MAX_DPs]; + struct gnet_stats_queue qstats[MAX_DPs]; + struct red_stats *xstats[MAX_DPs]; +}; + struct tc_gred_qopt_offload { enum tc_gred_command command; u32 handle; u32 parent; union { struct tc_gred_qopt_offload_params set; + struct tc_gred_qopt_offload_stats stats; }; }; |