From: Jesper Dangaard Brouer <brouer@redhat.com>
To: David Miller <davem@davemloft.net>
Cc: alexei.starovoitov@gmail.com, netdev@vger.kernel.org,
xdp-newbies@vger.kernel.org, brouer@redhat.com
Subject: Re: [PATCH v3 net-next RFC] Generic XDP
Date: Fri, 14 Apr 2017 11:05:25 +0200 [thread overview]
Message-ID: <20170414110525.41317f5a@redhat.com> (raw)
In-Reply-To: <20170413.113722.2174945057832588335.davem@davemloft.net>
On Thu, 13 Apr 2017 11:37:22 -0400 (EDT)
David Miller <davem@davemloft.net> wrote:
> From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
> Date: Wed, 12 Apr 2017 21:20:38 -0700
>
> > On Wed, Apr 12, 2017 at 02:54:15PM -0400, David Miller wrote:
[...]
>
> If the capability is variable, it must be communicated to the user
> somehow at program load time.
>
> We are consistently finding that there is this real need to
> communicate XDP capabilities, or somehow verify that the needs
> of an XDP program can be satisfied by a given implementation.
I fully agree that we need some way to express capabilities[1]
[1] http://prototype-kernel.readthedocs.io/en/latest/networking/XDP/design/design.html#capabilities-negotiation
> Maximum headroom is just one.
[...]
>
> We can only optimize this and elide things when we have a facility in
> the future for the program to express it's needs precisely. I think
> we will have to add some control structure to XDP programs that can
> be filled in for this purpose.
I fully agree that we need some control structure to XDP programs. My
previous attempt was shot-down due to performance concerns of an extra
pointer dereference. As I explained before, this is not a concern as
the dereference will happen once per N packets in the NAPI loop.
Plus now we see a need to elide things based on facilities the XDP
program choose to use/enable, for performance reasons. I would prefer
keeping these facility settings in control structure to XDP programs,
instead of pulling in derived bits runtime. Again remember, adding
if/branch statements checking for facilities, should have little
performance impact as the branch predictor should guess correctly given
we process N packets in the NAPI loop with same facilities.
--
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:[~2017-04-14 9:05 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-12 18:54 [PATCH v3 net-next RFC] Generic XDP David Miller
2017-04-12 19:54 ` David Ahern
2017-04-13 2:08 ` David Miller
2017-04-13 2:16 ` David Ahern
2017-04-12 21:30 ` Stephen Hemminger
2017-04-12 21:49 ` Eric Dumazet
2017-04-13 1:55 ` David Miller
2017-04-13 1:54 ` David Miller
2017-04-13 4:20 ` Alexei Starovoitov
2017-04-13 6:10 ` Johannes Berg
2017-04-13 15:38 ` David Miller
2017-04-14 19:41 ` Alexei Starovoitov
2017-04-18 9:47 ` Johannes Berg
2017-04-18 23:09 ` Alexei Starovoitov
2017-04-13 15:37 ` David Miller
2017-04-13 19:22 ` Johannes Berg
2017-04-13 20:01 ` David Miller
2017-04-14 8:07 ` Johannes Berg
2017-04-14 19:09 ` Alexei Starovoitov
2017-04-14 9:05 ` Jesper Dangaard Brouer [this message]
2017-04-14 19:28 ` Alexei Starovoitov
2017-04-14 22:18 ` Daniel Borkmann
2017-04-14 22:30 ` Jakub Kicinski
2017-04-15 0:46 ` Alexei Starovoitov
2017-04-15 1:47 ` Jakub Kicinski
2017-04-16 20:26 ` Jesper Dangaard Brouer
2017-04-17 19:49 ` David Miller
2017-04-17 23:04 ` Alexei Starovoitov
2017-04-17 23:33 ` Daniel Borkmann
2017-04-18 18:46 ` David Miller
2017-04-18 23:05 ` Alexei Starovoitov
2017-04-13 6:48 ` Michael Chan
2017-04-13 15:38 ` David Miller
2017-04-13 15:57 ` Daniel Borkmann
2017-04-13 16:04 ` David Miller
2017-04-13 17:13 ` aa5c2fd79f: net/core/dev.c:#suspicious_rcu_dereference_check()usage kernel test robot
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=20170414110525.41317f5a@redhat.com \
--to=brouer@redhat.com \
--cc=alexei.starovoitov@gmail.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=xdp-newbies@vger.kernel.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).