Re: [PATCH net] selftests/net: packetdrill: increase timing tolerance in debug mode

2024-09-19 Thread Stanislav Fomichev
ng showed two > failures that needed 12000. To be on the safe side, Increase to 14000. > > Link: https://lore.kernel.org/netdev/Zuhhe4-MQHd3EkfN@mini-arch/ > Fixes: 1e42f73fd3c2 ("selftests/net: packetdrill: import tcp/zerocopy") > Reported-by: Stanislav Fomichev > S

Re: [PATCH net-next v2 0/3] selftests/net: packetdrill: netns and two imports

2024-09-16 Thread Stanislav Fomichev
On 09/12, Willem de Bruijn wrote: > Matthieu Baerts wrote: > > Hi Willem, > > > > On 12/09/2024 02:52, Willem de Bruijn wrote: > > > From: Willem de Bruijn > > > > > > 1/3: run in nets, as discussed, and add missing CONFIGs > > > 2/3: import tcp/zerocopy > > > 3/3: import tcp/slow_start > > > >

Re: [PATCH net-next] selftests: add selftest for UDP SO_PEEK_OFF support

2024-09-01 Thread Stanislav Fomichev
On 09/01, Jason Xing wrote: > From: Jason Xing > > Add the SO_PEEK_OFF selftest for UDP. In this patch, I mainly do > three things: > 1. rename tcp_so_peek_off.c > 2. adjust for UDP protocol > 3. add selftests into it > > Suggested-by: Jon Maloy > Signed-off-by: Jason Xing > --- > Link: > htt

Re: [PATCH net-next RFC] selftests/net: integrate packetdrill with ksft

2024-08-28 Thread Stanislav Fomichev
On 08/28, Jakub Kicinski wrote: > On Wed, 28 Aug 2024 10:20:47 -0700 Stanislav Fomichev wrote: > > > As Jakub responded. > > > > > > Indeed importing the whole application into the kernel sources is what > > > stopped me from attempting this before. Floria

Re: [PATCH net-next RFC] selftests/net: integrate packetdrill with ksft

2024-08-28 Thread Stanislav Fomichev
On 08/28, Willem de Bruijn wrote: > Stanislav Fomichev wrote: > > On 08/27, Willem de Bruijn wrote: > > > From: Willem de Bruijn > > > > > > Lay the groundwork to import into kselftests the over 150 packetdrill > > > TCP/IP conformance tests on github

Re: [PATCH net-next RFC] selftests/net: integrate packetdrill with ksft

2024-08-28 Thread Stanislav Fomichev
On 08/27, Willem de Bruijn wrote: > From: Willem de Bruijn > > Lay the groundwork to import into kselftests the over 150 packetdrill > TCP/IP conformance tests on github.com/google/packetdrill. > > Florian recently added support for packetdrill tests in nf_conntrack, > in commit a8a388c2aae49 ("

[PATCH net-next v3 3/3] selftests: net: ksft: replace 95 with errno.EOPNOTSUPP

2024-08-01 Thread Stanislav Fomichev
Petr suggested to use errno.EOPNOTSUPP instead of hard-coded 95 in the new test case. Adjust existing ones to match this style. Signed-off-by: Stanislav Fomichev -- Cc: Shuah Khan Cc: Joe Damato Cc: Petr Machata Cc: linux-kselftest@vger.kernel.org --- tools/testing/selftests/drivers/net/hw

[PATCH net-next v3 1/3] selftests: net-drv: exercise queue stats when the device is down

2024-08-01 Thread Stanislav Fomichev
appearing stats is an error (Jakub) - ksft_ge instead of open coding (Jakub) Signed-off-by: Stanislav Fomichev -- Cc: Shuah Khan Cc: Joe Damato Cc: Petr Machata Cc: linux-kselftest@vger.kernel.org --- tools/testing/selftests/drivers/net/stats.py | 25 +++- 1 file changed, 24 i

[PATCH net-next v3 2/3] selftests: net: ksft: support marking tests as disruptive

2024-08-01 Thread Stanislav Fomichev
check_down # SKIP marked as disruptive # Totals: pass:4 fail:0 xfail:0 xpass:0 skip:1 error:0 v3: - parse yes and properly treat non-zero nums as true (Petr) v2: - convert from cli argument to env variable (Jakub) Signed-off-by: Stanislav Fomichev -- Cc: Shuah Khan Cc: Joe Damato Cc: Petr M

Re: [PATCH net-next v2 1/2] selftests: net-drv: exercise queue stats when the device is down

2024-08-01 Thread Stanislav Fomichev
On 08/01, Petr Machata wrote: > > Stanislav Fomichev writes: > > > On 07/31, Jakub Kicinski wrote: > >> On Wed, 31 Jul 2024 13:34:58 +0200 Petr Machata wrote: > >> > > +qstat = netfam.qstats_get({"ifindex": cfg.ifindex}, dump=True) > &

Re: [PATCH net-next v2 1/2] selftests: net-drv: exercise queue stats when the device is down

2024-07-31 Thread Stanislav Fomichev
On 07/31, Jakub Kicinski wrote: > On Wed, 31 Jul 2024 13:34:58 +0200 Petr Machata wrote: > > > +qstat = netfam.qstats_get({"ifindex": cfg.ifindex}, dump=True) > > > +except NlError as e: > > > +if e.error == 95: > > > > Could you do this as if e.error == errno.ENOTSUP? > > j

Re: [PATCH net-next v2 2/2] selftests: net: ksft: support marking tests as disruptive

2024-07-31 Thread Stanislav Fomichev
On 07/31, Petr Machata wrote: > > Stanislav Fomichev writes: > > > Add new @ksft_disruptive decorator to mark the tests that might > > be disruptive to the system. Depending on how well the previous > > test works in the CI we might want to disable disruptive tests

[PATCH net-next v2 2/2] selftests: net: ksft: support marking tests as disruptive

2024-07-30 Thread Stanislav Fomichev
check_down # SKIP marked as disruptive # Totals: pass:4 fail:0 xfail:0 xpass:0 skip:1 error:0 v2: - convert from cli argument to env variable (Jakub) Signed-off-by: Stanislav Fomichev -- Cc: Shuah Khan Cc: Joe Damato Cc: Petr Machata Cc: linux-kselftest@vger.kernel.org --- .../selftests/drivers/

[PATCH net-next v2 1/2] selftests: net-drv: exercise queue stats when the device is down

2024-07-30 Thread Stanislav Fomichev
(Jakub) Signed-off-by: Stanislav Fomichev -- Cc: Shuah Khan Cc: Joe Damato Cc: Petr Machata Cc: linux-kselftest@vger.kernel.org --- tools/testing/selftests/drivers/net/stats.py | 25 +++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/drive

Re: [PATCH net-next 2/2] selftests: net: ksft: support marking tests as disruptive

2024-07-30 Thread Stanislav Fomichev
On 07/29, Jakub Kicinski wrote: > On Mon, 29 Jul 2024 15:10:42 -0700 Stanislav Fomichev wrote: > > +parser = argparse.ArgumentParser() > > +parser.add_argument('--skip-disruptive', default=False, > > action='store_true', help='skip tests t

[PATCH net-next 2/2] selftests: net: ksft: support marking tests as disruptive

2024-07-29 Thread Stanislav Fomichev
k_fec ok 3 stats.pkt_byte_sum ok 4 stats.qstat_by_ifindex ok 5 stats.check_down # SKIP marked as disruptive \# Totals: pass:4 fail:0 xfail:0 xpass:0 skip:1 error:0 Signed-off-by: Stanislav Fomichev -- Cc: Shuah Khan Cc: Joe Damato Cc: Petr Machata Cc: linux-kselftest@vger.kernel.org --- too

[PATCH net-next 1/2] selftests: net-drv: exercise queue stats when the device is down

2024-07-29 Thread Stanislav Fomichev
.check_fec ok 3 stats.pkt_byte_sum ok 4 stats.qstat_by_ifindex ok 5 stats.check_down \# Totals: pass:5 fail:0 xfail:0 xpass:0 skip:0 error:0 Signed-off-by: Stanislav Fomichev -- Cc: Shuah Khan Cc: Joe Damato Cc: Petr Machata Cc: linux-kselftest@vger.kernel.org --- tools/testing/selftests/drivers/ne

Re: [PATCH bpf-next v2 0/3] selftests/bpf: convert test_dev_cgroup to test_progs

2024-07-29 Thread Stanislav Fomichev
- fix wrong subtest name > - pass test buffer and corresponding size to read/write subtests > - use correct series prefix > - Link to v1: > https://lore.kernel.org/r/20240725-convert_dev_cgroup-v1-0-2c8cbd487...@bootlin.com For the next respin (after addressing Alan's comment about bpf_program__attach_cgroup): Acked-by: Stanislav Fomichev

Re: [PATCH 0/3] selftests/bpf: convert test_dev_cgroup to test_progs

2024-07-26 Thread Stanislav Fomichev
On 07/25, Alexis Lothoré (eBPF Foundation) wrote: > Hello, > this small series aims to integrate test_dev_cgroup in test_progs so it > could be run automatically in CI. The new version brings a few differences > with the current one: > - test now uses directly syscalls instead of wrapping commandli

Re: [PATCH 2/3] selftests/bpf: convert test_dev_cgroup to test_progs

2024-07-26 Thread Stanislav Fomichev
On 07/25, Alexis Lothoré (eBPF Foundation) wrote: > test_dev_cgroup is defined as a standalone test program, and so is not > executed in CI. > > Convert it to test_progs framework so it is tested automatically in CI, and > remove the old test. In order to be able to run it in test_progs, /dev/null

Re: [PATCH v2 0/2] selftests/bpf: convert test_xdp_veth to test_progs framework

2024-07-15 Thread Stanislav Fomichev
ues raised by checkpatch > - use static namespaces instead of random ones > - use SYS_NOFAIL instead of snprintf() + system () > - squashed the new test addition patch and the old test removal patch > - Link to v1: > https://lore.kernel.org/r/20240711-convert_test_xdp_veth-v1-0-868accb0a...@bootlin.com Acked-by: Stanislav Fomichev

Re: [PATCH] selftests/bpf:fix a resource leak in main()

2024-07-12 Thread Stanislav Fomichev
On 07/12, Markus Elfring wrote: > > The requested resources should be closed before return in main(), otherwise > > resource leak will occur. Add a check of cg_fd before close(). > > > > Fixes: 435f90a338ae ("selftests/bpf: add a test case for sock_ops > > perf-event notification") > > Signed-off-

Re: [PATCH 2/3] selftests/bpf: integrate test_xdp_veth into test_progs

2024-07-11 Thread Stanislav Fomichev
On 07/11, Alexis Lothoré (eBPF Foundation) wrote: > test_xdp_veth.sh tests that XDP return codes work as expected, by bringing > up multiple veth pairs isolated in different namespaces, attaching specific > xdp programs to each interface, and ensuring that the whole chain allows to > ping one end i

Re: [PATCH] selftests/bpf:fix a resource leak in main()

2024-07-11 Thread Stanislav Fomichev
On 07/11, Ma Ke wrote: > The requested resources should be closed before return in main(), otherwise > resource leak will occur. Add a check of cg_fd before close(). > > Fixes: 435f90a338ae ("selftests/bpf: add a test case for sock_ops perf-event > notification") > Signed-off-by: Ma Ke > --- >

Re: [PATCH net-next 0/4] selftests: move bpf-offload test from bpf to net

2024-04-09 Thread Stanislav Fomichev
some fixes are needed. > > Admittedly more code could be extracted but I only had > the time for a minor cleanup :( Acked-by: Stanislav Fomichev Far too often I've seen this test broken because it's not in the CI :-( Hope you can put it in the netdev one so we get a better signal.

Re: [PATCH V2 bpf-next 1/2] bpf: add bpf_task_get_cgroup kfunc

2024-03-18 Thread Stanislav Fomichev
a reference to it. > > Signed-off-by: Jose Fernandez > Reviewed-by: Tycho Andersen Acked-by: Stanislav Fomichev

Re: [PATCH bpf-next 1/2] bpf: add btf_task_get_cgroup_id kfunc

2024-03-15 Thread Stanislav Fomichev
On 03/15, Jose Fernandez wrote: > This patch enhances the BPF helpers by adding a kfunc to retrieve the > cgroup v2 ID of a specific task, addressing a previous limitation where > only bpf_task_get_cgroup1 was available for cgroup v1. The new kfunc is > particularly useful for scenarios where obtai

Re: [PATCH iwl-next,v2 1/2] selftests/bpf: xdp_hw_metadata reduce sleep interval

2024-03-01 Thread Stanislav Fomichev
500 = 5ms should be enough for packet transmission and status > retrival. > > Signed-off-by: Song Yoong Siang Acked-by: Stanislav Fomichev

Re: [PATCH bpf-next 0/2] bpf: add csum/ip_summed fields to __sk_buff

2024-01-02 Thread Stanislav Fomichev
On 12/29, Menglong Dong wrote: > For now, we have to call some helpers when we need to update the csum, > such as bpf_l4_csum_replace, bpf_l3_csum_replace, etc. These helpers are > not inlined, which causes poor performance. > > In fact, we can define our own csum update functions in BPF program >

Re: [xdp-hints] Re: [PATCH bpf-next v3 2/3] net: stmmac: add Launch Time support to XDP ZC

2023-12-06 Thread Stanislav Fomichev
On 12/06, Magnus Karlsson wrote: > On Tue, 5 Dec 2023 at 20:39, Stanislav Fomichev wrote: > > > > On 12/05, Willem de Bruijn wrote: > > > Stanislav Fomichev wrote: > > > > On Tue, Dec 5, 2023 at 7:34 AM Florian Bezdeka > > > > wrote: > > &

Re: [xdp-hints] Re: [PATCH bpf-next v3 2/3] net: stmmac: add Launch Time support to XDP ZC

2023-12-05 Thread Stanislav Fomichev
On 12/05, Willem de Bruijn wrote: > Stanislav Fomichev wrote: > > On Tue, Dec 5, 2023 at 7:34 AM Florian Bezdeka > > wrote: > > > > > > On Tue, 2023-12-05 at 15:25 +, Song, Yoong Siang wrote: > > > > On Monday, December 4, 2023 10:55 PM, Will

Re: [xdp-hints] Re: [PATCH bpf-next v3 2/3] net: stmmac: add Launch Time support to XDP ZC

2023-12-05 Thread Stanislav Fomichev
On Tue, Dec 5, 2023 at 7:34 AM Florian Bezdeka wrote: > > On Tue, 2023-12-05 at 15:25 +, Song, Yoong Siang wrote: > > On Monday, December 4, 2023 10:55 PM, Willem de Bruijn wrote: > > > Jesper Dangaard Brouer wrote: > > > > > > > > > > > > On 12/3/23 17:51, Song Yoong Siang wrote: > > > > > Th

Re: [PATCH bpf-next] selftests/bpf: add assert for user stacks in test_task_stack

2023-11-12 Thread Stanislav Fomichev
On 11/11, Jordan Rome wrote: > This is a follow up to: > commit b8e3a87a627b ("bpf: Add crosstask check to __bpf_get_stack"). > > This test ensures that the task iterator only gets a single > user stack (for the current task). > > Signed-off-by: Jordan Rome

Re: [RFC PATCH v3 09/12] net: add support for skbs with unreadable frags

2023-11-07 Thread Stanislav Fomichev
On 11/07, Eric Dumazet wrote: > On Tue, Nov 7, 2023 at 10:05 PM Stanislav Fomichev wrote: > > > > > I don't understand. We require an elaborate setup to receive devmem cmsgs, > > why would some random application receive those? > > > A TCP socket can

Re: [RFC PATCH v3 09/12] net: add support for skbs with unreadable frags

2023-11-07 Thread Stanislav Fomichev
On 11/07, Mina Almasry wrote: > On Mon, Nov 6, 2023 at 5:06 PM Stanislav Fomichev wrote: > [..] > > > > > And the socket has to know this association; otherwise those tokens > > > > > are useless since they don't carry anything to identify the dmabuf. &

Re: [RFC PATCH v3 09/12] net: add support for skbs with unreadable frags

2023-11-07 Thread Stanislav Fomichev
On 11/07, Willem de Bruijn wrote: > On Tue, Nov 7, 2023 at 12:44 PM Stanislav Fomichev wrote: > > > > On 11/06, Willem de Bruijn wrote: > > > > > > > I think my other issue with MSG_SOCK_DEVMEM being on recvmsg is > > > > > > > that

Re: [RFC PATCH v3 09/12] net: add support for skbs with unreadable frags

2023-11-07 Thread Stanislav Fomichev
On 11/06, Willem de Bruijn wrote: > > > > > I think my other issue with MSG_SOCK_DEVMEM being on recvmsg is that > > > > > it somehow implies that I have an option of passing or not passing it > > > > > for an individual system call. > > > > > If we know that we're going to use dmabuf with the sock

Re: [RFC PATCH v3 09/12] net: add support for skbs with unreadable frags

2023-11-06 Thread Stanislav Fomichev
On 11/06, Mina Almasry wrote: > On Mon, Nov 6, 2023 at 4:08 PM Willem de Bruijn > wrote: > > > > On Mon, Nov 6, 2023 at 3:55 PM Stanislav Fomichev wrote: > > > > > > On Mon, Nov 6, 2023 at 3:27 PM Mina Almasry > > > wrote: > > > >

Re: [RFC PATCH v3 09/12] net: add support for skbs with unreadable frags

2023-11-06 Thread Stanislav Fomichev
On 11/06, Stanislav Fomichev wrote: > On 11/06, Willem de Bruijn wrote: > > On Mon, Nov 6, 2023 at 3:55 PM Stanislav Fomichev wrote: > > > > > > On Mon, Nov 6, 2023 at 3:27 PM Mina Almasry > > > wrote: > > > > > > > > On Mo

Re: [RFC PATCH v3 09/12] net: add support for skbs with unreadable frags

2023-11-06 Thread Stanislav Fomichev
On 11/06, Willem de Bruijn wrote: > On Mon, Nov 6, 2023 at 3:55 PM Stanislav Fomichev wrote: > > > > On Mon, Nov 6, 2023 at 3:27 PM Mina Almasry wrote: > > > > > > On Mon, Nov 6, 2023 at 2:59 PM Stanislav Fomichev wrote: > > > > > > > &

Re: [RFC PATCH v3 09/12] net: add support for skbs with unreadable frags

2023-11-06 Thread Stanislav Fomichev
On Mon, Nov 6, 2023 at 3:27 PM Mina Almasry wrote: > > On Mon, Nov 6, 2023 at 2:59 PM Stanislav Fomichev wrote: > > > > On 11/06, Mina Almasry wrote: > > > On Mon, Nov 6, 2023 at 1:59 PM Stanislav Fomichev wrote: > > > > > > > > On 11/06, Mina

Re: [RFC PATCH v3 10/12] tcp: RX path for devmem TCP

2023-11-06 Thread Stanislav Fomichev
On Mon, Nov 6, 2023 at 2:56 PM Willem de Bruijn wrote: > > On Mon, Nov 6, 2023 at 2:34 PM Stanislav Fomichev wrote: > > > > On 11/06, Willem de Bruijn wrote: > > > > > IMHO, we need a better UAPI to receive the tokens and give them back > > > >

Re: [RFC PATCH v3 09/12] net: add support for skbs with unreadable frags

2023-11-06 Thread Stanislav Fomichev
On 11/06, Mina Almasry wrote: > On Mon, Nov 6, 2023 at 1:59 PM Stanislav Fomichev wrote: > > > > On 11/06, Mina Almasry wrote: > > > On Mon, Nov 6, 2023 at 11:34 AM David Ahern wrote: > > > > > > > > On 11/6/23 11:47 AM, Stanislav Fomich

Re: [RFC PATCH v3 10/12] tcp: RX path for devmem TCP

2023-11-06 Thread Stanislav Fomichev
On 11/06, Willem de Bruijn wrote: > > > IMHO, we need a better UAPI to receive the tokens and give them back to > > > the kernel. CMSG + setsockopt(SO_DEVMEM_DONTNEED) get the job done, > > > but look dated and hacky :-( > > > > > > We should either do some kind of user/kernel shared memory queue t

Re: [RFC PATCH v3 09/12] net: add support for skbs with unreadable frags

2023-11-06 Thread Stanislav Fomichev
On 11/06, Mina Almasry wrote: > On Mon, Nov 6, 2023 at 11:34 AM David Ahern wrote: > > > > On 11/6/23 11:47 AM, Stanislav Fomichev wrote: > > > On 11/05, Mina Almasry wrote: > > >> For device memory TCP, we expect the skb headers to be available in host > &g

Re: [RFC PATCH v3 10/12] tcp: RX path for devmem TCP

2023-11-06 Thread Stanislav Fomichev
On 11/06, Mina Almasry wrote: > On Mon, Nov 6, 2023 at 10:44 AM Stanislav Fomichev wrote: > > > > On 11/05, Mina Almasry wrote: > > > In tcp_recvmsg_locked(), detect if the skb being received by the user > > > is a devmem skb. In this case - if the user provid

Re: [RFC PATCH v3 06/12] memory-provider: dmabuf devmem memory provider

2023-11-06 Thread Stanislav Fomichev
On 11/05, Mina Almasry wrote: > Implement a memory provider that allocates dmabuf devmem page_pool_iovs. > > Support of PP_FLAG_DMA_MAP and PP_FLAG_DMA_SYNC_DEV is omitted for > simplicity. > > The provider receives a reference to the struct netdev_dmabuf_binding > via the pool->mp_priv pointer.

Re: [RFC PATCH v3 09/12] net: add support for skbs with unreadable frags

2023-11-06 Thread Stanislav Fomichev
On 11/05, Mina Almasry wrote: > For device memory TCP, we expect the skb headers to be available in host > memory for access, and we expect the skb frags to be in device memory > and unaccessible to the host. We expect there to be no mixing and > matching of device memory frags (unaccessible) with

Re: [RFC PATCH v3 09/12] net: add support for skbs with unreadable frags

2023-11-06 Thread Stanislav Fomichev
On 11/05, Mina Almasry wrote: > For device memory TCP, we expect the skb headers to be available in host > memory for access, and we expect the skb frags to be in device memory > and unaccessible to the host. We expect there to be no mixing and > matching of device memory frags (unaccessible) with

Re: [RFC PATCH v3 10/12] tcp: RX path for devmem TCP

2023-11-06 Thread Stanislav Fomichev
On 11/05, Mina Almasry wrote: > In tcp_recvmsg_locked(), detect if the skb being received by the user > is a devmem skb. In this case - if the user provided the MSG_SOCK_DEVMEM > flag - pass it to tcp_recvmsg_devmem() for custom handling. > > tcp_recvmsg_devmem() copies any data in the skb header