From: Jesper Dangaard Brouer <brouer@redhat.com>
To: Lorenzo Bianconi <lorenzo@kernel.org>
Cc: netdev@vger.kernel.org, bpf@vger.kernel.org, davem@davemloft.net,
lorenzo.bianconi@redhat.com, echaudro@redhat.com,
sameehj@amazon.com, kuba@kernel.org, brouer@redhat.com
Subject: Re: [PATCH net-next 0/6] mvneta: introduce XDP multi-buffer support
Date: Thu, 20 Aug 2020 15:16:44 +0200 [thread overview]
Message-ID: <20200820151644.00e6c87c@carbon> (raw)
In-Reply-To: <cover.1597842004.git.lorenzo@kernel.org>
General issue (that I think must be resolved/discussed as part of this initial
patchset).
When XDP_REDIRECT'ing a multi-buffer xdp_frame out of another driver's
ndo_xdp_xmit(), what happens if the remote driver doesn't understand the
multi-buffer format?
My guess it that it will only send the first part of the packet (in the
main page). Fortunately we don't leak memory, because xdp_return_frame()
handle freeing the other segments. I assume this isn't acceptable
behavior... or maybe it is?
What are our options for handling this:
1. Add mb support in ndo_xdp_xmit in every driver?
2. Drop xdp->mb frames inside ndo_xdp_xmit (in every driver without support)?
3. Add core-code check before calling ndo_xdp_xmit()?
--Jesper
On Wed, 19 Aug 2020 15:13:45 +0200 Lorenzo Bianconi <lorenzo@kernel.org> wrote:
> Finalize XDP multi-buffer support for mvneta driver introducing the capability
> to map non-linear buffers on tx side.
> Introduce multi-buffer bit (mb) in xdp_frame/xdp_buffer to specify if
> shared_info area has been properly initialized.
> Initialize multi-buffer bit (mb) to 0 in all XDP-capable drivers.
> Add multi-buff support to xdp_return_{buff/frame} utility routines.
>
> Changes since RFC:
> - squash multi-buffer bit initialization in a single patch
> - add mvneta non-linear XDP buff support for tx side
--
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:[~2020-08-20 13:17 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-19 13:13 [PATCH net-next 0/6] mvneta: introduce XDP multi-buffer support Lorenzo Bianconi
2020-08-19 13:13 ` [PATCH net-next 1/6] xdp: introduce mb in xdp_buff/xdp_frame Lorenzo Bianconi
2020-08-23 14:08 ` Shay Agroskin
2020-08-24 8:44 ` Jesper Dangaard Brouer
2020-08-26 9:47 ` Shay Agroskin
2020-08-19 13:13 ` [PATCH net-next 2/6] xdp: initialize xdp_buff mb bit to 0 in all XDP drivers Lorenzo Bianconi
2020-08-19 13:13 ` [PATCH net-next 3/6] net: mvneta: update mb bit before passing the xdp buffer to eBPF layer Lorenzo Bianconi
2020-08-20 8:02 ` Jesper Dangaard Brouer
2020-08-20 8:11 ` Lorenzo Bianconi
2020-08-20 19:38 ` Maciej Fijalkowski
2020-08-21 7:43 ` Lorenzo Bianconi
2020-08-19 13:13 ` [PATCH net-next 4/6] xdp: add multi-buff support to xdp_return_{buff/frame} Lorenzo Bianconi
2020-08-20 7:52 ` Jesper Dangaard Brouer
2020-08-20 7:56 ` Lorenzo Bianconi
2020-08-19 13:13 ` [PATCH net-next 5/6] net: mvneta: add multi buffer support to XDP_TX Lorenzo Bianconi
2020-08-19 13:13 ` [PATCH net-next 6/6] net: mvneta: enable jumbo frames for XDP Lorenzo Bianconi
2020-08-19 19:23 ` Jakub Kicinski
2020-08-19 20:22 ` Lorenzo Bianconi
2020-08-19 21:14 ` Jakub Kicinski
2020-08-19 21:58 ` John Fastabend
2020-08-20 7:47 ` Jesper Dangaard Brouer
2020-08-20 7:54 ` Lorenzo Bianconi
2020-08-20 13:16 ` Jesper Dangaard Brouer [this message]
2020-08-20 13:36 ` [PATCH net-next 0/6] mvneta: introduce XDP multi-buffer support 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=20200820151644.00e6c87c@carbon \
--to=brouer@redhat.com \
--cc=bpf@vger.kernel.org \
--cc=davem@davemloft.net \
--cc=echaudro@redhat.com \
--cc=kuba@kernel.org \
--cc=lorenzo.bianconi@redhat.com \
--cc=lorenzo@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sameehj@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.