diff options
author | Xiaoliang Yang <xiaoliang.yang_1@nxp.com> | 2021-11-18 18:11:59 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-11-18 12:07:23 +0000 |
commit | 23e2c506ad6c588b469e3d06cc20299434440d02 (patch) | |
tree | a88b756a3bd37954c4af8c4dc591f1e3aa1ab720 /include/soc | |
parent | 5b1918a54a9180fdb2276dd4a90976e066c410da (diff) | |
download | linux-rpi-23e2c506ad6c588b469e3d06cc20299434440d02.tar.gz linux-rpi-23e2c506ad6c588b469e3d06cc20299434440d02.tar.bz2 linux-rpi-23e2c506ad6c588b469e3d06cc20299434440d02.zip |
net: mscc: ocelot: add gate and police action offload to PSFP
PSFP support gate and police action. This patch add the gate and police
action to flower parse action, check chain ID to determine which block
to offload. Adding psfp callback functions to add, delete and update gate
and police in PSFP table if hardware supports it.
Signed-off-by: Xiaoliang Yang <xiaoliang.yang_1@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/soc')
-rw-r--r-- | include/soc/mscc/ocelot.h | 5 | ||||
-rw-r--r-- | include/soc/mscc/ocelot_vcap.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/include/soc/mscc/ocelot.h b/include/soc/mscc/ocelot.h index 1d5ff11e4100..e9985ace59c0 100644 --- a/include/soc/mscc/ocelot.h +++ b/include/soc/mscc/ocelot.h @@ -555,6 +555,11 @@ struct ocelot_ops { u16 (*wm_enc)(u16 value); u16 (*wm_dec)(u16 value); void (*wm_stat)(u32 val, u32 *inuse, u32 *maxuse); + void (*psfp_init)(struct ocelot *ocelot); + int (*psfp_filter_add)(struct ocelot *ocelot, struct flow_cls_offload *f); + int (*psfp_filter_del)(struct ocelot *ocelot, struct flow_cls_offload *f); + int (*psfp_stats_get)(struct ocelot *ocelot, struct flow_cls_offload *f, + struct flow_stats *stats); }; struct ocelot_vcap_block { diff --git a/include/soc/mscc/ocelot_vcap.h b/include/soc/mscc/ocelot_vcap.h index eeb1142aa1b1..9cca2f8e61a2 100644 --- a/include/soc/mscc/ocelot_vcap.h +++ b/include/soc/mscc/ocelot_vcap.h @@ -656,6 +656,7 @@ enum ocelot_vcap_filter_type { OCELOT_VCAP_FILTER_DUMMY, OCELOT_VCAP_FILTER_PAG, OCELOT_VCAP_FILTER_OFFLOAD, + OCELOT_PSFP_FILTER_OFFLOAD, }; struct ocelot_vcap_id { |