netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jesper Dangaard Brouer <brouer@redhat.com>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: Lorenzo Bianconi <lorenzo@kernel.org>,
	netdev@vger.kernel.org, bpf@vger.kernel.org, davem@davemloft.net,
	sameehj@amazon.com, kuba@kernel.org, john.fastabend@gmail.com,
	daniel@iogearbox.net, ast@kernel.org, shayagr@amazon.com,
	echaudro@redhat.com, lorenzo.bianconi@redhat.com,
	dsahern@kernel.org, brouer@redhat.com
Subject: Re: [PATCH v3 net-next 06/12] bpf: helpers: add multibuffer support
Date: Thu, 1 Oct 2020 11:47:00 +0200	[thread overview]
Message-ID: <20201001114700.6384e6cc@carbon> (raw)
In-Reply-To: <20200930191121.jm62rlopekegbjx5@ast-mbp.dhcp.thefacebook.com>

On Wed, 30 Sep 2020 12:11:21 -0700
Alexei Starovoitov <alexei.starovoitov@gmail.com> wrote:

> On Wed, Sep 30, 2020 at 05:41:57PM +0200, Lorenzo Bianconi wrote:
> > From: Sameeh Jubran <sameehj@amazon.com>
> > 
> > The implementation is based on this [0] draft by Jesper D. Brouer.

First of all I think you are giving me too much credit, and this is
both not really relevant and also not specific enough.  The link[0]
contains several proposals (actually from different people) and it is
not clear which of these proposal you reference.

I think this patch need to explain and argue why these BPF-helpers
makes sense... this will become BPF UAPI.

> > Provided two new helpers:
> > 
> > * bpf_xdp_get_frag_count()
> > * bpf_xdp_get_frags_total_size()

Why was the "frag" and "frags" name chosen?

 
> > [0] xdp mb design - https://github.com/xdp-project/xdp-project/blob/master/areas/core/xdp-multi-buffer01-design.org
> > Signed-off-by: Sameeh Jubran <sameehj@amazon.com>
> > Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org>
> > Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> > ---
> >  include/uapi/linux/bpf.h       | 14 ++++++++++++
> >  net/core/filter.c              | 42 ++++++++++++++++++++++++++++++++++
> >  tools/include/uapi/linux/bpf.h | 14 ++++++++++++
> >  3 files changed, 70 insertions(+)
> > 
> > diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
> > index a22812561064..6f97dce8cccf 100644
> > --- a/include/uapi/linux/bpf.h
> > +++ b/include/uapi/linux/bpf.h
> > @@ -3586,6 +3586,18 @@ union bpf_attr {
> >   * 		the data in *dst*. This is a wrapper of **copy_from_user**\ ().
> >   * 	Return
> >   * 		0 on success, or a negative error in case of failure.
> > + *
> > + * int bpf_xdp_get_frag_count(struct xdp_buff *xdp_md)
> > + *	Description
> > + *		Get the number of fragments for a given xdp multi-buffer.
> > + *	Return
> > + *		The number of fragments
> > + *
> > + * int bpf_xdp_get_frags_total_size(struct xdp_buff *xdp_md)
> > + *	Description
> > + *		Get the total size of fragments for a given xdp multi-buffer.
> > + *	Return
> > + *		The total size of fragments for a given xdp multi-buffer.
> >   */
> >  #define __BPF_FUNC_MAPPER(FN)		\
> >  	FN(unspec),			\
> > @@ -3737,6 +3749,8 @@ union bpf_attr {
> >  	FN(inode_storage_delete),	\
> >  	FN(d_path),			\
> >  	FN(copy_from_user),		\
> > +	FN(xdp_get_frag_count),		\
> > +	FN(xdp_get_frags_total_size),	\
> >  	/* */  
> 
> Please route the set via bpf-next otherwise merge conflicts will be severe.
> 



-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer


  reply	other threads:[~2020-10-01  9:47 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-30 15:41 [PATCH v3 net-next 00/12] mvneta: introduce XDP multi-buffer support Lorenzo Bianconi
2020-09-30 15:41 ` [PATCH v3 net-next 01/12] xdp: introduce mb in xdp_buff/xdp_frame Lorenzo Bianconi
2020-09-30 15:41 ` [PATCH v3 net-next 02/12] xdp: initialize xdp_buff mb bit to 0 in all XDP drivers Lorenzo Bianconi
2020-09-30 15:41 ` [PATCH v3 net-next 03/12] net: mvneta: update mb bit before passing the xdp buffer to eBPF layer Lorenzo Bianconi
2020-09-30 15:41 ` [PATCH v3 net-next 04/12] xdp: add multi-buff support to xdp_return_{buff/frame} Lorenzo Bianconi
2020-09-30 15:41 ` [PATCH v3 net-next 05/12] net: mvneta: add multi buffer support to XDP_TX Lorenzo Bianconi
2020-09-30 15:41 ` [PATCH v3 net-next 06/12] bpf: helpers: add multibuffer support Lorenzo Bianconi
2020-09-30 19:11   ` Alexei Starovoitov
2020-10-01  9:47     ` Jesper Dangaard Brouer [this message]
2020-10-01 15:05     ` Lorenzo Bianconi
2020-10-01 15:40       ` Alexei Starovoitov
2020-10-01 15:44         ` Lorenzo Bianconi
2020-09-30 15:41 ` [PATCH v3 net-next 07/12] samples/bpf: add bpf program that uses xdp mb helpers Lorenzo Bianconi
2020-09-30 15:41 ` [PATCH v3 net-next 08/12] bpf: move user_size out of bpf_test_init Lorenzo Bianconi
2020-09-30 15:42 ` [PATCH v3 net-next 09/12] bpf: introduce multibuff support to bpf_prog_test_run_xdp() Lorenzo Bianconi
2020-09-30 15:42 ` [PATCH v3 net-next 10/12] bpf: add xdp multi-buffer selftest Lorenzo Bianconi
2020-10-01  7:43   ` Eelco Chaudron
2020-09-30 15:42 ` [PATCH v3 net-next 11/12] net: mvneta: enable jumbo frames for XDP Lorenzo Bianconi
2020-09-30 15:42 ` [PATCH v3 net-next 12/12] bpf: cpumap: introduce xdp multi-buff support Lorenzo Bianconi
2020-09-30 16:31 ` [PATCH v3 net-next 00/12] mvneta: introduce XDP multi-buffer support Jakub Kicinski
2020-09-30 16:39   ` Lorenzo Bianconi
2020-09-30 21:40     ` Jakub Kicinski
2020-09-30 19:47 ` John Fastabend
2020-10-01  9:04   ` Lorenzo Bianconi

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=20201001114700.6384e6cc@carbon \
    --to=brouer@redhat.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=echaudro@redhat.com \
    --cc=john.fastabend@gmail.com \
    --cc=kuba@kernel.org \
    --cc=lorenzo.bianconi@redhat.com \
    --cc=lorenzo@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sameehj@amazon.com \
    --cc=shayagr@amazon.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;
as well as URLs for NNTP newsgroup(s).