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 <je...@nicira.com> --- datapath/tunnel.c | 8 +------- datapath/tunnel.h | 3 +-- include/openvswitch/tunnel.h | 2 +- lib/netdev-vport.c | 6 +----- 4 files changed, 4 insertions(+), 15 deletions(-) diff --git a/datapath/tunnel.c b/datapath/tunnel.c index d03b708..d39f40b 100644 --- a/datapath/tunnel.c +++ b/datapath/tunnel.c @@ -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) { diff --git a/datapath/tunnel.h b/datapath/tunnel.h index b7de7a9..91f5f72 100644 --- a/datapath/tunnel.h +++ b/datapath/tunnel.h @@ -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. diff --git a/include/openvswitch/tunnel.h b/include/openvswitch/tunnel.h index 8a53ef8..6eb01b8 100644 --- a/include/openvswitch/tunnel.h +++ b/include/openvswitch/tunnel.h @@ -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. */ diff --git a/lib/netdev-vport.c b/lib/netdev-vport.c index cd6ae54..e52557f 100644 --- a/lib/netdev-vport.c +++ b/lib/netdev-vport.c @@ -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"); } -- 1.7.9.5 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev