sctp: porting "tests: fix SMALL_MAXSEG" to ltp/utils/sctp
PATCH 1/1 sctp: porting "tests: fix SMALL_MAXSEG" to ltp/utils/sctp
LKP reported a sctp issue: https://lists.01.org/pipermail/lkp/2017-December/007830.html recently we need to update sctp to fix this issue
the origin patch: https://github.com/sctp/lksctp-tools/commit/723993d3e33100fa96245d2ed46611eb9cba5236
-----------------
tests: fix SMALL_MAXSEG
After Commit ecca8f88da5c ("sctp: set frag_point in sctp_setsockopt_maxseg correctly") in kernel, sctp will not allow to set max_seg with a too small
value.
Now it's using SMALL_MAXSEG in func_tests, with SMALL_MAXSEG = 100, sctp_setsockopt always returns err and causes some tests to fail.
This patch is to avoid it by defining SMALL_MAXSEG as 500 instead, 500 is a good value, as it's very close to the minimum and will not cause the last frag's size is different from the others', which would also lead to failure of some tests.
-----------------
--- utils/sctp/func_tests/test_sctp_sendrecvmsg.c | 2 +- utils/sctp/func_tests/test_timetolive.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
utils/sctp/func_tests/test_sctp_sendrecvmsg.c +1 -1
@@ -61,7 +61,7 @@ int TST_CNT = 0;/* RCVBUF value, and indirectly RWND*2 */ #define SMALL_RCVBUF 3000 -#define SMALL_MAXSEG 100 +#define SMALL_MAXSEG 500/* This is extra data length to ensure rwnd closes */ #define RWND_SLOP 100static char *fillmsg =NULL ;
utils/sctp/func_tests/test_timetolive.c +1 -1
@@ -77,7 +77,7 @@ int TST_CNT = 0;#define SMALL_RCVBUF 3000/* MAX segment size */ -#define SMALL_MAXSEG 100 +#define SMALL_MAXSEG 500/* RWND_SLOP is the extra data that fills up the rwnd */ #define RWND_SLOP 100
Signature · 1 line
2.7.4
PATCH 1/1 sctp: porting "tests: fix SMALL_MAXSEG" to ltp/utils/sctp
Quoted 55 lines · Li Zhijian
LKP reported a sctp issue: https://lists.01.org/pipermail/lkp/2017-December/007830.html recently we need to update sctp to fix this issue
the origin patch: https://github.com/sctp/lksctp-tools/commit/723993d3e33100fa96245d2ed46611eb9cba5236
-----------------
tests: fixSMALL_MAXSEG
After Commitecca8f88da5c("sctp: setfrag_pointinsctp_setsockopt_maxsegcorrectly") in kernel, sctp will not allow to setmax_segwith a too small
value.Now it's using
SMALL_MAXSEGinfunc_tests, withSMALL_MAXSEG= 100,sctp_setsockoptalways returns err and causes some tests to fail.This patch is to avoid it by defining
SMALL_MAXSEGas 500 instead, 500 is a good value, as it's very close to the minimum and will not cause the last frag's size is different from the others', which would also lead to failure of some tests.
-----------------Signed-off-by Li Zhijian <[email protected]>--- utils/sctp/func_tests/test_sctp_sendrecvmsg.c | 2 +- utils/sctp/func_tests/test_timetolive.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)utils/sctp/func_tests/test_sctp_sendrecvmsg.c +1
-1@@ -61,7 +61,7 @@ int TST_CNT = 0;/* RCVBUF value, and indirectly RWND*2 */ #define SMALL_RCVBUF 3000 -#define SMALL_MAXSEG 100 +#define SMALL_MAXSEG 500/* This is extra data length to ensure rwnd closes */ #define RWND_SLOP 100static char *fillmsg =NULL ;utils/sctp/func_tests/test_timetolive.c +1
-2@@ -77,7 +77,7 @@ int TST_CNT = 0;#define SMALL_RCVBUF 3000/* MAX segment size */ -#define SMALL_MAXSEG 100 +#define SMALL_MAXSEG 500/* RWND_SLOP is the extra data that fills up the rwnd */ #define RWND_SLOP 100 --
Quoted 4 lines
2.7.4
Thanks.
Alexey Kodanev
AppliedPATCH 1/1 sctp: porting "tests: fix SMALL_MAXSEG" to ltp/utils/sctp
Quoted 3 lines · Xin Long
Quoted 2 lines · Li Zhijian
LKP reported a sctp issue: https://lists.01.org/pipermail/lkp/2017-December/007830.html recently we need to update sctp to fix this issue
Applied, thanks!