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, 26 Jun 2023 15:18:23 +0200
From: Maciej Fijalkowski <maciej.fijalkowski@...el.com>
To: Benjamin Poirier <benjamin.poirier@...il.com>
CC: <bpf@...r.kernel.org>, <ast@...nel.org>, <daniel@...earbox.net>,
	<andrii@...nel.org>, <netdev@...r.kernel.org>, <magnus.karlsson@...el.com>,
	<bjorn@...nel.org>, <tirthendu.sarkar@...el.com>,
	<simon.horman@...igine.com>, <toke@...nel.org>
Subject: Re: [PATCH v4 bpf-next 01/22] xsk: prepare 'options' in xdp_desc for
 multi-buffer use

On Thu, Jun 22, 2023 at 03:02:21PM -0400, Benjamin Poirier wrote:
> On 2023-06-15 19:25 +0200, Maciej Fijalkowski wrote:
> > From: Tirthendu Sarkar <tirthendu.sarkar@...el.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@...el.com>
> > ---
> >  include/uapi/linux/if_xdp.h |  7 +++++++
> >  net/xdp/xsk.c               |  8 ++++----
> >  net/xdp/xsk_queue.h         | 12 +++++++++---
> >  3 files changed, 20 insertions(+), 7 deletions(-)
> > 
> [...]
> > diff --git a/net/xdp/xsk_queue.h b/net/xdp/xsk_queue.h
> > index 6d40a77fccbe..ad81b19e6fdf 100644
> > --- a/net/xdp/xsk_queue.h
> > +++ b/net/xdp/xsk_queue.h
> > @@ -130,6 +130,11 @@ static inline bool xskq_cons_read_addr_unchecked(struct xsk_queue *q, u64 *addr)
> >  	return false;
> >  }
> >  
> > +static inline bool xp_unused_options_set(u16 options)
>                                             ^
> To match struct xdp_desc, this should be u32, no?

Of course. Good catch. It's going to be fixed in next revision.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ