diff options
author | Jakub Sitnicki <jakub@cloudflare.com> | 2023-02-16 15:43:40 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-02-20 11:27:07 +0300 |
commit | 436864095a95fcc611c20c44a111985fa9848730 (patch) | |
tree | 5849b423d284cec20ff45e38b91bbd51e5f55c2c /tools/perf/scripts/python | |
parent | 908d4bb7c54caa58253a363d63e797a468eaf321 (diff) | |
download | linux-436864095a95fcc611c20c44a111985fa9848730.tar.xz |
selftests/net: Interpret UDP_GRO cmsg data as an int value
Data passed to user-space with a (SOL_UDP, UDP_GRO) cmsg carries an
int (see udp_cmsg_recv), not a u16 value, as strace confirms:
recvmsg(8, {msg_name=...,
msg_iov=[{iov_base="\0\0..."..., iov_len=96000}],
msg_iovlen=1,
msg_control=[{cmsg_len=20, <-- sizeof(cmsghdr) + 4
cmsg_level=SOL_UDP,
cmsg_type=0x68}], <-- UDP_GRO
msg_controllen=24,
msg_flags=0}, 0) = 11200
Interpreting the data as an u16 value won't work on big-endian platforms.
Since it is too late to back out of this API decision [1], fix the test.
[1]: https://lore.kernel.org/netdev/20230131174601.203127-1-jakub@cloudflare.com/
Fixes: 3327a9c46352 ("selftests: add functionals test for UDP GRO")
Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Jakub Sitnicki <jakub@cloudflare.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions