1 // SPDX-License-Identifier: GPL-2.0
2 // batch zerocopy test:
4 // send multiple packets, then read one range of all notifications.
8 0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
9 +0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
10 +0 setsockopt(3, SOL_SOCKET, SO_ZEROCOPY, [1], 4) = 0
11 +0 bind(3, ..., ...) = 0
14 +0 < S 0:0(0) win 32792 <mss 1000,sackOK,nop,nop,nop,wscale 7>
15 +0 > S. 0:0(0) ack 1 <mss 1460,nop,nop,sackOK,nop,wscale 8>
16 +0 < . 1:1(0) ack 1 win 257
18 +0 accept(3, ..., ...) = 4
19 +0 setsockopt(4, SOL_SOCKET, SO_MARK, [666], 4) = 0
21 +0 send(4, ..., 4000, MSG_ZEROCOPY) = 4000
22 +0 > P. 1:4001(4000) ack 1
23 +0 < . 1:1(0) ack 4001 win 257
25 +0 send(4, ..., 4000, MSG_ZEROCOPY) = 4000
26 +0 > P. 4001:8001(4000) ack 1
27 +0 < . 1:1(0) ack 8001 win 257
29 +0 recvmsg(4, {msg_name(...)=...,
31 msg_flags=MSG_ERRQUEUE,
33 {cmsg_level=CMSG_LEVEL_IP,
34 cmsg_type=CMSG_TYPE_RECVERR,
35 cmsg_data={ee_errno=0,
36 ee_origin=SO_EE_ORIGIN_ZEROCOPY,
38 ee_code=SO_EE_CODE_ZEROCOPY_COPIED,