Subject: Re: [bpf-next v3 9/9] samples/bpf: Add example of ipv4 and ipv6 forwarding in XDP

From: Jesper Dangaard Brouer <[email-masked]>
Date: Thu, 10 May 2018 09:22:51 +0200

On Wed,  9 May 2018 20:34:27 -0700
David Ahern <[email-masked]> wrote:

> Simple example of fast-path forwarding. It has a serious flaw
> in not verifying the egress device index supports XDP forwarding.
> If the egress device does not packets are dropped.
> 
> Take this only as a simple example of fast-path forwarding.
> 
> Signed-off-by: David Ahern <[email-masked]>
> Acked-by: David S. Miller <[email-masked]>

Acked-by: Jesper Dangaard Brouer <[email-masked]>

I agree that sample program have this flaw, but it should not stop this
patchset. We need to find a more reliable way of detecting/verifying
that an egress device supports XDP forwarding, from within the BPF prog.

As this sample program hints, we could do a lookup in the devmap, to
get this info(?)

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer