On 28/10/2019 17:11, Charles McLachlan wrote:
quoted
quoted
+ efx_free_rx_buffers(rx_queue, rx_buf, 1);
+ break;
You can do a /* Fall through */ to case XDP_DROP.
but not if I put the trace_xdp_exception in as well. I think we're always going
to need two efx_free_rx_buffers calls.
This will probably make people scream, but I have an evil hack to deal with
situations like this:
default:
bpf_warn_invalid_xdp_action(xdp_act);
if (0) /* Fall further */
/* Fall through */
case XDP_ABORTED:
trace_xdp_exception(netdev, xdp_prog, xdp_act);
/* Fall through */
case XDP_DROP:
efx_free_rx_buffers(rx_queue, rx_buf, 1);
break;
I wonder if gcc's Wimplicit-fallthrough logic can comprehend that? Or if
it'll trigger -Wmisleading-indentation?
-Ed