From dca9309ae888995f13be5e1bfa607214ca531613 Mon Sep 17 00:00:00 2001 From: Jesse Gross Date: Mon, 30 Aug 2010 15:34:04 -0700 Subject: [PATCH] tunneling: Allow disabling tunnel header caching. Tunnel header caching significantly improves performance by bypassing much of the transmit path. However, in some special cases or for debugging it may be desirable to traverse the entire IP stack. This exposes that as an option (default is to enable header caching). Signed-off-by: Jesse Gross Reviewed-by: Ben Pfaff --- lib/netdev-tunnel.c | 5 +++++ vswitchd/vswitch.xml | 22 ++++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/lib/netdev-tunnel.c b/lib/netdev-tunnel.c index d0ecd98e..fdc1d976 100644 --- a/lib/netdev-tunnel.c +++ b/lib/netdev-tunnel.c @@ -66,6 +66,7 @@ parse_config(const char *name, const char *type, const struct shash *args, memset(config, 0, sizeof *config); config->flags |= TNL_F_PMTUD; + config->flags |= TNL_F_HDR_CACHE; SHASH_FOR_EACH (node, args) { if (!strcmp(node->name, "remote_ip")) { @@ -121,6 +122,10 @@ parse_config(const char *name, const char *type, const struct shash *args, if (!strcmp(node->data, "false")) { config->flags &= ~TNL_F_PMTUD; } + } else if (!strcmp(node->name, "header_cache")) { + if (!strcmp(node->data, "false")) { + config->flags &= ~TNL_F_HDR_CACHE; + } } else { VLOG_WARN("%s: unknown %s argument '%s'", name, type, node->name); } diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml index 6e255763..86fd3f9b 100644 --- a/vswitchd/vswitch.xml +++ b/vswitchd/vswitch.xml @@ -539,6 +539,17 @@ compliance with the IEEE 802.1D specification for bridges. Default is enabled, set to false to disable. +
+
header_cache
+
Optional. Enable caching of tunnel headers and the output + path. This can lead to a significant performance increase + without changing behavior. In general it should not be + necessary to adjust this setting. However, the caching can + bypass certain components of the IP stack (such as IP tables) + and it may be useful to disable it if these features are + required or as a debugging measure. Default is enabled, set to + false to disable.
+
capwap
Ethernet tunneling over the UDP transport portion of CAPWAP @@ -594,6 +605,17 @@ compliance with the IEEE 802.1D specification for bridges. Default is enabled, set to false to disable.
+
+
header_cache
+
Optional. Enable caching of tunnel headers and the output + path. This can lead to a significant performance increase + without changing behavior. In general it should not be + necessary to adjust this setting. However, the caching can + bypass certain components of the IP stack (such as IP tables) + and it may be useful to disable it if these features are + required or as a debugging measure. Default is enabled, set to + false to disable.
+
patch
-- 2.30.2