mptcp: add splice test#162
Conversation
This patch adds splice test for MPTCP. Signed-off-by: Geliang Tang <geliang@kernel.org>
matttbe
left a comment
There was a problem hiding this comment.
very good idea to add a packetdrill test for that. Here are a few suggestions to make the test more robust and covering more code.
| +0 listen(3, 1) = 0 | ||
|
|
||
| // Connection should get accepted | ||
| +0 < addr[caddr0] > addr[saddr0] S 0:0(0) win 65535 <mss 1460, sackOK, TS val 4074410674 ecr 0, nop, wscale 8, mpcapable v1 flags[flag_h] nokey> |
There was a problem hiding this comment.
if you only have one subflow for the whole MPTCP connection, no need to specify addr[caddr0] > addr[saddr0]
|
|
||
| +0 pipe([5, 6]) = 0 | ||
|
|
||
| +0 < P. 1:101(100) ack 1 win 257 |
There was a problem hiding this comment.
here, you are injecting a "plain TCP" (without MPTCP options) packet. Is it on purpose?
| +0.1 < . 1:1(0) ack 1 win 256 <nop, nop, TS val 4074410674 ecr 4074410674, mpcapable v1 flags[flag_h] key[ckey=2, skey]> | ||
| +0 accept(3, ..., ...) = 4 | ||
|
|
||
| +0 pipe([5, 6]) = 0 |
There was a problem hiding this comment.
can you add a comment explaining why it is needed please?
| +0 pipe([5, 6]) = 0 | ||
|
|
||
| +0 < P. 1:101(100) ack 1 win 257 | ||
| +0 splice(4, NULL, 6, NULL, 99, 0) = 99 |
There was a problem hiding this comment.
please add a comment explaining what you are trying to do here and below.
|
|
||
| +0 < P. 1:101(100) ack 1 win 257 | ||
| +0 splice(4, NULL, 6, NULL, 99, 0) = 99 | ||
| +0 splice(4, NULL, 6, NULL, 1, 0) = 1 |
There was a problem hiding this comment.
here I see that you "move data" from FD 4 (MPTCP connection) to 6. But you never use 5. Maybe you should at least read from it to make sure 100B have been written?
Or, maybe better, can you "move data" from 5 to 4, and check that packets are generated on the wire as expected? (+0 > . 1:100(100) ack 101 <(...)>)
|
|
||
| +0 pipe([5, 6]) = 0 | ||
|
|
||
| +0 < P. 1:101(100) ack 1 win 257 |
There was a problem hiding this comment.
after this, you should check the stack sends an ACK back with MPTCP options as expected.
| +0 listen(3, 1) = 0 | ||
|
|
||
| // Connection should get accepted | ||
| +0 < addr[caddr0] > addr[saddr0] S 0:0(0) win 65535 <mss 1460, sackOK, TS val 4074410674 ecr 0, nop, wscale 8, mpcapable v1 flags[flag_h] nokey> |
There was a problem hiding this comment.
note: the TCP timestamps might not be needed, it might be easier not to deal with them: simply drop them, align with nop → a bit similar to what was done in recent new .pkt file, e.g. gtests/net/mptcp/mp_join/mp_join_server_dss_drop_after_mpj.pkt
|
@geliangtang I think having such test would be very useful. Do you still plan to update it? |
Note that, even if the kernel patches have already been merged, I still think having such test here would be very helpful. |
This patch adds splice test for MPTCP.