From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jesper Dangaard Brouer Subject: Re: [bpf-next v3 9/9] samples/bpf: Add example of ipv4 and ipv6 forwarding in XDP Date: Thu, 10 May 2018 09:22:51 +0200 Message-ID: <20180510092251.2dc1c904@redhat.com> References: <20180510033427.20756-1-dsahern@gmail.com> <20180510033427.20756-10-dsahern@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, borkmann@iogearbox.net, ast@kernel.org, davem@davemloft.net, shm@cumulusnetworks.com, roopa@cumulusnetworks.com, toke@toke.dk, john.fastabend@gmail.com, brouer@redhat.com, Tariq Toukan To: David Ahern Return-path: Received: from mx3-rdu2.redhat.com ([66.187.233.73]:41648 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933887AbeEJHW4 (ORCPT ); Thu, 10 May 2018 03:22:56 -0400 In-Reply-To: <20180510033427.20756-10-dsahern@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: On Wed, 9 May 2018 20:34:27 -0700 David Ahern 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 > Acked-by: David S. Miller Acked-by: Jesper Dangaard Brouer 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