diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2018-11-19 15:21:44 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-11-19 18:53:46 -0800 |
commit | 990b50a53ad80fe4e0357c7cc41a393eea2b0d76 (patch) | |
tree | baaf234d25bb345bbe15c38a7215afe3c4f037d5 /drivers/net/ethernet/netronome/nfp/abm/main.h | |
parent | net: sched: gred: support reporting stats from offloads (diff) | |
download | linux-dev-990b50a53ad80fe4e0357c7cc41a393eea2b0d76.tar.xz linux-dev-990b50a53ad80fe4e0357c7cc41a393eea2b0d76.zip |
nfp: abm: wrap RED parameters in bands
Wrap RED parameters and stats into a structure, and a 1-element
array. Upcoming GRED offload will add the support for more bands.
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 'drivers/net/ethernet/netronome/nfp/abm/main.h')
-rw-r--r-- | drivers/net/ethernet/netronome/nfp/abm/main.h | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/abm/main.h b/drivers/net/ethernet/netronome/nfp/abm/main.h index 054228c29184..47888288a706 100644 --- a/drivers/net/ethernet/netronome/nfp/abm/main.h +++ b/drivers/net/ethernet/netronome/nfp/abm/main.h @@ -112,11 +112,13 @@ enum nfp_qdisc_type { * @mq.prev_stats: previously reported @mq.stats * * @red: RED Qdisc specific parameters and state - * @red.threshold: ECN marking threshold - * @red.stats: current stats of the RED Qdisc - * @red.prev_stats: previously reported @red.stats - * @red.xstats: extended stats for RED - current - * @red.prev_xstats: extended stats for RED - previously reported + * @red.num_bands: Number of valid entries in the @red.band table + * @red.band: Per-band array of RED instances + * @red.band.threshold: ECN marking threshold + * @red.band.stats: current stats of the RED Qdisc + * @red.band.prev_stats: previously reported @red.stats + * @red.band.xstats: extended stats for RED - current + * @red.band.prev_xstats: extended stats for RED - previously reported */ struct nfp_qdisc { struct net_device *netdev; @@ -139,11 +141,15 @@ struct nfp_qdisc { } mq; /* TC_SETUP_QDISC_RED */ struct { - u32 threshold; - struct nfp_alink_stats stats; - struct nfp_alink_stats prev_stats; - struct nfp_alink_xstats xstats; - struct nfp_alink_xstats prev_xstats; + unsigned int num_bands; + + struct { + u32 threshold; + struct nfp_alink_stats stats; + struct nfp_alink_stats prev_stats; + struct nfp_alink_xstats xstats; + struct nfp_alink_xstats prev_xstats; + } band[1]; } red; }; }; |