From: Stanislav Fomichev <sdf@google.com>
To: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Cc: bpf@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net,
andrii@kernel.org, netdev@vger.kernel.org,
magnus.karlsson@intel.com, tirthendu.sarkar@intel.com,
bjorn@kernel.org
Subject: Re: [PATCH bpf-next 01/21] xsk: prepare 'options' in xdp_desc for multi-buffer use
Date: Thu, 18 May 2023 12:22:16 -0700 [thread overview]
Message-ID: <ZGZ66D8x5Nbp2iYO@google.com> (raw)
In-Reply-To: <20230518180545.159100-2-maciej.fijalkowski@intel.com>
On 05/18, Maciej Fijalkowski wrote:
> From: Tirthendu Sarkar <tirthendu.sarkar@intel.com>
>
> Use the 'options' field in xdp_desc as a packet continuity marker. Since
> 'options' field was unused till now and was expected to be set to 0, the
> 'eop' descriptor will have it set to 0, while the non-eop descriptors
> will have to set it to 1. This ensures legacy applications continue to
> work without needing any change for single-buffer packets.
>
> Add helper functions and extend xskq_prod_reserve_desc() to use the
> 'options' field.
>
> Signed-off-by: Tirthendu Sarkar <tirthendu.sarkar@intel.com>
> ---
> include/uapi/linux/if_xdp.h | 16 ++++++++++++++++
> net/xdp/xsk.c | 8 ++++----
> net/xdp/xsk_queue.h | 12 +++++++++---
> 3 files changed, 29 insertions(+), 7 deletions(-)
>
> diff --git a/include/uapi/linux/if_xdp.h b/include/uapi/linux/if_xdp.h
> index a78a8096f4ce..4acc3a9430f3 100644
> --- a/include/uapi/linux/if_xdp.h
> +++ b/include/uapi/linux/if_xdp.h
> @@ -108,4 +108,20 @@ struct xdp_desc {
>
> /* UMEM descriptor is __u64 */
>
> +/* Flag indicating that the packet continues with the buffer pointed out by the
> + * next frame in the ring. The end of the packet is signalled by setting this
> + * bit to zero. For single buffer packets, every descriptor has 'options' set
> + * to 0 and this maintains backward compatibility.
> + */
> +#define XDP_PKT_CONTD (1 << 0)
> +
> +/* Maximum number of descriptors supported as frags for a packet. So the total
> + * number of descriptors supported for a packet is XSK_DESC_MAX_FRAGS + 1. The
> + * max frags supported by skb is 16 for page sizes greater than 4K and 17 or
This is now a config option CONFIG_MAX_SKB_FRAGS. Can we use it
directly?
next prev parent reply other threads:[~2023-05-18 19:22 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-18 18:05 [PATCH bpf-next 00/21] xsk: multi-buffer support Maciej Fijalkowski
2023-05-18 18:05 ` [PATCH bpf-next 01/21] xsk: prepare 'options' in xdp_desc for multi-buffer use Maciej Fijalkowski
2023-05-18 19:22 ` Stanislav Fomichev [this message]
2023-05-19 17:13 ` Alexei Starovoitov
2023-05-24 8:56 ` Sarkar, Tirthendu
2023-05-24 10:27 ` Maciej Fijalkowski
2023-05-24 14:12 ` Alexei Starovoitov
2023-05-24 16:20 ` Stanislav Fomichev
2023-05-24 16:27 ` Maciej Fijalkowski
2023-05-18 18:05 ` [PATCH bpf-next 02/21] xsk: introduce XSK_USE_SG bind flag for xsk socket Maciej Fijalkowski
2023-05-18 18:05 ` [PATCH bpf-next 03/21] xsk: prepare both copy and zero-copy modes to co-exist Maciej Fijalkowski
2023-05-18 18:05 ` [PATCH bpf-next 04/21] xsk: move xdp_buff's data length check to xsk_rcv_check Maciej Fijalkowski
2023-05-18 18:05 ` [PATCH bpf-next 05/21] xsk: add support for AF_XDP multi-buffer on Rx path Maciej Fijalkowski
2023-05-19 9:42 ` Simon Horman
2023-05-24 10:28 ` Maciej Fijalkowski
2023-05-18 18:05 ` [PATCH bpf-next 06/21] xsk: introduce wrappers and helpers for supporting multi-buffer in Tx path Maciej Fijalkowski
2023-05-18 18:05 ` [PATCH bpf-next 07/21] xsk: allow core/drivers to test EOP bit Maciej Fijalkowski
2023-05-18 18:05 ` [PATCH bpf-next 08/21] xsk: add support for AF_XDP multi-buffer on Tx path Maciej Fijalkowski
2023-05-18 18:05 ` [PATCH bpf-next 09/21] xsk: discard zero length descriptors in " Maciej Fijalkowski
2023-05-18 18:05 ` [PATCH bpf-next 10/21] xsk: support mbuf on ZC RX Maciej Fijalkowski
2023-05-18 21:06 ` kernel test robot
2023-05-18 18:05 ` [PATCH bpf-next 11/21] ice: xsk: add RX multi-buffer support Maciej Fijalkowski
2023-05-18 18:05 ` [PATCH bpf-next 12/21] xsk: support ZC Tx multi-buffer in batch API Maciej Fijalkowski
2023-05-18 18:05 ` [PATCH bpf-next 13/21] xsk: report ZC multi-buffer capability via xdp_features Maciej Fijalkowski
2023-05-18 18:05 ` [PATCH bpf-next 14/21] ice: xsk: Tx multi-buffer support Maciej Fijalkowski
2023-05-18 18:05 ` [PATCH bpf-next 15/21] selftests/xsk: transmit and receive multi-buffer packets Maciej Fijalkowski
2023-05-18 18:05 ` [PATCH bpf-next 16/21] selftests/xsk: add basic multi-buffer test Maciej Fijalkowski
2023-05-18 18:05 ` [PATCH bpf-next 17/21] selftests/xsk: add unaligned mode test for multi-buffer Maciej Fijalkowski
2023-05-18 18:05 ` [PATCH bpf-next 18/21] selftests/xsk: add invalid descriptor " Maciej Fijalkowski
2023-05-18 18:05 ` [PATCH bpf-next 19/21] selftests/xsk: add metadata copy test for multi-buff Maciej Fijalkowski
2023-05-18 18:05 ` [PATCH bpf-next 20/21] selftests/xsk: add test for too many frags Maciej Fijalkowski
2023-05-18 18:05 ` [PATCH bpf-next 21/21] selftests/xsk: reset NIC settings to default after running test suite Maciej Fijalkowski
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=ZGZ66D8x5Nbp2iYO@google.com \
--to=sdf@google.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bjorn@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=maciej.fijalkowski@intel.com \
--cc=magnus.karlsson@intel.com \
--cc=netdev@vger.kernel.org \
--cc=tirthendu.sarkar@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;
as well as URLs for NNTP newsgroup(s).