From: Jesper Dangaard Brouer <brouer@redhat.com>
To: David Ahern <dsahern@gmail.com>
Cc: John Fastabend <john.fastabend@gmail.com>,
Alexei Starovoitov <alexei.starovoitov@gmail.com>,
"Md. Islam" <mislam4@kent.edu>,
netdev@vger.kernel.org, David Miller <davem@davemloft.net>,
stephen@networkplumber.org, agaceph@gmail.com,
Pavel Emelyanov <xemul@openvz.org>,
Eric Dumazet <edumazet@google.com>,
brouer@redhat.com
Subject: Re: [PATCH v15 ] net/veth/XDP: Line-rate packet forwarding in kernel
Date: Tue, 3 Apr 2018 20:21:15 +0200 [thread overview]
Message-ID: <20180403202115.44496ad5@redhat.com> (raw)
In-Reply-To: <8832a8a4-24bb-7841-bb84-31f7c05c2b72@gmail.com>
On Tue, 3 Apr 2018 11:00:20 -0600 David Ahern <dsahern@gmail.com> wrote:
> On 4/3/18 10:41 AM, John Fastabend wrote:
> > On 04/03/2018 08:07 AM, David Ahern wrote:
> >> On 4/2/18 12:16 PM, Alexei Starovoitov wrote:
> >>> On Mon, Apr 02, 2018 at 12:09:44PM -0600, David Ahern wrote:
> >>>> On 4/2/18 12:03 PM, John Fastabend wrote:
> >>>>>
[...]
> >>>> That's what I have here:
> >>>>
> >>>> https://github.com/dsahern/linux/commit/bab42f158c0925339f7519df7fb2cde8eac33aa8
> >>>
> >>> was wondering what's up with the delay and when are you going to
> >>> submit them officially...
I'm also eager to see these go upstream! :-)
[...]
> >>
> >> 2. Jesper had concerns about xdp redirect to any netdev. e.g., How does
> >> the lookup know the egress netdev supports xdp? Right now you can try
> >> and the packet is dropped if it is not supported.
> >>
> >
> > There should probably be a tracepoint there if not already. Otherwise
> > I think the orchestration/loader layer should be ensuring that xdp
> > support is sufficient. I don't think we need anything specific in the
> > XDP/BPF code to handle unsupported devices.
>
> ok. I am fine with starting with that.
David this concern was not related to your code. Your code need to
stay generic, to be usable from both XDP and clsact. As John writes
the error cases can be troubleshooted through XDP tracepoints.
My request/concern was actually performance related. I wanted to add a
flag to the helper, to allow for a later optimization. Today, we have
pushed the responsibility, of knowing if an ifindex is XDP-xmit
capable, to the BPF program(mer). This implies that the BPF-prog need
extra code/lookup into a map to validate the ifindex returned from your
helper. Later, we might get some XDP feature bits, and a flag could
specify to only return the looked up device if XDP-xmit is enabled.
Thus, simplifying the work need in the bpf-prog.
--
Best regards,
Jesper Dangaard Brouer
MSc.CS, Principal Kernel Engineer at Red Hat
LinkedIn: http://www.linkedin.com/in/brouer
next prev parent reply other threads:[~2018-04-03 18:21 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-02 0:47 [PATCH v15 ] net/veth/XDP: Line-rate packet forwarding in kernel Md. Islam
2018-04-02 16:51 ` Stephen Hemminger
2018-04-02 18:03 ` John Fastabend
2018-04-02 18:09 ` David Ahern
2018-04-02 18:16 ` Alexei Starovoitov
2018-04-03 15:07 ` David Ahern
2018-04-03 16:41 ` John Fastabend
2018-04-03 16:45 ` David Miller
2018-04-03 17:00 ` David Ahern
2018-04-03 17:06 ` Alexei Starovoitov
2018-04-03 17:14 ` David Ahern
2018-04-03 17:37 ` Alexei Starovoitov
2018-04-04 1:09 ` David Ahern
2018-04-03 18:21 ` Jesper Dangaard Brouer [this message]
2018-04-04 1:16 ` David Ahern
2018-04-04 3:15 ` Md. Islam
2018-04-06 2:55 ` David Ahern
2018-04-10 4:27 ` Md. Islam
2018-04-04 6:16 ` Jesper Dangaard Brouer
2018-04-04 21:09 ` Md. Islam
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180403202115.44496ad5@redhat.com \
--to=brouer@redhat.com \
--cc=agaceph@gmail.com \
--cc=alexei.starovoitov@gmail.com \
--cc=davem@davemloft.net \
--cc=dsahern@gmail.com \
--cc=edumazet@google.com \
--cc=john.fastabend@gmail.com \
--cc=mislam4@kent.edu \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
--cc=xemul@openvz.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).