From: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
To: "Björn Töpel" <bjorn@kernel.org>
Cc: <netdev@vger.kernel.org>, <bpf@vger.kernel.org>,
<magnus.karlsson@intel.com>, <stfomichev@gmail.com>,
<kuba@kernel.org>, <pabeni@redhat.com>, <horms@kernel.org>,
<larysa.zaremba@intel.com>, <aleksander.lobakin@intel.com>
Subject: Re: [PATCH net 5/6] selftests: bpf: fix pkt grow tests
Date: Tue, 17 Mar 2026 11:57:09 +0100 [thread overview]
Message-ID: <abkzhZex8RtzNLdm@boxer> (raw)
In-Reply-To: <87v7euq00g.fsf@all.your.base.are.belong.to.us>
On Tue, Mar 17, 2026 at 10:27:11AM +0100, Björn Töpel wrote:
> Maciej Fijalkowski <maciej.fijalkowski@intel.com> writes:
>
> > Skip tail adjust tests in xskxceiver for SKB mode as it is not very
> > friendly for it. multi-buffer case does not work as xdp_rxq_info that is
> > registered for generic XDP does not report ::frag_size. The non-mbuf
> > path copies packet via skb_pp_cow_data() which only accounts for
> > headroom, leaving us with no tailroom and causing underlying XDP prog to
> > drop packets therefore.
> >
> > For multi-buffer test on other modes, change the amount of bytes we use
> > for growth, assume worst-case scenario and take care of headroom and
> > tailroom.
> >
> > Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
> > ---
> > .../selftests/bpf/prog_tests/test_xsk.c | 21 ++++++++++++++++---
> > 1 file changed, 18 insertions(+), 3 deletions(-)
> >
> > diff --git a/tools/testing/selftests/bpf/prog_tests/test_xsk.c b/tools/testing/selftests/bpf/prog_tests/test_xsk.c
> > index 7e38ec6e656b..a496f1784b66 100644
> > --- a/tools/testing/selftests/bpf/prog_tests/test_xsk.c
> > +++ b/tools/testing/selftests/bpf/prog_tests/test_xsk.c
> > @@ -2551,16 +2551,31 @@ int testapp_adjust_tail_shrink_mb(struct test_spec *test)
> >
> > int testapp_adjust_tail_grow(struct test_spec *test)
> > {
> > + if (test->mode == TEST_MODE_SKB)
> > + return TEST_SKIP;
> > +
> > /* Grow by 4 bytes for testing purpose */
> > return testapp_adjust_tail(test, 4, MIN_PKT_SIZE * 2);
> > }
> >
> > int testapp_adjust_tail_grow_mb(struct test_spec *test)
> > {
> > + u32 grow_size;
> > +
> > + if (test->mode == TEST_MODE_SKB)
> > + return TEST_SKIP;
> > +
> > + /* worst case scenario is when underlying setup will work on 3k
> > + * buffers, let us account for it; given that we will use 6k as
> > + * pkt_len, expect that it will be broken down to 2 descs each
> > + * with 3k payload;
> > + *
> > + * 4k is truesize, 3k payload, 256 HR, 320 TR;
> > + */
> > + grow_size = XSK_UMEM__MAX_FRAME_SIZE - XSK_UMEM__LARGE_FRAME_SIZE - 256 - 320;
>
> nit: Use defines, XDP_PACKET_HEADROOM, and maybe
> SKB_DATA_ALIGN(sizeof(struct skb_shared_info))?
umm right, but the latter would have to be exposed via UAPI ?
next prev parent reply other threads:[~2026-03-17 10:57 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-16 17:45 [PATCH net 0/6] xsk: tailroom reservation and MTU validation Maciej Fijalkowski
2026-03-16 17:45 ` [PATCH net 1/6] xsk: respect tailroom for ZC setups Maciej Fijalkowski
2026-03-16 22:53 ` Stanislav Fomichev
2026-03-17 9:19 ` Björn Töpel
2026-03-17 11:08 ` Maciej Fijalkowski
2026-03-16 17:45 ` [PATCH net 2/6] ice: do not round up result of dbuff calculation for xsk pool Maciej Fijalkowski
2026-03-17 9:21 ` Björn Töpel
2026-03-16 17:45 ` [PATCH net 3/6] i40e: " Maciej Fijalkowski
2026-03-17 9:21 ` Björn Töpel
2026-03-16 17:45 ` [PATCH net 4/6] xsk: validate MTU against usable frame size on bind Maciej Fijalkowski
2026-03-17 9:30 ` Björn Töpel
2026-03-18 16:46 ` Alexander Lobakin
2026-03-16 17:45 ` [PATCH net 5/6] selftests: bpf: fix pkt grow tests Maciej Fijalkowski
2026-03-17 9:27 ` Björn Töpel
2026-03-17 10:57 ` Maciej Fijalkowski [this message]
2026-03-17 12:13 ` Björn Töpel
2026-03-16 17:45 ` [PATCH net 6/6] selftests: bpf: have a separate variable for drop test Maciej Fijalkowski
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=abkzhZex8RtzNLdm@boxer \
--to=maciej.fijalkowski@intel.com \
--cc=aleksander.lobakin@intel.com \
--cc=bjorn@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=larysa.zaremba@intel.com \
--cc=magnus.karlsson@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=stfomichev@gmail.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