On Sat, 22 Oct 2016 04:07:23 +0000, Shrijeet Mukherjee wrote:
> +             act = bpf_prog_run_xdp(xdp_prog, &xdp);
> +             switch (act) {
> +             case XDP_PASS:
> +                     return XDP_PASS;
> +             case XDP_TX:
> +             case XDP_ABORTED:
> +             case XDP_DROP:
> +                     return XDP_DROP;
> +             default:
> +                     bpf_warn_invalid_xdp_action(act);
> +             }
> +     }
> +     return XDP_PASS;

FWIW you may want to move the default label before XDP_TX/XDP_ABORT,
to get the behaviour to be drop on unknown ret code.

Reply via email to