datapath: Remove support for Don't Fragment inheritance.
authorJesse Gross <jesse@nicira.com>
Fri, 25 Jan 2013 20:38:45 +0000 (12:38 -0800)
committerJesse Gross <jesse@nicira.com>
Mon, 28 Jan 2013 18:26:32 +0000 (10:26 -0800)
Inheritance of the Don't Fragment bit in tunnels will not be
supported with flow based tunneling and has already been removed
from userspace.  This removes the corresponding kernel support.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Kyle Mestery <kmestery@cisco.com>
datapath/tunnel.c
datapath/tunnel.h
include/openvswitch/tunnel.h
lib/netdev-vport.c

index d03b708..d39f40b 100644 (file)
@@ -627,19 +627,16 @@ static bool check_mtu(struct sk_buff *skb,
                      const struct rtable *rt, __be16 *frag_offp,
                      int tunnel_hlen)
 {
-       bool df_inherit;
        bool pmtud;
        __be16 frag_off;
        int mtu = 0;
        unsigned int packet_length = skb->len - ETH_HLEN;
 
        if (OVS_CB(skb)->tun_key->ipv4_dst) {
-               df_inherit = false;
                pmtud = false;
                frag_off = OVS_CB(skb)->tun_key->tun_flags & OVS_TNL_F_DONT_FRAGMENT ?
                                  htons(IP_DF) : 0;
        } else {
-               df_inherit = mutable->flags & TNL_F_DF_INHERIT;
                pmtud = mutable->flags & TNL_F_PMTUD;
                frag_off = mutable->flags & TNL_F_DF_DEFAULT ? htons(IP_DF) : 0;
        }
@@ -668,9 +665,6 @@ static bool check_mtu(struct sk_buff *skb,
        if (skb->protocol == htons(ETH_P_IP)) {
                struct iphdr *iph = ip_hdr(skb);
 
-               if (df_inherit)
-                       frag_off = iph->frag_off & htons(IP_DF);
-
                if (pmtud && iph->frag_off & htons(IP_DF)) {
                        mtu = max(mtu, IP_MIN_MTU);
 
@@ -684,7 +678,7 @@ static bool check_mtu(struct sk_buff *skb,
                /* IPv6 requires end hosts to do fragmentation
                 * if the packet is above the minimum MTU.
                 */
-               if (df_inherit && packet_length > IPV6_MIN_MTU)
+               if (packet_length > IPV6_MIN_MTU)
                        frag_off = htons(IP_DF);
 
                if (pmtud) {
index 82c5cca..2680680 100644 (file)
@@ -56,8 +56,7 @@
 
 /* All public tunnel flags. */
 #define TNL_F_PUBLIC (TNL_F_CSUM | TNL_F_TOS_INHERIT | TNL_F_TTL_INHERIT | \
-                     TNL_F_DF_INHERIT | TNL_F_DF_DEFAULT | TNL_F_PMTUD | \
-                     TNL_F_IPSEC)
+                     TNL_F_DF_DEFAULT | TNL_F_PMTUD | TNL_F_IPSEC)
 
 /**
  * struct port_lookup_key - Tunnel port key, used as hash table key.
index 8a53ef8..6eb01b8 100644 (file)
@@ -67,7 +67,7 @@ enum {
 #define TNL_F_CSUM             (1 << 0) /* Checksum packets. */
 #define TNL_F_TOS_INHERIT      (1 << 1) /* Inherit ToS from inner packet. */
 #define TNL_F_TTL_INHERIT      (1 << 2) /* Inherit TTL from inner packet. */
-#define TNL_F_DF_INHERIT       (1 << 3) /* Inherit DF bit from inner packet. */
+/* Bit 3 was previously used for Don't Fragment inheritance. " */
 #define TNL_F_DF_DEFAULT       (1 << 4) /* Set DF bit if inherit off or
                                          * not IP. */
 /* Bit 6 is reserved since it was previously used for Tunnel header caching. */
index cd6ae54..e52557f 100644 (file)
@@ -747,11 +747,7 @@ get_tunnel_config(struct netdev_dev *dev_, struct smap *args)
     if (flags & TNL_F_CSUM) {
         smap_add(args, "csum", "true");
     }
-    if (flags & TNL_F_DF_INHERIT) {
-        /* Shouldn't happen as "df_inherit" is no longer supported.  However,
-         * for completeness we report it if it's there. */
-        smap_add(args, "df_inherit", "true");
-    }
+
     if (!(flags & TNL_F_DF_DEFAULT)) {
         smap_add(args, "df_default", "false");
     }