From: Jesper Dangaard Brouer <brouer@redhat.com>
To: Song Liu <liu.song.a23@gmail.com>
Cc: Networking <netdev@vger.kernel.org>,
Daniel Borkmann <borkmann@iogearbox.net>,
Alexei Starovoitov <alexei.starovoitov@gmail.com>,
John Fastabend <john.fastabend@gmail.com>,
makita.toshiaki@lab.ntt.co.jp, brouer@redhat.com
Subject: Re: [bpf-next V1 PATCH 8/8] bpf/xdp: devmap can avoid calling ndo_xdp_flush
Date: Thu, 31 May 2018 09:49:02 +0200 [thread overview]
Message-ID: <20180531094902.34956b98@redhat.com> (raw)
In-Reply-To: <CAPhsuW7rV61_8xLhQmLRLO0Ak9Y+D=o5ytonwjsQNkVCiJ-Btg@mail.gmail.com>
On Wed, 30 May 2018 15:06:27 -0700
Song Liu <liu.song.a23@gmail.com> wrote:
> > diff --git a/kernel/bpf/devmap.c b/kernel/bpf/devmap.c
> > index 04fbd75a5274..9c846a7a8cff 100644
> > --- a/kernel/bpf/devmap.c
> > +++ b/kernel/bpf/devmap.c
> > @@ -217,7 +217,7 @@ void __dev_map_insert_ctx(struct bpf_map *map, u32 bit)
> > }
> >
> > static int bq_xmit_all(struct bpf_dtab_netdev *obj,
> > - struct xdp_bulk_queue *bq)
> > + struct xdp_bulk_queue *bq, bool flush)
>
> How about we use "int flags" instead of "bool flush" for easier extension?
This is an internal function in devmap.c, so we can change it
completely as we like. But I do see your point, and will change this
to match the flags type of ndo_xdp_xmit, because that allows us to pass
this directly to that function without any conditional statements
(although I was expecting to compiler to optimized this out anyway).
--
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-05-31 7:49 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-30 18:00 [bpf-next V1 PATCH 0/8] bpf/xdp: add flags argument to ndo_xdp_xmit and flag flush operation Jesper Dangaard Brouer
2018-05-30 18:00 ` [bpf-next V1 PATCH 1/8] xdp: add flags argument to ndo_xdp_xmit API Jesper Dangaard Brouer
2018-05-30 21:55 ` Song Liu
2018-05-30 18:00 ` [bpf-next V1 PATCH 2/8] i40e: implement flush flag for ndo_xdp_xmit Jesper Dangaard Brouer
2018-05-30 21:58 ` Song Liu
2018-05-31 8:40 ` Jesper Dangaard Brouer
2018-05-31 8:47 ` Jesper Dangaard Brouer
2018-05-30 18:00 ` [bpf-next V1 PATCH 3/8] ixgbe: " Jesper Dangaard Brouer
2018-05-30 18:00 ` [bpf-next V1 PATCH 4/8] tun: " Jesper Dangaard Brouer
2018-05-30 18:00 ` [bpf-next V1 PATCH 5/8] virtio_net: " Jesper Dangaard Brouer
2018-05-30 18:01 ` [bpf-next V1 PATCH 6/8] xdp: done implementing ndo_xdp_xmit flush flag for all drivers Jesper Dangaard Brouer
2018-05-30 18:01 ` [bpf-next V1 PATCH 7/8] bpf/xdp: non-map redirect can avoid calling ndo_xdp_flush Jesper Dangaard Brouer
2018-05-30 18:01 ` [bpf-next V1 PATCH 8/8] bpf/xdp: devmap " Jesper Dangaard Brouer
2018-05-30 22:06 ` Song Liu
2018-05-31 7:49 ` Jesper Dangaard Brouer [this message]
2018-05-30 22:18 ` [bpf-next V1 PATCH 0/8] bpf/xdp: add flags argument to ndo_xdp_xmit and flag flush operation Song Liu
2018-05-31 7:39 ` 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=20180531094902.34956b98@redhat.com \
--to=brouer@redhat.com \
--cc=alexei.starovoitov@gmail.com \
--cc=borkmann@iogearbox.net \
--cc=john.fastabend@gmail.com \
--cc=liu.song.a23@gmail.com \
--cc=makita.toshiaki@lab.ntt.co.jp \
--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;
as well as URLs for NNTP newsgroup(s).