Re: [PATCH net-next v6 00/12] selftests: ncdevmem: Add ncdevmem to ksft
On 10/31, Mina Almasry wrote: > On Wed, Oct 30, 2024 at 8:37 AM Stanislav Fomichev > wrote: > > > > On 10/30, Mina Almasry wrote: > > > On Wed, Oct 30, 2024 at 8:13 AM Stanislav Fomichev > > > wrote: > > > > > > > > On 10/30, Mina Almasry wrote: > > > > > On Wed, Oct 30, 2024 at 7:27 AM Stanislav Fomichev > > > > > wrote: > > > > > > > > > > > > The goal of the series is to simplify and make it possible to use > > > > > > ncdevmem in an automated way from the ksft python wrapper. > > > > > > > > > > > > ncdevmem is slowly mutated into a state where it uses stdout > > > > > > to print the payload and the python wrapper is added to > > > > > > make sure the arrived payload matches the expected one. > > > > > > > > > > > > v6: > > > > > > - fix compilation issue in 'Unify error handling' patch (Jakub) > > > > > > > > > > > > > > > > Since I saw a compilation failures on a couple of iterations I > > > > > cherry-picked this locally and tested compilation. I'm seeing this: > > > > > > > > Are you cherry picking the whole series or just this patch? It looks > > > > too broken. > > > > > > > > > sudo CFLAGS="-static" make -C ./tools/testing/selftests/drivers/net/hw > > > > > TARGETS=ncdevmem 2>&1 > > > > > make: Entering directory > > > > > '/usr/local/google/home/almasrymina/cos-kernel/tools/testing/selftests/drivers/net/hw' > > > > > CC ncdevmem > > > > > In file included from ncdevmem.c:63: > > > > > /usr/local/google/home/almasrymina/cos-kernel/tools/testing/selftests/../../../tools/net/ynl/generated/ethtool-user.h:23:43: > > > > > warning: ‘enum ethtool_header_flags’ declared inside parameter list > > > > > will not be visible outside of this definition or declaration > > > > >23 | const char *ethtool_header_flags_str(enum > > > > > ethtool_header_flags value); > > > > > | ^~~~ > > > > > /usr/local/google/home/almasrymina/cos-kernel/tools/testing/selftests/../../../tools/net/ynl/generated/ethtool-user.h:25:41: > > > > > warning: ‘enum ethtool_module_fw_flash_status’ declared inside > > > > > parameter list will not be visible outside of this definition or > > > > > declaration > > > > >25 | ethtool_module_fw_flash_status_str(enum > > > > > ethtool_module_fw_flash_status value); > > > > > | > > > > > ^~ > > > > > /usr/local/google/home/almasrymina/cos-kernel/tools/testing/selftests/../../../tools/net/ynl/generated/ethtool-user.h:6766:45: > > > > > error: field ‘status’ has incomplete type > > > > > 6766 | enum ethtool_module_fw_flash_status status; > > > > > | ^~ > > > > > > > > This has been fixed via '#include ' > > > > > > > > > ncdevmem.c: In function ‘do_server’: > > > > > ncdevmem.c:517:37: error: storage size of ‘token’ isn’t known > > > > > 517 | struct dmabuf_token token; > > > > > > > > And this, and the rest, don't make sense at all? > > > > > > > > I'll double check on my side. > > > > > > Oh, whoops, I forgot to headers_install first. This works for me: > > > > > > ➜ cos-kernel git:(tcpdevmem-fixes-1) ✗ sudo make headers_install && > > > sudo CFLAGS="-static" make -C ./tools/testing/selftests/drivers/net/hw > > > TARGETS=ncdevmem 2>&1 > > > INSTALL ./usr/include > > > make: Entering directory > > > '/usr/local/google/home/almasrymina/cos-kernel/tools/testing/selftests/drivers/net/hw' > > > make: Nothing to be done for 'all'. > > > make: Leaving directory > > > '/usr/local/google/home/almasrymina/cos-kernel/tools/testing/selftests/drivers/net/hw' > > > ➜ cos-kernel git:(tcpdevmem-fixes-1) ✗ find . -iname ncdevmem > > > ./tools/testing/selftests/drivers/net/hw/ncdevmem > > > > > > Sorry for the noise :D > > > > Whew, thanks and no worries! > > Sorry, 2 issues testing this series: Thank you for testing! > 1. ipv4 addresses seem broken, or maybe i'm using them wrong. > > Client command: > yes $(echo -e \\x01\\x02\\x03\\x04\\x05\\x06) | tr \\n \\0 | head -c > 1G | nc 192.168.1.4 5224 -p 5224 > > Server command and logs: > mina-1 /home/almasrymina # ./ncdevmem -s 192.168.1.4 -c 192.168.1.5 -l > -p 5224 -v 7 -f eth1 > here: ynl.c:887:ynl_req_trampoline > using queues 15..16 > Running: sudo ethtool -K eth1 ntuple off >&2 > Running: sudo ethtool -K eth1 ntuple on >&2 > Running: sudo ethtool -n eth1 | grep 'Filter:' | awk '{print $2}' | > xargs -n1 ethtool -N eth1 delete >&2 > ethtool: bad command line argument(s) > For more information run ethtool -h > here: ynl.c:887:ynl_req_trampoline > TCP header split: on > Running: sudo ethtool -X eth1 equal 15 >&2 > Running: sudo ethtool -N eth1 flow-type tcp6 src-ip 192.168.1.5 dst-ip > 192.168.1.4 src-port 5224 dst-port 5224 queue 15 >&2 > Invalid src-ip value[192.168.1.5] > ethtool: bad command line argument(s) > For more information run ethtool -h > ./ncdevmem: Failed to configure flow steering > > The ethtool co
Re: [PATCH net-next v6 00/12] selftests: ncdevmem: Add ncdevmem to ksft
On Thu, Oct 31, 2024 at 9:45 AM Mina Almasry wrote: > ... > > Sorry, 2 issues testing this series: > ... > > 2. Validation is now broken: > Validation is re-fixed with this diff: diff --git a/tools/testing/selftests/drivers/net/hw/ncdevmem.c b/tools/testing/selftests/drivers/net/hw/ncdevmem.c index 692c189bb5cc..494ae66d8abf 100644 --- a/tools/testing/selftests/drivers/net/hw/ncdevmem.c +++ b/tools/testing/selftests/drivers/net/hw/ncdevmem.c @@ -568,8 +568,7 @@ int do_server(struct memory_buffer *mem) if (do_validation) validate_buffer( - ((unsigned char *)tmp_mem) + - dmabuf_cmsg->frag_offset, + ((unsigned char *)tmp_mem), dmabuf_cmsg->frag_size); else print_nonzero_bytes(tmp_mem, dmabuf_cmsg->frag_size); Since memcpy_from_device copies to the beginning of tmp_mem, then the beginning tmp_mem should be passed to the validation. -- Thanks, Mina
Re: [PATCH net-next v6 00/12] selftests: ncdevmem: Add ncdevmem to ksft
On Wed, Oct 30, 2024 at 8:37 AM Stanislav Fomichev wrote: > > On 10/30, Mina Almasry wrote: > > On Wed, Oct 30, 2024 at 8:13 AM Stanislav Fomichev > > wrote: > > > > > > On 10/30, Mina Almasry wrote: > > > > On Wed, Oct 30, 2024 at 7:27 AM Stanislav Fomichev > > > > wrote: > > > > > > > > > > The goal of the series is to simplify and make it possible to use > > > > > ncdevmem in an automated way from the ksft python wrapper. > > > > > > > > > > ncdevmem is slowly mutated into a state where it uses stdout > > > > > to print the payload and the python wrapper is added to > > > > > make sure the arrived payload matches the expected one. > > > > > > > > > > v6: > > > > > - fix compilation issue in 'Unify error handling' patch (Jakub) > > > > > > > > > > > > > Since I saw a compilation failures on a couple of iterations I > > > > cherry-picked this locally and tested compilation. I'm seeing this: > > > > > > Are you cherry picking the whole series or just this patch? It looks > > > too broken. > > > > > > > sudo CFLAGS="-static" make -C ./tools/testing/selftests/drivers/net/hw > > > > TARGETS=ncdevmem 2>&1 > > > > make: Entering directory > > > > '/usr/local/google/home/almasrymina/cos-kernel/tools/testing/selftests/drivers/net/hw' > > > > CC ncdevmem > > > > In file included from ncdevmem.c:63: > > > > /usr/local/google/home/almasrymina/cos-kernel/tools/testing/selftests/../../../tools/net/ynl/generated/ethtool-user.h:23:43: > > > > warning: ‘enum ethtool_header_flags’ declared inside parameter list > > > > will not be visible outside of this definition or declaration > > > >23 | const char *ethtool_header_flags_str(enum ethtool_header_flags > > > > value); > > > > | ^~~~ > > > > /usr/local/google/home/almasrymina/cos-kernel/tools/testing/selftests/../../../tools/net/ynl/generated/ethtool-user.h:25:41: > > > > warning: ‘enum ethtool_module_fw_flash_status’ declared inside > > > > parameter list will not be visible outside of this definition or > > > > declaration > > > >25 | ethtool_module_fw_flash_status_str(enum > > > > ethtool_module_fw_flash_status value); > > > > | > > > > ^~ > > > > /usr/local/google/home/almasrymina/cos-kernel/tools/testing/selftests/../../../tools/net/ynl/generated/ethtool-user.h:6766:45: > > > > error: field ‘status’ has incomplete type > > > > 6766 | enum ethtool_module_fw_flash_status status; > > > > | ^~ > > > > > > This has been fixed via '#include ' > > > > > > > ncdevmem.c: In function ‘do_server’: > > > > ncdevmem.c:517:37: error: storage size of ‘token’ isn’t known > > > > 517 | struct dmabuf_token token; > > > > > > And this, and the rest, don't make sense at all? > > > > > > I'll double check on my side. > > > > Oh, whoops, I forgot to headers_install first. This works for me: > > > > ➜ cos-kernel git:(tcpdevmem-fixes-1) ✗ sudo make headers_install && > > sudo CFLAGS="-static" make -C ./tools/testing/selftests/drivers/net/hw > > TARGETS=ncdevmem 2>&1 > > INSTALL ./usr/include > > make: Entering directory > > '/usr/local/google/home/almasrymina/cos-kernel/tools/testing/selftests/drivers/net/hw' > > make: Nothing to be done for 'all'. > > make: Leaving directory > > '/usr/local/google/home/almasrymina/cos-kernel/tools/testing/selftests/drivers/net/hw' > > ➜ cos-kernel git:(tcpdevmem-fixes-1) ✗ find . -iname ncdevmem > > ./tools/testing/selftests/drivers/net/hw/ncdevmem > > > > Sorry for the noise :D > > Whew, thanks and no worries! Sorry, 2 issues testing this series: 1. ipv4 addresses seem broken, or maybe i'm using them wrong. Client command: yes $(echo -e \\x01\\x02\\x03\\x04\\x05\\x06) | tr \\n \\0 | head -c 1G | nc 192.168.1.4 5224 -p 5224 Server command and logs: mina-1 /home/almasrymina # ./ncdevmem -s 192.168.1.4 -c 192.168.1.5 -l -p 5224 -v 7 -f eth1 here: ynl.c:887:ynl_req_trampoline using queues 15..16 Running: sudo ethtool -K eth1 ntuple off >&2 Running: sudo ethtool -K eth1 ntuple on >&2 Running: sudo ethtool -n eth1 | grep 'Filter:' | awk '{print $2}' | xargs -n1 ethtool -N eth1 delete >&2 ethtool: bad command line argument(s) For more information run ethtool -h here: ynl.c:887:ynl_req_trampoline TCP header split: on Running: sudo ethtool -X eth1 equal 15 >&2 Running: sudo ethtool -N eth1 flow-type tcp6 src-ip 192.168.1.5 dst-ip 192.168.1.4 src-port 5224 dst-port 5224 queue 15 >&2 Invalid src-ip value[192.168.1.5] ethtool: bad command line argument(s) For more information run ethtool -h ./ncdevmem: Failed to configure flow steering The ethtool command to configure flow steering is not working for me. It thinks it's in v6 mode, when the ip address is a v4 address. (notice `-s 192.168.1.4 -c 192.168.1.5`). flow-type should be tcp in this case. Reverting patch 9e2da4faeccf ("Revert "selftests: ncdevmem: Switch to AF_IN
Re: [PATCH net-next v6 00/12] selftests: ncdevmem: Add ncdevmem to ksft
On 10/30, Mina Almasry wrote: > On Wed, Oct 30, 2024 at 8:13 AM Stanislav Fomichev > wrote: > > > > On 10/30, Mina Almasry wrote: > > > On Wed, Oct 30, 2024 at 7:27 AM Stanislav Fomichev > > > wrote: > > > > > > > > The goal of the series is to simplify and make it possible to use > > > > ncdevmem in an automated way from the ksft python wrapper. > > > > > > > > ncdevmem is slowly mutated into a state where it uses stdout > > > > to print the payload and the python wrapper is added to > > > > make sure the arrived payload matches the expected one. > > > > > > > > v6: > > > > - fix compilation issue in 'Unify error handling' patch (Jakub) > > > > > > > > > > Since I saw a compilation failures on a couple of iterations I > > > cherry-picked this locally and tested compilation. I'm seeing this: > > > > Are you cherry picking the whole series or just this patch? It looks > > too broken. > > > > > sudo CFLAGS="-static" make -C ./tools/testing/selftests/drivers/net/hw > > > TARGETS=ncdevmem 2>&1 > > > make: Entering directory > > > '/usr/local/google/home/almasrymina/cos-kernel/tools/testing/selftests/drivers/net/hw' > > > CC ncdevmem > > > In file included from ncdevmem.c:63: > > > /usr/local/google/home/almasrymina/cos-kernel/tools/testing/selftests/../../../tools/net/ynl/generated/ethtool-user.h:23:43: > > > warning: ‘enum ethtool_header_flags’ declared inside parameter list > > > will not be visible outside of this definition or declaration > > >23 | const char *ethtool_header_flags_str(enum ethtool_header_flags > > > value); > > > | ^~~~ > > > /usr/local/google/home/almasrymina/cos-kernel/tools/testing/selftests/../../../tools/net/ynl/generated/ethtool-user.h:25:41: > > > warning: ‘enum ethtool_module_fw_flash_status’ declared inside > > > parameter list will not be visible outside of this definition or > > > declaration > > >25 | ethtool_module_fw_flash_status_str(enum > > > ethtool_module_fw_flash_status value); > > > | > > > ^~ > > > /usr/local/google/home/almasrymina/cos-kernel/tools/testing/selftests/../../../tools/net/ynl/generated/ethtool-user.h:6766:45: > > > error: field ‘status’ has incomplete type > > > 6766 | enum ethtool_module_fw_flash_status status; > > > | ^~ > > > > This has been fixed via '#include ' > > > > > ncdevmem.c: In function ‘do_server’: > > > ncdevmem.c:517:37: error: storage size of ‘token’ isn’t known > > > 517 | struct dmabuf_token token; > > > > And this, and the rest, don't make sense at all? > > > > I'll double check on my side. > > Oh, whoops, I forgot to headers_install first. This works for me: > > ➜ cos-kernel git:(tcpdevmem-fixes-1) ✗ sudo make headers_install && > sudo CFLAGS="-static" make -C ./tools/testing/selftests/drivers/net/hw > TARGETS=ncdevmem 2>&1 > INSTALL ./usr/include > make: Entering directory > '/usr/local/google/home/almasrymina/cos-kernel/tools/testing/selftests/drivers/net/hw' > make: Nothing to be done for 'all'. > make: Leaving directory > '/usr/local/google/home/almasrymina/cos-kernel/tools/testing/selftests/drivers/net/hw' > ➜ cos-kernel git:(tcpdevmem-fixes-1) ✗ find . -iname ncdevmem > ./tools/testing/selftests/drivers/net/hw/ncdevmem > > Sorry for the noise :D Whew, thanks and no worries!
Re: [PATCH net-next v6 00/12] selftests: ncdevmem: Add ncdevmem to ksft
On Wed, Oct 30, 2024 at 8:13 AM Stanislav Fomichev wrote: > > On 10/30, Mina Almasry wrote: > > On Wed, Oct 30, 2024 at 7:27 AM Stanislav Fomichev wrote: > > > > > > The goal of the series is to simplify and make it possible to use > > > ncdevmem in an automated way from the ksft python wrapper. > > > > > > ncdevmem is slowly mutated into a state where it uses stdout > > > to print the payload and the python wrapper is added to > > > make sure the arrived payload matches the expected one. > > > > > > v6: > > > - fix compilation issue in 'Unify error handling' patch (Jakub) > > > > > > > Since I saw a compilation failures on a couple of iterations I > > cherry-picked this locally and tested compilation. I'm seeing this: > > Are you cherry picking the whole series or just this patch? It looks > too broken. > > > sudo CFLAGS="-static" make -C ./tools/testing/selftests/drivers/net/hw > > TARGETS=ncdevmem 2>&1 > > make: Entering directory > > '/usr/local/google/home/almasrymina/cos-kernel/tools/testing/selftests/drivers/net/hw' > > CC ncdevmem > > In file included from ncdevmem.c:63: > > /usr/local/google/home/almasrymina/cos-kernel/tools/testing/selftests/../../../tools/net/ynl/generated/ethtool-user.h:23:43: > > warning: ‘enum ethtool_header_flags’ declared inside parameter list > > will not be visible outside of this definition or declaration > >23 | const char *ethtool_header_flags_str(enum ethtool_header_flags > > value); > > | ^~~~ > > /usr/local/google/home/almasrymina/cos-kernel/tools/testing/selftests/../../../tools/net/ynl/generated/ethtool-user.h:25:41: > > warning: ‘enum ethtool_module_fw_flash_status’ declared inside > > parameter list will not be visible outside of this definition or > > declaration > >25 | ethtool_module_fw_flash_status_str(enum > > ethtool_module_fw_flash_status value); > > | > > ^~ > > /usr/local/google/home/almasrymina/cos-kernel/tools/testing/selftests/../../../tools/net/ynl/generated/ethtool-user.h:6766:45: > > error: field ‘status’ has incomplete type > > 6766 | enum ethtool_module_fw_flash_status status; > > | ^~ > > This has been fixed via '#include ' > > > ncdevmem.c: In function ‘do_server’: > > ncdevmem.c:517:37: error: storage size of ‘token’ isn’t known > > 517 | struct dmabuf_token token; > > And this, and the rest, don't make sense at all? > > I'll double check on my side. Oh, whoops, I forgot to headers_install first. This works for me: ➜ cos-kernel git:(tcpdevmem-fixes-1) ✗ sudo make headers_install && sudo CFLAGS="-static" make -C ./tools/testing/selftests/drivers/net/hw TARGETS=ncdevmem 2>&1 INSTALL ./usr/include make: Entering directory '/usr/local/google/home/almasrymina/cos-kernel/tools/testing/selftests/drivers/net/hw' make: Nothing to be done for 'all'. make: Leaving directory '/usr/local/google/home/almasrymina/cos-kernel/tools/testing/selftests/drivers/net/hw' ➜ cos-kernel git:(tcpdevmem-fixes-1) ✗ find . -iname ncdevmem ./tools/testing/selftests/drivers/net/hw/ncdevmem Sorry for the noise :D -- Thanks, Mina
Re: [PATCH net-next v6 00/12] selftests: ncdevmem: Add ncdevmem to ksft
On 10/30, Mina Almasry wrote: > On Wed, Oct 30, 2024 at 7:27 AM Stanislav Fomichev wrote: > > > > The goal of the series is to simplify and make it possible to use > > ncdevmem in an automated way from the ksft python wrapper. > > > > ncdevmem is slowly mutated into a state where it uses stdout > > to print the payload and the python wrapper is added to > > make sure the arrived payload matches the expected one. > > > > v6: > > - fix compilation issue in 'Unify error handling' patch (Jakub) > > > > Since I saw a compilation failures on a couple of iterations I > cherry-picked this locally and tested compilation. I'm seeing this: Are you cherry picking the whole series or just this patch? It looks too broken. > sudo CFLAGS="-static" make -C ./tools/testing/selftests/drivers/net/hw > TARGETS=ncdevmem 2>&1 > make: Entering directory > '/usr/local/google/home/almasrymina/cos-kernel/tools/testing/selftests/drivers/net/hw' > CC ncdevmem > In file included from ncdevmem.c:63: > /usr/local/google/home/almasrymina/cos-kernel/tools/testing/selftests/../../../tools/net/ynl/generated/ethtool-user.h:23:43: > warning: ‘enum ethtool_header_flags’ declared inside parameter list > will not be visible outside of this definition or declaration >23 | const char *ethtool_header_flags_str(enum ethtool_header_flags value); > | ^~~~ > /usr/local/google/home/almasrymina/cos-kernel/tools/testing/selftests/../../../tools/net/ynl/generated/ethtool-user.h:25:41: > warning: ‘enum ethtool_module_fw_flash_status’ declared inside > parameter list will not be visible outside of this definition or > declaration >25 | ethtool_module_fw_flash_status_str(enum > ethtool_module_fw_flash_status value); > | ^~ > /usr/local/google/home/almasrymina/cos-kernel/tools/testing/selftests/../../../tools/net/ynl/generated/ethtool-user.h:6766:45: > error: field ‘status’ has incomplete type > 6766 | enum ethtool_module_fw_flash_status status; > | ^~ This has been fixed via '#include ' > ncdevmem.c: In function ‘do_server’: > ncdevmem.c:517:37: error: storage size of ‘token’ isn’t known > 517 | struct dmabuf_token token; And this, and the rest, don't make sense at all? I'll double check on my side.
Re: [PATCH net-next v6 00/12] selftests: ncdevmem: Add ncdevmem to ksft
On Wed, Oct 30, 2024 at 7:27 AM Stanislav Fomichev wrote: > > The goal of the series is to simplify and make it possible to use > ncdevmem in an automated way from the ksft python wrapper. > > ncdevmem is slowly mutated into a state where it uses stdout > to print the payload and the python wrapper is added to > make sure the arrived payload matches the expected one. > > v6: > - fix compilation issue in 'Unify error handling' patch (Jakub) > Since I saw a compilation failures on a couple of iterations I cherry-picked this locally and tested compilation. I'm seeing this: sudo CFLAGS="-static" make -C ./tools/testing/selftests/drivers/net/hw TARGETS=ncdevmem 2>&1 make: Entering directory '/usr/local/google/home/almasrymina/cos-kernel/tools/testing/selftests/drivers/net/hw' CC ncdevmem In file included from ncdevmem.c:63: /usr/local/google/home/almasrymina/cos-kernel/tools/testing/selftests/../../../tools/net/ynl/generated/ethtool-user.h:23:43: warning: ‘enum ethtool_header_flags’ declared inside parameter list will not be visible outside of this definition or declaration 23 | const char *ethtool_header_flags_str(enum ethtool_header_flags value); | ^~~~ /usr/local/google/home/almasrymina/cos-kernel/tools/testing/selftests/../../../tools/net/ynl/generated/ethtool-user.h:25:41: warning: ‘enum ethtool_module_fw_flash_status’ declared inside parameter list will not be visible outside of this definition or declaration 25 | ethtool_module_fw_flash_status_str(enum ethtool_module_fw_flash_status value); | ^~ /usr/local/google/home/almasrymina/cos-kernel/tools/testing/selftests/../../../tools/net/ynl/generated/ethtool-user.h:6766:45: error: field ‘status’ has incomplete type 6766 | enum ethtool_module_fw_flash_status status; | ^~ ncdevmem.c: In function ‘do_server’: ncdevmem.c:517:37: error: storage size of ‘token’ isn’t known 517 | struct dmabuf_token token; | ^ ncdevmem.c:542:47: error: ‘SCM_DEVMEM_DMABUF’ undeclared (first use in this function) 542 | (cm->cmsg_type != SCM_DEVMEM_DMABUF && | ^ ncdevmem.c:542:47: note: each undeclared identifier is reported only once for each function it appears in ncdevmem.c:543:47: error: ‘SCM_DEVMEM_LINEAR’ undeclared (first use in this function) 543 | cm->cmsg_type != SCM_DEVMEM_LINEAR)) { | ^ ncdevmem.c:557:52: error: invalid use of undefined type ‘struct dmabuf_cmsg’ 557 | dmabuf_cmsg->frag_size); |^~ ncdevmem.c:562:56: error: invalid use of undefined type ‘struct dmabuf_cmsg’ 562 | token.token_start = dmabuf_cmsg->frag_token; |^~ ncdevmem.c:566:42: error: ‘SO_DEVMEM_DONTNEED’ undeclared (first use in this function) 566 | SO_DEVMEM_DONTNEED, &token, | ^~ ncdevmem.c:573:56: error: invalid use of undefined type ‘struct dmabuf_cmsg’ 573 | token.token_start = dmabuf_cmsg->frag_token; |^~ ncdevmem.c:576:54: error: invalid use of undefined type ‘struct dmabuf_cmsg’ 576 | total_received += dmabuf_cmsg->frag_size; | ^~ ncdevmem.c:579:44: error: invalid use of undefined type ‘struct dmabuf_cmsg’ 579 | dmabuf_cmsg->frag_offset >> PAGE_SHIFT, |^~ ncdevmem.c:580:44: error: invalid use of undefined type ‘struct dmabuf_cmsg’ 580 | dmabuf_cmsg->frag_offset % getpagesize(), |^~ ncdevmem.c:581:44: error: invalid use of undefined type ‘struct dmabuf_cmsg’ 581 | dmabuf_cmsg->frag_offset, |^~ ncdevmem.c:582:44: error: invalid use of undefined type ‘struct dmabuf_cmsg’ 582 | dmabuf_cmsg->frag_size, dmabuf_cmsg->frag_token, |^~ ncdevmem.c:582:68: error: invalid use of undefined type ‘struct dmabuf_cmsg’ 582 | dmabuf_cmsg->frag_size, dmabuf_cmsg->frag_token, |^~ ncdevmem.c:583:60: error: invalid use of undefined type ‘struct dmabuf_cmsg’
[PATCH net-next v6 00/12] selftests: ncdevmem: Add ncdevmem to ksft
The goal of the series is to simplify and make it possible to use ncdevmem in an automated way from the ksft python wrapper. ncdevmem is slowly mutated into a state where it uses stdout to print the payload and the python wrapper is added to make sure the arrived payload matches the expected one. v6: - fix compilation issue in 'Unify error handling' patch (Jakub) v5: - properly handle errors from inet_pton() and socket() (Paolo) - remove unneeded import from python selftest (Paolo) v4: - keep usage example with validation (Mina) - fix compilation issue in one patch (s/start_queues/start_queue/) v3: - keep and refine the comment about ncdevmem invocation (Mina) - add the comment about not enforcing exit status for ntuple reset (Mina) - make configure_headersplit more robust (Mina) - use num_queues/2 in selftest and let the users override it (Mina) - remove memory_provider.memcpy_to_device (Mina) - keep ksft as is (don't use -v validate flags): we are gonna need a --debug-disable flag to make it less chatty; otherwise it times out when sending too much data; so leaving it as a separate follow up v2: - don't remove validation (Mina) - keep 5-tuple flow steering but use it only when -c is provided (Mina) - remove separate flag for probing (Mina) - move ncdevmem under drivers/net/hw, not drivers/net (Jakub) Cc: Mina Almasry Stanislav Fomichev (12): selftests: ncdevmem: Redirect all non-payload output to stderr selftests: ncdevmem: Separate out dmabuf provider selftests: ncdevmem: Unify error handling selftests: ncdevmem: Make client_ip optional selftests: ncdevmem: Remove default arguments selftests: ncdevmem: Switch to AF_INET6 selftests: ncdevmem: Properly reset flow steering selftests: ncdevmem: Use YNL to enable TCP header split selftests: ncdevmem: Remove hard-coded queue numbers selftests: ncdevmem: Run selftest when none of the -s or -c has been provided selftests: ncdevmem: Move ncdevmem under drivers/net/hw selftests: ncdevmem: Add automated test .../selftests/drivers/net/hw/.gitignore | 1 + .../testing/selftests/drivers/net/hw/Makefile | 9 + .../selftests/drivers/net/hw/devmem.py| 45 + .../selftests/drivers/net/hw/ncdevmem.c | 773 ++ tools/testing/selftests/net/.gitignore| 1 - tools/testing/selftests/net/Makefile | 8 - tools/testing/selftests/net/ncdevmem.c| 570 - 7 files changed, 828 insertions(+), 579 deletions(-) create mode 100644 tools/testing/selftests/drivers/net/hw/.gitignore create mode 100755 tools/testing/selftests/drivers/net/hw/devmem.py create mode 100644 tools/testing/selftests/drivers/net/hw/ncdevmem.c delete mode 100644 tools/testing/selftests/net/ncdevmem.c -- 2.47.0