Add sendmmsg vector IO support#2
Open
kot-begemot-uk wants to merge 20 commits into
Open
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 <willemb@google.com>
delay concurrent execution until the socket fanout group is completely initialized. Signed-off-by: Willem de Bruijn <willemb@google.com>
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 <anton.ivanov@cambridgegreys.com>
wdebruij
reviewed
Oct 16, 2017
wdebruij
left a comment
Owner
There was a problem hiding this comment.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 anton.ivanov@cambridgegreys.com