tcp_zerocopy_batch.pkt 1.4 KB

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