summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorLiu Jian <liujian56@huawei.com>2021-10-29 17:12:15 +0300
committerDaniel Borkmann <daniel@iogearbox.net>2021-11-01 19:08:21 +0300
commitb556c3fd467628341cc7680e4271790cafd79dc4 (patch)
treef05464fc6c33a3c41eefe73efb63a43e729e8add /tools
parent7303524e04af49a47991e19f895c3b8cdc3796c7 (diff)
downloadlinux-b556c3fd467628341cc7680e4271790cafd79dc4.tar.xz
selftests, bpf: Fix test_txmsg_ingress_parser error
After "skmsg: lose offset info in sk_psock_skb_ingress", the test case with ktls failed. This because ktls parser(tls_read_size) return value is 285 not 256. The case like this: tls_sk1 --> redir_sk --> tls_sk2 tls_sk1 sent out 512 bytes data, after tls related processing redir_sk recved 570 btyes data, and redirect 512 (skb_use_parser) bytes data to tls_sk2; but tls_sk2 needs 285 * 2 bytes data, receive timeout occurred. Signed-off-by: Liu Jian <liujian56@huawei.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: John Fastabend <john.fastabend@gmail.com> Link: https://lore.kernel.org/bpf/20211029141216.211899-2-liujian56@huawei.com
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/bpf/test_sockmap.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/test_sockmap.c b/tools/testing/selftests/bpf/test_sockmap.c
index eefd445b96fc..06924917ad77 100644
--- a/tools/testing/selftests/bpf/test_sockmap.c
+++ b/tools/testing/selftests/bpf/test_sockmap.c
@@ -1680,6 +1680,8 @@ static void test_txmsg_ingress_parser(int cgrp, struct sockmap_options *opt)
{
txmsg_pass = 1;
skb_use_parser = 512;
+ if (ktls == 1)
+ skb_use_parser = 570;
opt->iov_length = 256;
opt->iov_count = 1;
opt->rate = 2;