[1.0.15] Regression test broken due to test_1_to_1_sockopt - SO_SNDBUF
Hello sctp folks,
sctp regression suite is currently broken due to test_1_to_1_sockopt.
Problem is following:
TEST17 sets SO_SNDBUF to 2048
TEST18 gets SO_SNDBUF, expected is 2x2048, but obtained value is 4480
Quoted 3 lines
test_1_to_1_sockopt.c17 PASS :setsockopt()SO_SNDBUF- SUCCESStest_1_to_1_sockopt.c18 PASS :getsockopt()SO_SNDBUF- SUCCESStest_1_to_1_sockopt.c19 BROK : Comparison failed:Set value and got value differs Set Value@96 Get ValueD80
reason lies is net/core/sock.c
Quoted 10 lines
case SO_SNDBUF: /* Don't error on this BSD doesn't and if you think * about it this is right. Otherwise apps have to * play 'guess the biggest size' games. RCVBUF/SNDBUF * are treated in BSD as hints */ val = min_t(u32, val, sysctl_wmem_max); set_sndbuf: sk->sk_userlocks |= SOCK_SNDBUF_LOCK; sk->sk_sndbuf = max_t(u32, val * 2, SOCK_MIN_SNDBUF);
since SOCK_MIN_SNDBUF is defined as:
include/net/sock.h
Quoted 9 lines
/* Since sk_{r,w}mem_alloc sums
skb->truesize, even a small frame might
* needsizeof(sk_buff)+ MTU + padding, unless net driver perform copybreak.
* Note: for send buffers, TCP works better if we can build two skbs at
* minimum.
*/
#defineTCP_SKB_MIN_TRUESIZE(2048 +SKB_DATA_ALIGN(sizeof(struct sk_buff)))#define
SOCK_MIN_SNDBUF(TCP_SKB_MIN_TRUESIZE* 2)
#defineSOCK_MIN_RCVBUFTCP_SKB_MIN_TRUESIZE
we can observe that value for which we set SO_SNDBUF in TEST17 in test_1_to_1_sockopt.c needs to be increased
Version is visible in subject, 1.0.15, I hope http://sourceforge.net/projects/lksctp/files/ is still valid place to get it.
Best regards,
Matija
PS: happy new year!
Quoted 37 lines · Matija Glavinic Pecotic
Hello sctp folks,
sctp regression suite is currently broken due to
test_1_to_1_sockopt.Problem is following:
TEST17 sets
SO_SNDBUFto 2048TEST18 gets
SO_SNDBUF, expected is 2x2048, but obtained value is 4480Quoted 3 lines
test_1_to_1_sockopt.c17 PASS :setsockopt()SO_SNDBUF- SUCCESStest_1_to_1_sockopt.c18 PASS :getsockopt()SO_SNDBUF- SUCCESStest_1_to_1_sockopt.c19 BROK : Comparison failed:Set value and got value differs Set Value@96 Get ValueD80reason lies is
net/core/sock.cQuoted 10 lines
case SO_SNDBUF: /* Don't error on this BSD doesn't and if you think * about it this is right. Otherwise apps have to * play 'guess the biggest size' games. RCVBUF/SNDBUF * are treated in BSD as hints */ val = min_t(u32, val, sysctl_wmem_max); set_sndbuf: sk->sk_userlocks |= SOCK_SNDBUF_LOCK; sk->sk_sndbuf = max_t(u32, val * 2, SOCK_MIN_SNDBUF);since
SOCK_MIN_SNDBUFis defined as:
include/net/sock.hQuoted 7 lines
/* Since sk_{r,w}mem_alloc sums
skb->truesize, even a small frame might
* needsizeof(sk_buff)+ MTU + padding, unless net driver perform copybreak.
* Note: for send buffers, TCP works better if we can build two skbs at
* minimum.
*/
#defineTCP_SKB_MIN_TRUESIZE(2048 +SKB_DATA_ALIGN(sizeof(struct sk_buff)))
Quoted 6 lines
Quoted 2 lines
#define
SOCK_MIN_SNDBUF(TCP_SKB_MIN_TRUESIZE* 2)
#defineSOCK_MIN_RCVBUFTCP_SKB_MIN_TRUESIZEwe can observe that value for which we set
SO_SNDBUFin TEST17 intest_1_to_1_sockopt.cneeds to be increasedVersion is visible in subject, 1.0.15, I hope http://sourceforge.net/projects/lksctp/files/ is still valid place to get it.
Already fixed in the current git tree (see lksctp.org) under b7ad1afc16cb0c5 ("tests: fix test_1_to_1_sockopt sock buff test case".) Will do a release some time next week.
Quoted 10 lines
Best regards,
Matija
PS: happy new year!
--
To unsubscribe from this list: send the line "unsubscribe linux-sctp" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 41 lines · ext Daniel Borkmann
Quoted 40 lines · Matija Glavinic Pecotic
Hello sctp folks,
sctp regression suite is currently broken due to
test_1_to_1_sockopt.Problem is following:
TEST17 sets
SO_SNDBUFto 2048TEST18 gets
SO_SNDBUF, expected is 2x2048, but obtained value is 4480Quoted 3 lines
test_1_to_1_sockopt.c17 PASS :setsockopt()SO_SNDBUF- SUCCESStest_1_to_1_sockopt.c18 PASS :getsockopt()SO_SNDBUF- SUCCESStest_1_to_1_sockopt.c19 BROK : Comparison failed:Set value and got value differs Set Value@96 Get ValueD80reason lies is
net/core/sock.cQuoted 10 lines
case
SO_SNDBUF:
/* Don't error on this BSD doesn't and if you think
* about it this is right. Otherwise apps have to
* play 'guess the biggest size' games. RCVBUF/SNDBUF
* are treated in BSD as hints
*/
val =min_t(u32, val, sysctl_wmem_max);set_sndbuf:sk->sk_userlocks |= SOCK_SNDBUF_LOCK; sk->sk_sndbuf = max_t(u32, val * 2, SOCK_MIN_SNDBUF);since
SOCK_MIN_SNDBUFis defined as:
include/net/sock.hQuoted 9 lines
/* Since sk_{r,w}mem_alloc sums
skb->truesize, even a small frame might
* needsizeof(sk_buff)+ MTU + padding, unless net driver perform copybreak.
* Note: for send buffers, TCP works better if we can build two skbs at
* minimum.
*/
#defineTCP_SKB_MIN_TRUESIZE(2048 +SKB_DATA_ALIGN(sizeof(struct sk_buff)))#define
SOCK_MIN_SNDBUF(TCP_SKB_MIN_TRUESIZE* 2)
#defineSOCK_MIN_RCVBUFTCP_SKB_MIN_TRUESIZE
Quoted 7 lines
Quoted 3 lines
we can observe that value for which we set
SO_SNDBUFin TEST17 intest_1_to_1_sockopt.cneeds to be increasedVersion is visible in subject, 1.0.15, I hope http://sourceforge.net/projects/lksctp/files/ is still valid place to get it.
Already fixed in the current git tree (see lksctp.org) under
b7ad1afc16cb0c5("tests: fixtest_1_to_1_sockoptsock buff test case".) Will do a release some time next week.
I see, thanks, I will check it next time before reporting.
Quoted 10 lines
Quoted 10 lines
Best regards,
Matija
PS: happy new year!
Signature · 3 lines
To unsubscribe from this list: send the line "unsubscribe linux-sctp" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html