Message ID | 20210408133829.2135103-3-petrm@nvidia.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | tc: Introduce a trap-and-forward action | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Clearly marked for net-next |
netdev/subject_prefix | success | Link |
netdev/cc_maintainers | warning | 1 maintainers not CCed: jiri@resnulli.us |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 4813 this patch: 4813 |
netdev/kdoc | success | Errors and warnings before: 1 this patch: 1 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 26 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 5131 this patch: 5131 |
netdev/header_inline | success | Link |
diff --git a/include/net/flow_offload.h b/include/net/flow_offload.h index dc5c1e69cd9f..5f35523f12b5 100644 --- a/include/net/flow_offload.h +++ b/include/net/flow_offload.h @@ -121,6 +121,7 @@ enum flow_action_id { FLOW_ACTION_ACCEPT = 0, FLOW_ACTION_DROP, FLOW_ACTION_TRAP, + FLOW_ACTION_TRAP_FWD, FLOW_ACTION_GOTO, FLOW_ACTION_REDIRECT, FLOW_ACTION_MIRRED, diff --git a/include/net/tc_act/tc_gact.h b/include/net/tc_act/tc_gact.h index eb8f01c819e6..df9e0a19c826 100644 --- a/include/net/tc_act/tc_gact.h +++ b/include/net/tc_act/tc_gact.h @@ -49,6 +49,11 @@ static inline bool is_tcf_gact_trap(const struct tc_action *a) return __is_tcf_gact_act(a, TC_ACT_TRAP, false); } +static inline bool is_tcf_gact_trap_fwd(const struct tc_action *a) +{ + return __is_tcf_gact_act(a, TC_ACT_TRAP_FWD, false); +} + static inline bool is_tcf_gact_goto_chain(const struct tc_action *a) { return __is_tcf_gact_act(a, TC_ACT_GOTO_CHAIN, true); diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index d3db70865d66..95e37eb50173 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c @@ -3582,6 +3582,8 @@ int tc_setup_flow_action(struct flow_action *flow_action, entry->id = FLOW_ACTION_DROP; } else if (is_tcf_gact_trap(act)) { entry->id = FLOW_ACTION_TRAP; + } else if (is_tcf_gact_trap_fwd(act)) { + entry->id = FLOW_ACTION_TRAP_FWD; } else if (is_tcf_gact_goto_chain(act)) { entry->id = FLOW_ACTION_GOTO; entry->chain_index = tcf_gact_goto_chain_index(act);