mbox series

[RFC,net-next,0/2] XDP multi buffer helpers

Message ID 20200727125653.31238-1-sameehj@amazon.com
Headers show
Series XDP multi buffer helpers | expand

Message

Jubran, Samih July 27, 2020, 12:56 p.m. UTC
From: Sameeh Jubran <sameehj@amazon.com>

This series is based on the series that Lorenzo sent [0].

This series simply adds new bpf helpers for xdp mb support as well as
introduces a sample program that uses them.

[0] - [RFC net-next 00/22] Introduce mb bit in xdp_buff/xdp_frame

Sameeh Jubran (2):
  xdp: helpers: add multibuffer support
  samples/bpf: add bpf program that uses xdp mb helpers

 include/uapi/linux/bpf.h       |  13 +++
 net/core/filter.c              |  60 ++++++++++++++
 samples/bpf/Makefile           |   3 +
 samples/bpf/xdp_mb_kern.c      |  66 ++++++++++++++++
 samples/bpf/xdp_mb_user.c      | 174 +++++++++++++++++++++++++++++++++++++++++
 tools/include/uapi/linux/bpf.h |  13 +++
 6 files changed, 329 insertions(+)
 create mode 100644 samples/bpf/xdp_mb_kern.c
 create mode 100644 samples/bpf/xdp_mb_user.c

Comments

Maciej Fijalkowski July 28, 2020, 12:33 p.m. UTC | #1
On Mon, Jul 27, 2020 at 12:56:51PM +0000, sameehj@amazon.com wrote:
> From: Sameeh Jubran <sameehj@amazon.com>
> 
> This series is based on the series that Lorenzo sent [0].

What is your final design for multi buffer support in XDP?
Why don't you provide a single RFC that is fully functional but instead
you're sending a bunch of separate RFCs?

IMHO it's a weird strategy. Not sure what others think about.

> 
> This series simply adds new bpf helpers for xdp mb support as well as
> introduces a sample program that uses them.
> 
> [0] - [RFC net-next 00/22] Introduce mb bit in xdp_buff/xdp_frame

Direct link wouldn't hurt I guess :) Please also include all the previous
discussions that took place on mailing list around this topic. This will
make reviewers life easier I suppose. As I asked above, I'm not sure
what's your final design for this feature.

> 
> Sameeh Jubran (2):
>   xdp: helpers: add multibuffer support
>   samples/bpf: add bpf program that uses xdp mb helpers
> 
>  include/uapi/linux/bpf.h       |  13 +++
>  net/core/filter.c              |  60 ++++++++++++++
>  samples/bpf/Makefile           |   3 +
>  samples/bpf/xdp_mb_kern.c      |  66 ++++++++++++++++
>  samples/bpf/xdp_mb_user.c      | 174 +++++++++++++++++++++++++++++++++++++++++
>  tools/include/uapi/linux/bpf.h |  13 +++
>  6 files changed, 329 insertions(+)
>  create mode 100644 samples/bpf/xdp_mb_kern.c
>  create mode 100644 samples/bpf/xdp_mb_user.c
> 
> -- 
> 2.16.6
>
Lorenzo Bianconi July 28, 2020, 12:54 p.m. UTC | #2
> On Mon, Jul 27, 2020 at 12:56:51PM +0000, sameehj@amazon.com wrote:
> > From: Sameeh Jubran <sameehj@amazon.com>
> > 
> > This series is based on the series that Lorenzo sent [0].
> 
> What is your final design for multi buffer support in XDP?
> Why don't you provide a single RFC that is fully functional but instead
> you're sending a bunch of separate RFCs?

Hi Maciej,

IMO the buffer layout is defined now (we will use the trailing part of the
"linear" area of the xdp_buff to store references for subsequent buffers like
we already do for skb).
What is not defined yet are the metadata (e.g. number of frames, total length, ..)
we want to pass to the bpf layer. This is the main reason why I sent this series
[1] as RFC, I want to collect feedbacks about this approach. For the moment (at
least in my series) mb in xdp_buff is just used to indicate if this is a
multi-buff xdp_buff.

> 
> IMHO it's a weird strategy. Not sure what others think about.
> 

we did not coordinate, sorry for the noise.

Regards,
Lorenzo

[1] https://patchwork.ozlabs.org/project/netdev/cover/cover.1595503780.git.lorenzo@kernel.org/

> > 
> > This series simply adds new bpf helpers for xdp mb support as well as
> > introduces a sample program that uses them.
> > 
> > [0] - [RFC net-next 00/22] Introduce mb bit in xdp_buff/xdp_frame
> 
> Direct link wouldn't hurt I guess :) Please also include all the previous
> discussions that took place on mailing list around this topic. This will
> make reviewers life easier I suppose. As I asked above, I'm not sure
> what's your final design for this feature.
> 
> > 
> > Sameeh Jubran (2):
> >   xdp: helpers: add multibuffer support
> >   samples/bpf: add bpf program that uses xdp mb helpers
> > 
> >  include/uapi/linux/bpf.h       |  13 +++
> >  net/core/filter.c              |  60 ++++++++++++++
> >  samples/bpf/Makefile           |   3 +
> >  samples/bpf/xdp_mb_kern.c      |  66 ++++++++++++++++
> >  samples/bpf/xdp_mb_user.c      | 174 +++++++++++++++++++++++++++++++++++++++++
> >  tools/include/uapi/linux/bpf.h |  13 +++
> >  6 files changed, 329 insertions(+)
> >  create mode 100644 samples/bpf/xdp_mb_kern.c
> >  create mode 100644 samples/bpf/xdp_mb_user.c
> > 
> > -- 
> > 2.16.6
> > 
>
Jakub Kicinski July 28, 2020, 6:48 p.m. UTC | #3
On Tue, 28 Jul 2020 14:33:27 +0200 Maciej Fijalkowski wrote:
> On Mon, Jul 27, 2020 at 12:56:51PM +0000, sameehj@amazon.com wrote:
> > From: Sameeh Jubran <sameehj@amazon.com>
> > 
> > This series is based on the series that Lorenzo sent [0].  
> 
> What is your final design for multi buffer support in XDP?
> Why don't you provide a single RFC that is fully functional but instead
> you're sending a bunch of separate RFCs?

+1

are we expecting a new attachment type?