Netdev List
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: daniel@iogearbox.net
Cc: edumazet@google.com, alexei.starovoitov@gmail.com,
	netdev@vger.kernel.org
Subject: Re: [PATCH net-next] bpf: add napi_id read access to __sk_buff
Date: Fri, 21 Apr 2017 13:53:39 -0400 (EDT)	[thread overview]
Message-ID: <20170421.135339.120415455520577597.davem@davemloft.net> (raw)
In-Reply-To: <9f477418c0db1091bfb119ef8c159f18384d6100.1492635441.git.daniel@iogearbox.net>

From: Daniel Borkmann <daniel@iogearbox.net>
Date: Wed, 19 Apr 2017 23:01:17 +0200

> Add napi_id access to __sk_buff for socket filter program types, tc
> program types and other bpf_convert_ctx_access() users. Having access
> to skb->napi_id is useful for per RX queue listener siloing, f.e.
> in combination with SO_ATTACH_REUSEPORT_EBPF and when busy polling is
> used, meaning SO_REUSEPORT enabled listeners can then select the
> corresponding socket at SYN time already [1]. The skb is marked via
> skb_mark_napi_id() early in the receive path (e.g., napi_gro_receive()).
> 
> Currently, sockets can only use SO_INCOMING_NAPI_ID from 6d4339028b35
> ("net: Introduce SO_INCOMING_NAPI_ID") as a socket option to look up
> the NAPI ID associated with the queue for steering, which requires a
> prior sk_mark_napi_id() after the socket was looked up.
> 
> Semantics for the __sk_buff napi_id access are similar, meaning if
> skb->napi_id is < MIN_NAPI_ID (e.g. outgoing packets using sender_cpu),
> then an invalid napi_id of 0 is returned to the program, otherwise a
> valid non-zero napi_id.
> 
>   [1] http://netdevconf.org/2.1/slides/apr6/dumazet-BUSY-POLLING-Netdev-2.1.pdf
> 
> Suggested-by: Eric Dumazet <edumazet@google.com>
> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
> Acked-by: Alexei Starovoitov <ast@kernel.org>

Applied, thanks Daniel.

      reply	other threads:[~2017-04-21 18:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-19 21:01 [PATCH net-next] bpf: add napi_id read access to __sk_buff Daniel Borkmann
2017-04-21 17:53 ` David Miller [this message]

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=20170421.135339.120415455520577597.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=alexei.starovoitov@gmail.com \
    --cc=daniel@iogearbox.net \
    --cc=edumazet@google.com \
    --cc=netdev@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