Re: [PATCH bpf-next v3 2/2] selftests/xsk: Add tail adjustment tests and support check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 18, 2025 at 10:22:55AM +0100, Vyavahare, Tushar wrote:
> 
> 
> > -----Original Message-----
> > From: Fijalkowski, Maciej <maciej.fijalkowski@xxxxxxxxx>
> > Sent: Wednesday, March 12, 2025 3:41 AM
> > To: Vyavahare, Tushar <tushar.vyavahare@xxxxxxxxx>
> > Cc: bpf@xxxxxxxxxxxxxxx; netdev@xxxxxxxxxxxxxxx; bjorn@xxxxxxxxxx; Karlsson,
> > Magnus <magnus.karlsson@xxxxxxxxx>; jonathan.lemon@xxxxxxxxx;
> > davem@xxxxxxxxxxxxx; kuba@xxxxxxxxxx; pabeni@xxxxxxxxxx;
> > ast@xxxxxxxxxx; daniel@xxxxxxxxxxxxx; Sarkar, Tirthendu
> > <tirthendu.sarkar@xxxxxxxxx>
> > 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@xxxxxxxxx>
> > > ---
> > >  .../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?

> I will send v4.




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux