[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <67e40ab7ba532_4bb5c294e3@willemb.c.googlers.com.notmuch>
Date: Wed, 26 Mar 2025 10:09:59 -0400
From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
To: Kuniyuki Iwashima <kuniyu@...zon.com>,
Willem de Bruijn <willemdebruijn.kernel@...il.com>,
"David S. Miller" <davem@...emloft.net>,
David Ahern <dsahern@...nel.org>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>
Cc: Simon Horman <horms@...nel.org>,
Kuniyuki Iwashima <kuniyu@...zon.com>,
Kuniyuki Iwashima <kuni1840@...il.com>,
netdev@...r.kernel.org
Subject: Re: [PATCH v2 net 3/3] selftest: net: Check wraparounds for
sk->sk_rmem_alloc.
Kuniyuki Iwashima wrote:
> The test creates client and server sockets and sets INT_MAX to the
> server's SO_RCVBUFFORCE.
>
> Then, the client floods packets to the server until the UDP memory
> usage reaches (INT_MAX + 1) >> PAGE_SHIFT.
>
> Finally, both sockets are close()d, and the last assert makes sure
> that the memory usage drops to 0.
>
> If needed, we can extend the test later for other protocols.
>
> Without patch 1:
>
> # Starting 2 tests from 2 test cases.
> # RUN so_rcvbuf.udp_ipv4.rmem_max ...
> # so_rcvbuf.c:163:rmem_max:Expected pages (524800) <= *variant->max_pages (524288)
> # rmem_max: Test terminated by assertion
> # FAIL so_rcvbuf.udp_ipv4.rmem_max
> not ok 1 so_rcvbuf.udp_ipv4.rmem_max
>
> Without patch 2:
>
> # RUN so_rcvbuf.udp_ipv4.rmem_max ...
> # so_rcvbuf.c:170:rmem_max:max_pages: 524288
> # so_rcvbuf.c:178:rmem_max:Expected get_prot_pages(_metadata, variant) (524288) == 0 (0)
> # rmem_max: Test terminated by assertion
> # FAIL so_rcvbuf.udp_ipv4.rmem_max
> not ok 1 so_rcvbuf.udp_ipv4.rmem_max
>
> Signed-off-by: Kuniyuki Iwashima <kuniyu@...zon.com>
Reviewed-by: Willem de Bruijn <willemb@...gle.com>
Powered by blists - more mailing lists