[PATCH net-next 1/2] net/packet: make packet_fanout.arr size configurable up to 64K

2020-11-06 Thread Tanner Love
From: Tanner Love One use case of PACKET_FANOUT is lockless reception with one socket per CPU. 256 is a practical limit on increasingly many machines. Increase PACKET_FANOUT_MAX to 64K. Expand setsockopt PACKET_FANOUT to take an extra argument max_num_members. Also explicitly define a

[PATCH net-next 0/2] net/packet: make packet_fanout.arr size configurable up to 64K

2020-11-06 Thread Tanner Love
From: Tanner Love First patch makes the change; second patch adds unit tests. Tanner Love (2): net/packet: make packet_fanout.arr size configurable up to 64K selftests/net: test max_num_members, fanout_args in psock_fanout include/uapi/linux/if_packet.h | 12 net/packet

[PATCH net-next 2/2] selftests/net: test max_num_members, fanout_args in psock_fanout

2020-11-06 Thread Tanner Love
From: Tanner Love Add an additional control test that verifies: -specifying two different max_num_members values fails -specifying max_num_members > PACKET_FANOUT_MAX fails In datapath tests, set max_num_members to PACKET_FANOUT_MAX. Signed-off-by: Tanner Love --- tools/testing/selftests/

[PATCH net 3/4] selftests/net: so_txtime: fix clang issues for target arch PowerPC

2020-07-27 Thread Tanner Love
From: Tanner Love On powerpcle, int64_t maps to long long. Clang 9 threw: warning: absolute value function 'labs' given an argument of type \ 'long long' but has parameter of type 'long' which may cause \ truncation of value [-Wabsolute-value] if (labs(tsto

[PATCH net 2/4] selftests/net: psock_fanout: fix clang issues for target arch PowerPC

2020-07-27 Thread Tanner Love
From: Tanner Love Clang 9 threw: warning: format specifies type 'unsigned short' but the argument has \ type 'int' [-Wformat] typeflags, PORT_BASE, PORT_BASE + port_off); Tested: make -C tools/testing/selftests TARGETS="net" run_tests Fixes: 77f65e

[PATCH net 0/4] selftests/net: Fix clang warnings on powerpc

2020-07-27 Thread Tanner Love
From: Tanner Love This is essentially a v2 of http://patchwork.ozlabs.org/project/netdev/patch/20200724181757.2331172-1-tannerlove.ker...@gmail.com/, but it has been split up in order to have only one "Fixes" tag per patch. Tanner Love (4): selftests/net: rxtimestamp: fix clang

[PATCH net 4/4] selftests/net: tcp_mmap: fix clang warning for target arch PowerPC

2020-07-27 Thread Tanner Love
From: Tanner Love When size_t maps to unsigned int (e.g. on 32-bit powerpc), then the comparison with 1<<35 is always true. Clang 9 threw: warning: result of comparison of constant 34359738368 with \ expression of type 'size_t' (aka 'unsigned int') is always true \ [-

[PATCH net 1/4] selftests/net: rxtimestamp: fix clang issues for target arch PowerPC

2020-07-27 Thread Tanner Love
From: Tanner Love The signedness of char is implementation-dependent. Some systems (including PowerPC and ARM) use unsigned char. Clang 9 threw: warning: result of comparison of constant -1 with expression of type \ 'char' is always true [-Wtautological-constant-out-of-ran

[PATCH net] selftests/net: fix clang issues for target arch PowerPC and others

2020-07-24 Thread Tanner Love
From: Tanner Love Address these warnings observed with clang 9. rxtimestamp: The signedness of char is implementation-dependent. Some systems (including PowerPC and ARM) use unsigned char. Compilation yielded: warning: result of comparison of constant -1 with expression of type \ 'cha

[PATCH net-next] selftests/net: update initializer syntax to use c99 designators

2020-07-04 Thread Tanner Love
From: Tanner Love Before, clang version 9 threw errors such as: error: use of GNU old-style field designator extension [-Werror,-Wgnu-designator] { tstamp: true, swtstamp: true } ^~~ .tstamp = Fix these warnings in tools/testing/selftests

[PATCH net-next] selftests/net: add ipv6 test coverage in rxtimestamp test

2020-07-03 Thread Tanner Love
From: tannerlove Add the options --ipv4, --ipv6 to specify running over ipv4 and/or ipv6. If neither is specified, then run both. Signed-off-by: Tanner Love Acked-by: Willem de Bruijn --- tools/testing/selftests/net/rxtimestamp.c | 85 --- 1 file changed, 59 insertions

[PATCH net-next] selftests/net: plug rxtimestamp test into kselftest framework

2020-06-22 Thread Tanner Love
example that does. Add a "--strict" option to cause failure in the event that any test case fails, including test #6. This is useful for environments that are known to not have such background processes. Tested: make -C tools/testing/selftests TARGETS="net" run_tests Signed

[PATCH net] selftests/net: in rxtimestamp getopt_long needs terminating null entry

2020-06-09 Thread Tanner Love
From: tannerlove getopt_long requires the last element to be filled with zeros. Otherwise, passing an unrecognized option can cause a segfault. Fixes: 16e781224198 ("selftests/net: Add a test to validate behavior of rx timestamps") Signed-off-by: Tanner Love Acked-by: Willem

[PATCH net] selftests/net: in timestamping, strncpy needs to preserve null byte

2020-06-08 Thread Tanner Love
-truncation] 353 | strncpy(device.ifr_name, interface, sizeof(device.ifr_name)); Fixes: cb9eff097831 ("net: new user space API for time stamping of incoming and outgoing packets") Signed-off-by: Tanner Love Acked-by: Willem de Bruijn --- tools/testing/selftests/net/timestamping.c | 10 +++