2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-30 22:05:19 +00:00

tunneling: Avoid recirculation on datapath.

Open vSwitch datapath recirculates packets for tunneling, i.e. the
incoming packets are encapsulated at first pass.  Further actions are
applied on encapsulated packets on the second pass after
recirculating.  The proposed patch compute and append the post tunnel
actions at the time of translation itself instead of recirculating at
datapath. These actions are solely depends on tunnel attributes so
there is no need of datapath recirculation.  By avoiding the
recirculation at datapath, the patch offers up to 30% performance
improvement for VXLAN tunneling in our testing.  The action execution
logic is using the new CLONE action to define the packet cloning when
the actions are combined.  The length in the CLONE action specifies
the size of nested action set.

It also fixing the testsuite failures that are introduced by nested
CLONE action in tunneling.

Signed-off-by: Sugesh Chandran <sugesh.chandran@intel.com>
Signed-off-by: Zoltán Balogh <zoltan.balogh@ericsson.com>
Co-authored-by: Zoltán Balogh <zoltan.balogh@ericsson.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
Sugesh Chandran
2017-04-11 11:14:01 +01:00
committed by Ben Pfaff
parent 68c744fd30
commit f1dac5128c
6 changed files with 164 additions and 173 deletions

View File

@@ -4995,24 +4995,8 @@ dp_execute_cb(void *aux_, struct dp_packet_batch *packets_,
case OVS_ACTION_ATTR_TUNNEL_PUSH:
if (*depth < MAX_RECIRC_DEPTH) {
struct dp_packet_batch tnl_pkt;
struct dp_packet_batch *orig_packets_ = packets_;
int err;
if (!may_steal) {
dp_packet_batch_clone(&tnl_pkt, packets_);
packets_ = &tnl_pkt;
dp_packet_batch_reset_cutlen(orig_packets_);
}
dp_packet_batch_apply_cutlen(packets_);
err = push_tnl_action(pmd, a, packets_);
if (!err) {
(*depth)++;
dp_netdev_recirculate(pmd, packets_);
(*depth)--;
}
push_tnl_action(pmd, a, packets_);
return;
}
break;