[ovs-dev] [PATCHv2] netdev-vport: Disable Path MTU Discovery by default

Ansis Atteka aatteka at nicira.com
Thu Oct 25 11:50:10 UTC 2012


In near future we will switch to the flow-based tunneling and drop path
MTU discovery support. This patch prepares for that by changing the default
PMTUD value from 'enabled' to 'disabled'.

Signed-off-by: Ansis Atteka <aatteka at nicira.com>
---
 NEWS                 |    1 +
 lib/netdev-vport.c   |   10 +++++-----
 vswitchd/vswitch.xml |    2 +-
 3 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/NEWS b/NEWS
index 3cb1bd3..fa0a249 100644
--- a/NEWS
+++ b/NEWS
@@ -32,6 +32,7 @@ v1.9.0 - xx xxx xxxx
       are true, but because we do not know of any users for this
       feature it seems better on balance to remove it.  (The ovs-pki-cgi
       program was not included in distribution packaging.)
+    - Tunnel Path MTU Discovery default value was set to 'disabled'.
     - ovsdb-server now enforces the immutability of immutable columns.  This
       was not enforced in earlier versions due to an oversight.
     - New support for a nonstandard form of GRE that supports a 64-bit key.
diff --git a/lib/netdev-vport.c b/lib/netdev-vport.c
index 621abd1..4168959 100644
--- a/lib/netdev-vport.c
+++ b/lib/netdev-vport.c
@@ -590,7 +590,7 @@ parse_tunnel_config(const char *name, const char *type,
     ovs_be32 saddr = htonl(0);
     uint32_t flags;
 
-    flags = TNL_F_DF_DEFAULT | TNL_F_PMTUD | TNL_F_HDR_CACHE;
+    flags = TNL_F_DF_DEFAULT | TNL_F_HDR_CACHE;
     if (!strcmp(type, "gre") || !strcmp(type, "gre64")) {
         is_gre = true;
     } else if (!strcmp(type, "ipsec_gre") || !strcmp(type, "ipsec_gre64")) {
@@ -647,8 +647,8 @@ parse_tunnel_config(const char *name, const char *type,
                 flags &= ~TNL_F_DF_DEFAULT;
             }
         } else if (!strcmp(node->key, "pmtud")) {
-            if (!strcmp(node->value, "false")) {
-                flags &= ~TNL_F_PMTUD;
+            if (!strcmp(node->value, "true")) {
+                flags |= TNL_F_PMTUD;
             }
         } else if (!strcmp(node->key, "header_cache")) {
             if (!strcmp(node->value, "false")) {
@@ -844,8 +844,8 @@ unparse_tunnel_config(const char *name OVS_UNUSED, const char *type OVS_UNUSED,
     if (!(flags & TNL_F_DF_DEFAULT)) {
         smap_add(args, "df_default", "false");
     }
-    if (!(flags & TNL_F_PMTUD)) {
-        smap_add(args, "pmtud", "false");
+    if (flags & TNL_F_PMTUD) {
+        smap_add(args, "pmtud", "true");
     }
 
     return 0;
diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml
index e9ea0c4..0bc4ccd 100644
--- a/vswitchd/vswitch.xml
+++ b/vswitchd/vswitch.xml
@@ -1366,7 +1366,7 @@
         of the tunnel headers.  Note that this option causes behavior that is
         typically reserved for routers and therefore is not entirely in
         compliance with the IEEE 802.1D specification for bridges.  Default is
-        enabled; set to <code>false</code> to disable.
+        disabled; set to <code>true</code> to enable.
       </column>
 
       <group title="Tunnel Options: gre only">
-- 
1.7.9.5




More information about the dev mailing list