Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib/flow: Introduce miniflow_extract().
miniflow_extract() extracts packet headers directly to a miniflow, which is a compressed form of the struct flow. This does not require a large struct to be cleared to begin with, and accesses less memory. These performance benefits should allow this to be used in the DPDK datapath. miniflow_extract() takes a miniflow as an input/output parameter. On input the buffer for values to be extracted must be properly initialized. On output the map contains ones for all the fields that have been extracted. Some struct flow fields are reordered to make miniflow_extract to progress in the logical order. Some explicit "inline" keywords are necessary for GCC to optimize this properly. Also, macros are used for same reason instead of inline functions for pushing data to the miniflow. Signed-off-by: Jarno Rajahalme <[email protected]> Reviewed-by: YAMAMOTO Takashi <[email protected]>
- Loading branch information