Skip to content

Commit

Permalink
cls_bpf: further limit exec opcodes subset
Browse files Browse the repository at this point in the history
Jamal suggested to further limit the currently allowed subset of opcodes
that may be used by a direct action return code as the intention is not
to replace the full action engine, but rather to have a minimal set that
can be used in the fast-path on things like ingress for some features
that cls_bpf supports.

Classifiers can, of course, still be chained together that have direct
action mode with those that have a full exec pass. For more complex
scenarios that go beyond this minimal set here, the full tcf_exts_exec()
path must be used.

Suggested-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Daniel Borkmann authored and David S. Miller committed Sep 23, 2015
1 parent ef146fa commit 5cf8ca0
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions net/sched/cls_bpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,8 @@ static int cls_bpf_exec_opcode(int code)
{
switch (code) {
case TC_ACT_OK:
case TC_ACT_RECLASSIFY:
case TC_ACT_SHOT:
case TC_ACT_PIPE:
case TC_ACT_STOLEN:
case TC_ACT_QUEUED:
case TC_ACT_REDIRECT:
case TC_ACT_UNSPEC:
return code;
Expand Down

0 comments on commit 5cf8ca0

Please sign in to comment.