diff options
| author | Pieter Jansen van Vuuren <[email protected]> | 2019-05-04 11:46:22 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2019-05-06 04:49:24 +0000 |
| commit | 8c8cfc6ed274e6fb86f00b53f3e7811afce29043 (patch) | |
| tree | 911c4ced555362923bf8774895c1cabc74af0160 /net/sched/cls_api.c | |
| parent | net/sched: move police action structures to header (diff) | |
| download | kernel-8c8cfc6ed274e6fb86f00b53f3e7811afce29043.tar.gz kernel-8c8cfc6ed274e6fb86f00b53f3e7811afce29043.zip | |
net/sched: add police action to the hardware intermediate representation
Add police action to the hardware intermediate representation which
would subsequently allow it to be used by drivers for offload.
Signed-off-by: Pieter Jansen van Vuuren <[email protected]>
Reviewed-by: Jakub Kicinski <[email protected]>
Acked-by: Jiri Pirko <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/sched/cls_api.c')
| -rw-r--r-- | net/sched/cls_api.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index f8ee2d78654a..d4699156974a 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c @@ -37,6 +37,7 @@ #include <net/tc_act/tc_tunnel_key.h> #include <net/tc_act/tc_csum.h> #include <net/tc_act/tc_gact.h> +#include <net/tc_act/tc_police.h> #include <net/tc_act/tc_sample.h> #include <net/tc_act/tc_skbedit.h> @@ -3265,6 +3266,11 @@ int tc_setup_flow_action(struct flow_action *flow_action, entry->sample.trunc_size = tcf_sample_trunc_size(act); entry->sample.truncate = tcf_sample_truncate(act); entry->sample.rate = tcf_sample_rate(act); + } else if (is_tcf_police(act)) { + entry->id = FLOW_ACTION_POLICE; + entry->police.burst = tcf_police_tcfp_burst(act); + entry->police.rate_bytes_ps = + tcf_police_rate_bytes_ps(act); } else { goto err_out; } |
