The names for the flags used by flow based tunneling are pretty long.
This shortens them a little by removing the word FLOW, which is a
distinction that won't be meaningful in the near future.
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Kyle Mestery <kmestery@cisco.com>
if (!tun_key->ipv4_dst)
return -EINVAL;
- if (!(tun_key->tun_flags & OVS_FLOW_TNL_F_KEY))
+ if (!(tun_key->tun_flags & OVS_TNL_F_KEY))
return -EINVAL;
tun_id = nla_get_be64(a[OVS_KEY_ATTR_TUN_ID]);
tun_id = nla_get_be64(nla);
if (tun_key->ipv4_dst) {
- if (!(tun_key->tun_flags & OVS_FLOW_TNL_F_KEY))
+ if (!(tun_key->tun_flags & OVS_TNL_F_KEY))
return -EINVAL;
if (tun_key->tun_id != tun_id)
return -EINVAL;
break;
}
tun_key->tun_id = tun_id;
- tun_key->tun_flags |= OVS_FLOW_TNL_F_KEY;
+ tun_key->tun_flags |= OVS_TNL_F_KEY;
break;
case OVS_KEY_ATTR_IPV4_TUNNEL:
- if (tun_key->tun_flags & OVS_FLOW_TNL_F_KEY) {
+ if (tun_key->tun_flags & OVS_TNL_F_KEY) {
tun_id = tun_key->tun_id;
memcpy(tun_key, nla_data(nla), sizeof(*tun_key));
- if (!(tun_key->tun_flags & OVS_FLOW_TNL_F_KEY))
+ if (!(tun_key->tun_flags & OVS_TNL_F_KEY))
return -EINVAL;
if (tun_key->tun_id != tun_id)
tun_key = nla_data(nla);
memcpy(tun_key, &swkey->phy.tun.tun_key, sizeof(*tun_key));
}
- if ((swkey->phy.tun.tun_key.tun_flags & OVS_FLOW_TNL_F_KEY) &&
+ if ((swkey->phy.tun.tun_key.tun_flags & OVS_TNL_F_KEY) &&
nla_put_be64(skb, OVS_KEY_ATTR_TUN_ID, swkey->phy.tun.tun_key.tun_id))
goto nla_put_failure;
if (OVS_CB(skb)->tun_key->ipv4_dst) {
df_inherit = false;
pmtud = false;
- frag_off = OVS_CB(skb)->tun_key->tun_flags & OVS_FLOW_TNL_F_DONT_FRAGMENT ?
+ 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;
if (tun_key->ipv4_dst) {
*flags = 0;
- if (tun_key->tun_flags & OVS_FLOW_TNL_F_KEY)
+ if (tun_key->tun_flags & OVS_TNL_F_KEY)
*flags = TNL_F_OUT_KEY_ACTION;
- if (tun_key->tun_flags & OVS_FLOW_TNL_F_CSUM)
+ if (tun_key->tun_flags & OVS_TNL_F_CSUM)
*flags |= TNL_F_CSUM;
*out_key = tun_key->tun_id;
} else {
!(mutable->flags & TNL_F_IN_KEY_MATCH))
key_present = false;
- tnl_tun_key_init(&tun_key, iph, key, key_present ? OVS_FLOW_TNL_F_KEY : 0);
+ tnl_tun_key_init(&tun_key, iph, key, key_present ? OVS_TNL_F_KEY : 0);
OVS_CB(skb)->tun_key = &tun_key;
ovs_tnl_rcv(vport, skb);
if (tun_key->ipv4_dst) {
*flags = 0;
- if (tun_key->tun_flags & OVS_FLOW_TNL_F_KEY)
+ if (tun_key->tun_flags & OVS_TNL_F_KEY)
*flags = TNL_F_OUT_KEY_ACTION;
- if (tun_key->tun_flags & OVS_FLOW_TNL_F_CSUM)
+ if (tun_key->tun_flags & OVS_TNL_F_CSUM)
*flags |= TNL_F_CSUM;
*tunnel_type = TNL_T_PROTO_GRE;
*out_key = tun_key->tun_id;
if (gre_flags & GRE_KEY) {
if (mutable->key.daddr && (mutable->flags & TNL_F_IN_KEY_MATCH))
- tunnel_flags = OVS_FLOW_TNL_F_KEY;
+ tunnel_flags = OVS_TNL_F_KEY;
else if (!mutable->key.daddr)
- tunnel_flags = OVS_FLOW_TNL_F_KEY;
+ tunnel_flags = OVS_TNL_F_KEY;
}
if (gre_flags & GRE_CSUM)
- tunnel_flags |= OVS_FLOW_TNL_F_CSUM;
+ tunnel_flags |= OVS_TNL_F_CSUM;
return tunnel_flags;
}
};
/* Values for ovs_key_ipv4_tunnel->tun_flags */
-#define OVS_FLOW_TNL_F_DONT_FRAGMENT (1 << 0)
-#define OVS_FLOW_TNL_F_CSUM (1 << 1)
-#define OVS_FLOW_TNL_F_KEY (1 << 2)
+#define OVS_TNL_F_DONT_FRAGMENT (1 << 0)
+#define OVS_TNL_F_CSUM (1 << 1)
+#define OVS_TNL_F_KEY (1 << 2)
struct ovs_key_ipv4_tunnel {
__be64 tun_id;