On Sun, 10 Jul 2016 16:04:16 -0500 Tom Herbert <t...@herbertland.com> wrote:
> > +/* User return codes for XDP prog type. > > + * A valid XDP program must return one of these defined values. All other > > + * return codes are reserved for future use. Unknown return codes will > > result > > + * in driver-dependent behavior. > > + */ > > +enum xdp_action { > > + XDP_DROP, > > + XDP_PASS, > > I think that we should be able to distinguish an abort in BPF program > from a normal programmatic drop. e.g.: > > enum xdp_action { > XDP_ABORTED = 0, > XDP_DROP, > XDP_PASS, > }; I agree. And maybe we can re-use the bpf_warn_invalid_xdp_action() call to keep the branch/jump-table as simple as possible, handling the distinguishing on the slow path. -- Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat Author of http://www.iptv-analyzer.org LinkedIn: http://www.linkedin.com/in/brouer