summaryrefslogtreecommitdiff
path: root/ofproto/ofproto-dpif-xlate-cache.h
diff options
context:
space:
mode:
authorSugesh Chandran <sugesh.chandran@intel.com>2017-07-19 14:46:03 +0100
committerJoe Stringer <joe@ovn.org>2017-07-19 14:34:20 -0700
commit7c12dfc527a5f6e35eb47494d6284d5a7dbc352c (patch)
treeb9dc15b3648391792ce45f6e3df5b90aabf9322d /ofproto/ofproto-dpif-xlate-cache.h
parentce8bbd37ffd41144f13b583726384f0f5e1db849 (diff)
downloadopenvswitch-7c12dfc527a5f6e35eb47494d6284d5a7dbc352c.tar.gz
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>
Diffstat (limited to 'ofproto/ofproto-dpif-xlate-cache.h')
-rw-r--r--ofproto/ofproto-dpif-xlate-cache.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/ofproto/ofproto-dpif-xlate-cache.h b/ofproto/ofproto-dpif-xlate-cache.h
index 13f7cbc91..e62719740 100644
--- a/ofproto/ofproto-dpif-xlate-cache.h
+++ b/ofproto/ofproto-dpif-xlate-cache.h
@@ -52,6 +52,7 @@ enum xc_type {
XC_GROUP,
XC_TNL_NEIGH,
XC_CONTROLLER,
+ XC_TUNNEL_HEADER,
};
/* xlate_cache entries hold enough information to perform the side effects of
@@ -119,6 +120,13 @@ struct xc_entry {
struct ofproto_dpif *ofproto;
struct ofproto_async_msg *am;
} controller;
+ struct {
+ enum {
+ ADD,
+ REMOVE,
+ } operation;
+ uint16_t hdr_size;
+ } tunnel_hdr;
};
};
@@ -134,11 +142,12 @@ struct xlate_cache {
void xlate_cache_init(struct xlate_cache *);
struct xlate_cache *xlate_cache_new(void);
struct xc_entry *xlate_cache_add_entry(struct xlate_cache *, enum xc_type);
-void xlate_push_stats_entry(struct xc_entry *, const struct dpif_flow_stats *);
-void xlate_push_stats(struct xlate_cache *, const struct dpif_flow_stats *);
+void xlate_push_stats_entry(struct xc_entry *, struct dpif_flow_stats *);
+void xlate_push_stats(struct xlate_cache *, struct dpif_flow_stats *);
void xlate_cache_clear_entry(struct xc_entry *);
void xlate_cache_clear(struct xlate_cache *);
void xlate_cache_uninit(struct xlate_cache *);
void xlate_cache_delete(struct xlate_cache *);
+void xlate_cache_steal_entries(struct xlate_cache *, struct xlate_cache *);
#endif /* ofproto-dpif-xlate-cache.h */