Subject: Re: [PATCH net-next 7/8] net/mlx5e: XDP TX forwarding support

From: Jesper Dangaard Brouer <[email-masked]>
Date: Tue, 20 Sep 2016 17:57:53 +0200

On Tue, 20 Sep 2016 08:40:37 -0700
Alexei Starovoitov <[email-masked]> wrote:

> On Tue, Sep 20, 2016 at 03:53:10PM +0300, Tariq Toukan wrote:
> > >>>+	case XDP_ABORTED:  
> > >>It is not clearly defined, but I believe XDP_ABORTED should also result
> > >>in a warning (calling bpf_warn_invalid_xdp_action(act)).  
> > I'll add this.  
> 
> Certainly NOT.
> XDP_ABORTED is an exception case when program does divide by zero.
> It should NOT do bpf_warn. It must drop the packet.
> We discussed it several months ago.
> See mlx4/en_rx.c for canonical implementation.

It was certainly not documented, and my memory fails me.

Please explain why a eBPF program error (div by zero) must be a silent drop?

-- 
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