mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 06:15:47 +00:00
tunneling: Avoid datapath-recirc by combining recirc actions at xlate.
This patch set removes the recirculation of encapsulated tunnel packets if possible. It is done by computing the post tunnel actions at the time of translation. The combined nested action set are programmed in the datapath using CLONE action. The following test results shows the performance improvement offered by this optimization for tunnel encap. +-------------+ dpdk0 | | -->o br-in | | o--> gre0 +-------------+ --> LOCAL +-----------o-+ | | dpdk1 | br-p1 o--> | | +-------------+ Test result on OVS master with DPDK 16.11.2 (Without optimization): # dpdk0 RX packets : 7037641.60 / sec RX packet errors : 0 / sec RX packets dropped : 7730632.90 / sec RX rate : 402.69 MB/sec # dpdk1 TX packets : 7037641.60 / sec TX packet errors : 0 / sec TX packets dropped : 0 / sec TX rate : 657.73 MB/sec TX processing cost per TX packets in nsec : 142.09 Test result on OVS master + DPDK 16.11.2 (With optimization): # dpdk0 RX packets : 9386809.60 / sec RX packet errors : 0 / sec RX packets dropped : 5381496.40 / sec RX rate : 537.11 MB/sec # dpdk1 TX packets : 9386809.60 / sec TX packet errors : 0 / sec TX packets dropped : 0 / sec TX rate : 877.29 MB/sec TX processing cost per TX packets in nsec : 106.53 The offered performance gain is approx 30%. 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: Joe Stringer <joe@ovn.org>
This commit is contained in:
committed by
Joe Stringer
parent
ce8bbd37ff
commit
7c12dfc527
@@ -5048,24 +5048,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;
|
||||
|
Reference in New Issue
Block a user