On Fri, Oct 16, 2026 at 1:23 AM Eric Dumazet <[email protected]> wrote:
>
> Le ven. 16 oct. 2026 à 10:22, Eric Dumazet <[email protected]> a écrit :
> >
> > Le ven. 16 oct. 2026 à 09:54, Kuniyuki Iwashima <[email protected]> a écrit
> > :
> > >
> > > On Thu, Oct 15, 2026 at 12:37 AM Octavian Purdila <[email protected]>
> > > wrote:
> > > >
> > > > Add a packetdrill test that drives sk->sk_forward_alloc negative via
> > > > tcp_collapse() on the receive queue while sk->sk_wmem_queued exceeds
> > > > sysctl_tcp_wmem[0], and verifies that a subsequent non-blocking write()
> > > > under TCP memory pressure fails with EAGAIN rather than returning a
> > > > negative copy length from tcp_wmem_schedule() and failing with EFAULT.
> > > >
> > > > Assisted-by: LLM
> > > > Signed-off-by: Octavian Purdila <[email protected]>
> > >
> > > Reviewed-by: Kuniyuki Iwashima <[email protected]>
> > >
> > > Thanks !
> >
> > Are you sure this test is passing on arches with 6K pages (as some
> > arm64 and ppc64 platforms) ?
>
> This was meant to read : 64K pages.
>
> > We might need to add a check to only run it on 4K platforms.
Ah, yes it would not pass. Thanks! I plan to add a check like the one
below in v2:
diff --git a/tools/testing/selftests/net/packetdrill/ksft_runner.sh
b/tools/testing/selftests/net/packetdrill/ksft_runner.sh
index 0a97d5ae34699..e2a418357bf1c 100755
--- a/tools/testing/selftests/net/packetdrill/ksft_runner.sh
+++ b/tools/testing/selftests/net/packetdrill/ksft_runner.sh
@@ -52,6 +52,12 @@ if [[ -n "${KSFT_MACHINE_SLOW}" ]]; then
failfunc=ktap_test_xfail
fi
+pagesize=$(grep -E '^--define=REQUIRES_PAGESIZE=' $script | cut -d
'=' -f 3 | tr -d '"')
+if [[ -n "$pagesize" && "$(getconf PAGESIZE)" != "$pagesize" ]]; then
+ ktap_skip_all "requires ${pagesize}B PAGE_SIZE"
+ exit "$KSFT_SKIP"
+fi
+
ip_versions=$(grep -E '^--ip_version=' $script | cut -d '=' -f 2)
if [[ -z $ip_versions ]]; then
ip_versions="ipv4 ipv6 ipv4-mapped-ipv6"
diff --git
a/tools/testing/selftests/net/packetdrill/tcp_wmem_schedule_negative_fwd_alloc.pkt
b/tools/testing/selftests/net/packetdrill/tcp_wmem_schedule_negative_fwd_alloc.pkt
index 8e31db546f432..5e6a40e740b42 100644
---
a/tools/testing/selftests/net/packetdrill/tcp_wmem_schedule_negative_fwd_alloc.pkt
+++
b/tools/testing/selftests/net/packetdrill/tcp_wmem_schedule_negative_fwd_alloc.pkt
@@ -3,6 +3,7 @@
// when sk_wmem_schedule() fails under memory pressure and
// sk->sk_wmem_queued >= sysctl_tcp_wmem[0], returning EAGAIN rather
than EFAULT.
+--define=REQUIRES_PAGESIZE="4096"
--mtu=65535
--tolerance_usecs=100000