From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: Jesper Dangaard Brouer <brouer@redhat.com>
Cc: netdev@vger.kernel.org, jakub.kicinski@netronome.com,
"Michael S. Tsirkin" <mst@redhat.com>,
pavel.odintsov@gmail.com, Jason Wang <jasowang@redhat.com>,
mchan@broadcom.com, John Fastabend <john.fastabend@gmail.com>,
peter.waskiewicz.jr@intel.com,
Daniel Borkmann <borkmann@iogearbox.net>,
Andy Gospodarek <andy@greyhouse.net>
Subject: Re: [net-next V3 PATCH 3/5] bpf: cpumap xdp_buff to skb conversion and allocation
Date: Mon, 2 Oct 2017 18:02:46 -0700 [thread overview]
Message-ID: <20171003010245.f3op4t56crbjc4ke@ast-mbp> (raw)
In-Reply-To: <150696032966.24152.3096148163967111058.stgit@firesoul>
On Mon, Oct 02, 2017 at 06:05:29PM +0200, Jesper Dangaard Brouer wrote:
> + while ((xdp_pkt = __ptr_ring_consume(rcpu->queue))) {
> + struct sk_buff *skb;
> + int ret;
> +
> + /* Allow busy polling again */
> + empty_cnt = 0;
> +
> + skb = cpu_map_build_skb(rcpu, xdp_pkt);
> + if (!skb) {
> + page_frag_free(xdp_pkt);
> + continue;
> + }
> +
> + /* Inject into network stack */
> + ret = netif_receive_skb(skb);
> + if (ret == NET_RX_DROP)
> + drops++;
I thought the whole thing is an alternative to RPS,
but netif_receive_skb_internal() will call into RPS logic.
So the user has to make sure it disabled or they will
conflict in some weird way?
Or you're calling netif_receive_skb() to be able to call
generic XDP on that cpu again ?
But that prog can do cpumap redirect again?
sort-of recursive redirect? Is it really useful?
May be call into __netif_receive_skb_core() directly?
not sure.
I'm asking all these questions to make sure we think through
these implications before it becomes an abi.
next prev parent reply other threads:[~2017-10-03 1:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-02 16:05 [net-next V3 PATCH 0/5] New bpf cpumap type for XDP_REDIRECT Jesper Dangaard Brouer
2017-10-02 16:05 ` [net-next V3 PATCH 1/5] bpf: introduce new bpf cpu map type BPF_MAP_TYPE_CPUMAP Jesper Dangaard Brouer
2017-10-02 16:05 ` [net-next V3 PATCH 2/5] bpf: XDP_REDIRECT enable use of cpumap Jesper Dangaard Brouer
2017-10-02 16:05 ` [net-next V3 PATCH 3/5] bpf: cpumap xdp_buff to skb conversion and allocation Jesper Dangaard Brouer
2017-10-03 1:02 ` Alexei Starovoitov [this message]
2017-10-03 6:58 ` Jesper Dangaard Brouer
2017-10-03 14:18 ` Jesper Dangaard Brouer
2017-10-03 14:25 ` Daniel Borkmann
2017-10-02 16:05 ` [net-next V3 PATCH 4/5] bpf: cpumap add tracepoints Jesper Dangaard Brouer
2017-10-02 16:05 ` [net-next V3 PATCH 5/5] samples/bpf: add cpumap sample program xdp_redirect_cpu Jesper Dangaard Brouer
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=20171003010245.f3op4t56crbjc4ke@ast-mbp \
--to=alexei.starovoitov@gmail.com \
--cc=andy@greyhouse.net \
--cc=borkmann@iogearbox.net \
--cc=brouer@redhat.com \
--cc=jakub.kicinski@netronome.com \
--cc=jasowang@redhat.com \
--cc=john.fastabend@gmail.com \
--cc=mchan@broadcom.com \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=pavel.odintsov@gmail.com \
--cc=peter.waskiewicz.jr@intel.com \
/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