-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add sendmmsg vector IO support #2
base: master
Are you sure you want to change the base?
Add sendmmsg vector IO support #2
Conversation
A benchmark process that creates multiple packet sockets in a single fanout group. It spawns one process per socket and pins each process to its own core. Each process reads the packets arriving on that cpu. The socket group has flag PACKET_FANOUT_FLAG_ROLLOVER enabled, so that a saturated cpu can offload packets to others in the group. Use this with a remote packet generator (such as pktgen.ko) to cause high load. Send a single 4-tuple to cause load imbalance. To create socket overload without saturating the physical link, limit the processing rate of each socket reader process by passing -l $RATE. Signed-off-by: Willem de Bruijn <[email protected]>
delay concurrent execution until the socket fanout group is completely initialized. Signed-off-by: Willem de Bruijn <[email protected]>
Add a test that reads from a packet socket ring with both options PACKET_RX_RING and PACKET_VNET_HDR enabled.
Add a test that writes over a packet socket both - with and without PACKET_TX_RING - with and without PACKET_VNET_HDR
Add - PACKET_QDISC_BYPASS support - Short input support - override length flag - drop CAP_SYS_RAWIO to force min length check in kernel Fix - Always allocate large enough ring slot
tcplate computes traffic shaping latency by reading egress packet timestamps with nflog and packet sockets. SO_TIMESTAMPING offers a more complete timestamping solution for processes that own file descriptors. Tcplate is geared at casual latency monitoring by administrators.
Allow passing a vnet_hdr to the packet socket without triggering segmentation offload. This allows testing checksum offload on MTU sized packets.
corresponds to netdev submission ip: add RECVFRAGSIZE cmsg http://patchwork.ozlabs.org/patch/690431/ http://patchwork.ozlabs.org/patch/690430/ http://patchwork.ozlabs.org/patch/690429/
pingpong_tcpudp sends a simple echo request/response pair over packet sockets, mimicing TCP or UDP headers.
1. Add an option to send using sendmmsg 2. Reorganize packet creation to match sendmmsg semantics 3. Allow for the creation of packets split in 3: vmesg header, header, body - this matches the format that would be generated in a kernel skb is converted to an iov. Signed-off-by: Anton Ivanov <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for sharing your code.
Point 3 is interesting: testing sendmsg with with vectors of more elements.
Point 1 is not needed. sendmmsg() is really a thin loop around sendmsg(). It helps performance centric workloads, but exercising that codepath does not add relevant code coverage for this functional af_packet test, while complicating the code. In general the patch has a lot of code churn. Also, dynamic allocation is failure prone, and indeed not freed here.
4c69f0c
to
eaa2305
Compare
vmesg header, header, body - this matches the format
that would be generated in a kernel skb is converted
to an iov.
Signed-off-by: Anton Ivanov [email protected]