> > +       if (act == XDP_PASS)
> > +               return true;
> > +
> > +       /* Count number of packets not to be passed to stack */
> > +       rxq->xdp_no_pass++;
> > +
> > +       switch (act) {
> > +       default:
> > +               bpf_warn_invalid_xdp_action(act);

> XDP_TX is a valid action and in fact some drivers already support that.
> Given that this isn't the first instance of driver not supporting XDP_TX
> I think we need to clear define what means. Personally, I think that we
> shouldn't allow a program to load that  returns XDP_TX but driver does
> not support it. I believe Jesper might be looking into capabilities
> support for XDP to handle that. For the purposes of this patch I'd suggest
> having an XDP_TX case and warn user that an unsupported action
> as opposed to invalid  one was returned.

Patch #11 does add XDP_TX support.
Adding an explicit case with a warning to be removed in the next patch
sounds like a waste to me. But if you think 'future generations' would
benefit from it, sure.
 
> > +       case XDP_ABORTED:
> > +       case XDP_DROP:

Reply via email to