[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <IA1PR11MB65145E703957897F13B65A648FDB2@IA1PR11MB6514.namprd11.prod.outlook.com>
Date: Fri, 21 Mar 2025 01:18:21 +0000
From: "Vyavahare, Tushar" <tushar.vyavahare@...el.com>
To: "Fijalkowski, Maciej" <maciej.fijalkowski@...el.com>
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>, "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>, "Sarkar, Tirthendu" <tirthendu.sarkar@...el.com>
Subject: RE: [PATCH bpf-next v3 2/2] selftests/xsk: Add tail adjustment tests
and support check
> -----Original Message-----
> From: Fijalkowski, Maciej <maciej.fijalkowski@...el.com>
> Sent: Tuesday, March 18, 2025 8:28 PM
> To: Vyavahare, Tushar <tushar.vyavahare@...el.com>
> Cc: bpf@...r.kernel.org; netdev@...r.kernel.org; bjorn@...nel.org; Karlsson,
> Magnus <magnus.karlsson@...el.com>; jonathan.lemon@...il.com;
> davem@...emloft.net; kuba@...nel.org; pabeni@...hat.com;
> ast@...nel.org; daniel@...earbox.net; Sarkar, Tirthendu
> <tirthendu.sarkar@...el.com>
> Subject: Re: [PATCH bpf-next v3 2/2] selftests/xsk: Add tail adjustment tests
> and support check
>
> On Tue, Mar 18, 2025 at 10:22:55AM +0100, Vyavahare, Tushar wrote:
> >
> >
> > > -----Original Message-----
> > > From: Fijalkowski, Maciej <maciej.fijalkowski@...el.com>
> > > Sent: Wednesday, March 12, 2025 3:41 AM
> > > To: Vyavahare, Tushar <tushar.vyavahare@...el.com>
> > > Cc: bpf@...r.kernel.org; netdev@...r.kernel.org; bjorn@...nel.org;
> > > Karlsson, Magnus <magnus.karlsson@...el.com>;
> > > jonathan.lemon@...il.com; davem@...emloft.net; kuba@...nel.org;
> > > pabeni@...hat.com; ast@...nel.org; daniel@...earbox.net; Sarkar,
> > > Tirthendu <tirthendu.sarkar@...el.com>
> > > Subject: Re: [PATCH bpf-next v3 2/2] selftests/xsk: Add tail
> > > adjustment tests and support check
> > >
> > > On Wed, Mar 05, 2025 at 02:18:13PM +0000, Tushar Vyavahare wrote:
> > > > Introduce tail adjustment functionality in xskxceiver using
> > > > bpf_xdp_adjust_tail(). Add `xsk_xdp_adjust_tail` to modify packet
> > > > sizes and drop unmodified packets. Implement
> > > > `is_adjust_tail_supported` to check helper availability. Develop
> > > > packet resizing tests, including shrinking and growing scenarios,
> > > > with functions for both single-buffer and multi-buffer cases.
> > > > Update the test framework to handle various scenarios and adjust MTU
> settings.
> > > > These changes enhance the testing of packet tail adjustments,
> > > > improving
> > > AF_XDP framework reliability.
> > > >
> > > > Signed-off-by: Tushar Vyavahare <tushar.vyavahare@...el.com>
> > > > ---
> > > > .../selftests/bpf/progs/xsk_xdp_progs.c | 49 ++++++++
> > > > tools/testing/selftests/bpf/xsk_xdp_common.h | 1 +
> > > > tools/testing/selftests/bpf/xskxceiver.c | 107 +++++++++++++++++-
> > > > tools/testing/selftests/bpf/xskxceiver.h | 2 +
> > > > 4 files changed, 157 insertions(+), 2 deletions(-)
> > > >
> > > > + return testapp_adjust_tail(test, adjust_value, len); }
> > > > +
> > > > +static int testapp_adjust_tail_shrink(struct test_spec *test) {
> > > > + return testapp_adjust_tail_common(test, -4, MIN_PKT_SIZE,
> > > > +false); }
> > > > +
> > > > +static int testapp_adjust_tail_shrink_mb(struct test_spec *test) {
> > > > + return testapp_adjust_tail_common(test, -4,
> > > > +XSK_RING_PROD__DEFAULT_NUM_DESCS * 3, true);
> > >
> > > Am I reading this right that you are modifying the size by just 4 bytes?
> > > The bugs that drivers had were for cases when packets got modified
> > > by value bigger than frag size which caused for example underlying page
> being freed.
> > >
> > > If that is the case tests do nothing valuable from my perspective.
> > >
> >
> > In the v4 patchset, I have updated the code to modify the packet size
> > by
> > 1024 bytes instead of just 4 bytes.
>
> Why this value?
>
Thanks for the clarification, Maciej. Based on our discussion, add
comments and modify the code for buffer resizing logic in the test
cases to shrink/grow by specific byte sizes for testing purposes.
> > I will send v4.
Powered by blists - more mailing lists