mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 06:15:47 +00:00
dpif: Pass flow parameter to dpif_execute().
All the callers of the function already have a copy of the extracted flow in their stack (or a few frames before). This is useful for different resons: * It forces the callers to also call flow_extract() on the packet, which is necessary to initialize the l2,l3,l4 pointers. * It will be used in the userspace datapath to generate the RSS hash by a following commit * It can be used by the userspace connection tracker to avoid extracting the l3 type again. Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com> Acked-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
@@ -1079,6 +1079,7 @@ dpif_flow_dump_next(struct dpif_flow_dump_thread *thread,
|
||||
|
||||
struct dpif_execute_helper_aux {
|
||||
struct dpif *dpif;
|
||||
const struct flow *flow;
|
||||
int error;
|
||||
};
|
||||
|
||||
@@ -1124,6 +1125,7 @@ dpif_execute_helper_cb(void *aux_, struct dp_packet_batch *packets_,
|
||||
}
|
||||
|
||||
execute.packet = packet;
|
||||
execute.flow = aux->flow;
|
||||
execute.needs_help = false;
|
||||
execute.probe = false;
|
||||
execute.mtu = 0;
|
||||
@@ -1158,7 +1160,7 @@ dpif_execute_helper_cb(void *aux_, struct dp_packet_batch *packets_,
|
||||
static int
|
||||
dpif_execute_with_help(struct dpif *dpif, struct dpif_execute *execute)
|
||||
{
|
||||
struct dpif_execute_helper_aux aux = {dpif, 0};
|
||||
struct dpif_execute_helper_aux aux = {dpif, execute->flow, 0};
|
||||
struct dp_packet_batch pb;
|
||||
|
||||
COVERAGE_INC(dpif_execute_with_help);
|
||||
|
Reference in New Issue
Block a user