netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
To: "Vyavahare, Tushar" <tushar.vyavahare@intel.com>
Cc: "bpf@vger.kernel.org" <bpf@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"bjorn@kernel.org" <bjorn@kernel.org>,
	"Karlsson, Magnus" <magnus.karlsson@intel.com>,
	"jonathan.lemon@gmail.com" <jonathan.lemon@gmail.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"pabeni@redhat.com" <pabeni@redhat.com>,
	"ast@kernel.org" <ast@kernel.org>,
	"daniel@iogearbox.net" <daniel@iogearbox.net>,
	"Sarkar, Tirthendu" <tirthendu.sarkar@intel.com>
Subject: Re: [PATCH bpf-next v3 2/2] selftests/xsk: Add tail adjustment tests and support check
Date: Tue, 18 Mar 2025 15:58:05 +0100	[thread overview]
Message-ID: <Z9mJ/QSbTfa0IW4Z@boxer> (raw)
In-Reply-To: <IA1PR11MB6514B98679051D03FDDED9C78FDE2@IA1PR11MB6514.namprd11.prod.outlook.com>

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

> I will send v4.

  reply	other threads:[~2025-03-18 14:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-05 14:18 [PATCH bpf-next v3 0/2] selftests/xsk: Add tests for XDP tail adjustment in AF_XDP Tushar Vyavahare
2025-03-05 14:18 ` [PATCH bpf-next v3 1/2] selftests/xsk: Add packet stream replacement function Tushar Vyavahare
2025-03-05 14:18 ` [PATCH bpf-next v3 2/2] selftests/xsk: Add tail adjustment tests and support check Tushar Vyavahare
2025-03-11 22:11   ` Maciej Fijalkowski
2025-03-18  9:22     ` Vyavahare, Tushar
2025-03-18 14:58       ` Maciej Fijalkowski [this message]
2025-03-21  1:18         ` Vyavahare, Tushar

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=Z9mJ/QSbTfa0IW4Z@boxer \
    --to=maciej.fijalkowski@intel.com \
    --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=magnus.karlsson@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=tirthendu.sarkar@intel.com \
    --cc=tushar.vyavahare@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).