Skip to content
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

Less copying, more batch optimisation #820

Merged
merged 2 commits into from Mar 14, 2024

Commits on Mar 13, 2024

  1. Add probe module prepare_packet callback to reduce copying

    Introduce new prepare_packet callback for the initialization of send
    buffers; contrary to the per-thread initialization callback where this
    was done previously, prepare_packet can be called multiple times, once
    for each send buffer.
    
    Make use of this to prepare packets to send directly in the batch
    buffers instead of copying them over.
    droe committed Mar 13, 2024
    Copy the full SHA
    9b6b608 View commit details
    Browse the repository at this point in the history
  2. Remove ip field from batch and align IP header in batch buf

    The ip field was only still used in send-bsd and only on a failure path
    for logging, which does not seem like a strong justification for keeping
    it around, especially given that it can always be read from packet data.
    
    While removing the ip field, align buf such that the IP header is going
    to start at a 32 bit aligned address, improving perf of IP header field
    access.
    droe committed Mar 13, 2024
    Copy the full SHA
    ff68785 View commit details
    Browse the repository at this point in the history