lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 11 Sep 2023 08:50:06 +0000
From: "Sarkar, Tirthendu" <tirthendu.sarkar@...el.com>
To: Simon Horman <horms@...nel.org>
CC: "bpf@...r.kernel.org" <bpf@...r.kernel.org>, "netdev@...r.kernel.org"
	<netdev@...r.kernel.org>, "bjorn@...nel.org" <bjorn@...nel.org>, "Karlsson,
 Magnus" <magnus.karlsson@...el.com>, "Fijalkowski, Maciej"
	<maciej.fijalkowski@...el.com>, "jonathan.lemon@...il.com"
	<jonathan.lemon@...il.com>, "davem@...emloft.net" <davem@...emloft.net>,
	"kuba@...nel.org" <kuba@...nel.org>, "pabeni@...hat.com" <pabeni@...hat.com>,
	"ast@...nel.org" <ast@...nel.org>, "daniel@...earbox.net"
	<daniel@...earbox.net>
Subject: RE: [PATCH bpf-next] xsk: add multi-buffer support for sockets
 sharing umem

> -----Original Message-----
> From: Simon Horman <horms@...nel.org>
> Subject: Re: [PATCH bpf-next] xsk: add multi-buffer support for sockets
> sharing umem
> 
> 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@...el.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)

Thanks. We could have a follow up patch with such changes across xsk core.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ