Thread (1 message) 1 message, 1 author, 2016-11-28

Re: [PATCH net-next 10/11] qede: Add basic XDP support

From: Mintz, Yuval <hidden>
Date: 2016-11-28 20:53:31

quoted
+       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.
 
quoted
+       case XDP_ABORTED:
+       case XDP_DROP:
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help