From: Simon Horman <horms@kernel.org>
To: Tirthendu Sarkar <tirthendu.sarkar@intel.com>
Cc: bpf@vger.kernel.org, netdev@vger.kernel.org, bjorn@kernel.org,
magnus.karlsson@intel.com, maciej.fijalkowski@intel.com,
jonathan.lemon@gmail.com, davem@davemloft.net, kuba@kernel.org,
pabeni@redhat.com, ast@kernel.org, daniel@iogearbox.net
Subject: Re: [PATCH bpf-next] xsk: add multi-buffer support for sockets sharing umem
Date: Thu, 7 Sep 2023 17:12:50 +0200 [thread overview]
Message-ID: <20230907151250.GH434333@kernel.org> (raw)
In-Reply-To: <20230907035032.2627879-1-tirthendu.sarkar@intel.com>
On Thu, Sep 07, 2023 at 09:20:32AM +0530, Tirthendu Sarkar wrote:
> Userspace applications indicate their multi-buffer capability to xsk
> using XSK_USE_SG socket bind flag. For sockets using shared umem the
> bind flag may contain XSK_USE_SG only for the first socket. For any
> subsequent socket the only option supported is XDP_SHARED_UMEM.
>
> Add option XDP_UMEM_SG_FLAG in umem config flags to store the
> multi-buffer handling capability when indicated by XSK_USE_SG option in
> bing flag by the first socket. Use this to derive multi-buffer capability
> for subsequent sockets in xsk core.
>
> Signed-off-by: Tirthendu Sarkar <tirthendu.sarkar@intel.com>
> Fixes: 81470b5c3c66 ("xsk: introduce XSK_USE_SG bind flag for xsk socket")
> ---
> include/net/xdp_sock.h | 2 ++
> net/xdp/xsk.c | 2 +-
> net/xdp/xsk_buff_pool.c | 3 +++
> 3 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/include/net/xdp_sock.h b/include/net/xdp_sock.h
> index 1617af380162..69b472604b86 100644
> --- a/include/net/xdp_sock.h
> +++ b/include/net/xdp_sock.h
> @@ -14,6 +14,8 @@
> #include <linux/mm.h>
> #include <net/sock.h>
>
> +#define XDP_UMEM_SG_FLAG (1 << 1)
nit: This could be BIT(1)
next prev parent reply other threads:[~2023-09-07 15:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-07 3:50 [PATCH bpf-next] xsk: add multi-buffer support for sockets sharing umem Tirthendu Sarkar
2023-09-07 8:12 ` Maciej Fijalkowski
2023-09-07 15:12 ` Simon Horman [this message]
2023-09-11 8:50 ` Sarkar, Tirthendu
2023-09-15 18:10 ` patchwork-bot+netdevbpf
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=20230907151250.GH434333@kernel.org \
--to=horms@kernel.org \
--cc=ast@kernel.org \
--cc=bjorn@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=jonathan.lemon@gmail.com \
--cc=kuba@kernel.org \
--cc=maciej.fijalkowski@intel.com \
--cc=magnus.karlsson@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--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 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.