* [PATCH RESEND] lksctp: fix a problem when do test_1_to_1_sockopt
@ 2013-12-02 8:48 Wang Weidong
2013-12-02 12:59 ` Daniel Borkmann
0 siblings, 1 reply; 2+ messages in thread
From: Wang Weidong @ 2013-12-02 8:48 UTC (permalink / raw)
To: linux-sctp
From: Wang Weidong <wangweidong1@huawei.com>
When I do the test_1_to_1_sockopt, I got a Segmentation fault:
DUMP_CORE test_1_to_1_sockopt.c: 343.
I used the kernel is 3.12.
The problem is that the SOCK_MIN_SNDBUF is (TCP_SKB_MIN_TRUESIZE * 2)
while TCP_SKB_MIN_TRUESIZE is 2048 + SKB_DATA_ALIGN(sizeof(struct sk_buff))
The SKB_DATA_ALIGN I test is 256, so I make the sndbuf_val_set to 2304.
Signed-off-by: Wang Weidong <wangweidong1@huawei.com>
---
src/func_tests/test_1_to_1_sockopt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/func_tests/test_1_to_1_sockopt.c b/src/func_tests/test_1_to_1_sockopt.c
index e222991..986533b 100644
--- a/src/func_tests/test_1_to_1_sockopt.c
+++ b/src/func_tests/test_1_to_1_sockopt.c
@@ -320,7 +320,7 @@ main(void)
"got value differs Set Value=%d Get Value=%d",
(2*rcvbuf_val_set), rcvbuf_val_get);
- sndbuf_val_set = 2048;
+ sndbuf_val_set = 2304;
/* TEST17: Test case for setsockopt SO_SNDBUF */
error = setsockopt(sk2, SOL_SOCKET, SO_SNDBUF, &sndbuf_val_set, len);
if (error < 0)
-- 1.7.12
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH RESEND] lksctp: fix a problem when do test_1_to_1_sockopt
2013-12-02 8:48 [PATCH RESEND] lksctp: fix a problem when do test_1_to_1_sockopt Wang Weidong
@ 2013-12-02 12:59 ` Daniel Borkmann
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Borkmann @ 2013-12-02 12:59 UTC (permalink / raw)
To: linux-sctp
On 12/02/2013 09:48 AM, Wang Weidong wrote:
> From: Wang Weidong <wangweidong1@huawei.com>
>
> When I do the test_1_to_1_sockopt, I got a Segmentation fault:
> DUMP_CORE test_1_to_1_sockopt.c: 343.
> I used the kernel is 3.12.
> The problem is that the SOCK_MIN_SNDBUF is (TCP_SKB_MIN_TRUESIZE * 2)
> while TCP_SKB_MIN_TRUESIZE is 2048 + SKB_DATA_ALIGN(sizeof(struct sk_buff))
> The SKB_DATA_ALIGN I test is 256, so I make the sndbuf_val_set to 2304.
>
> Signed-off-by: Wang Weidong <wangweidong1@huawei.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-12-02 12:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-02 8:48 [PATCH RESEND] lksctp: fix a problem when do test_1_to_1_sockopt Wang Weidong
2013-12-02 12:59 ` Daniel Borkmann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.