aboutsummaryrefslogtreecommitdiff
path: root/datapath/flow_netlink.c
diff options
context:
space:
mode:
authorJesse Gross <jesse@nicira.com>2014-05-27 21:50:35 -0700
committerJesse Gross <jesse@nicira.com>2014-06-19 18:33:28 -0700
commit94872594b79d1a4a6cfb9434b1c1d1d506b3c57d (patch)
treedd38aa91a75b0f0168f0158939c8907aa6ba8a9c /datapath/flow_netlink.c
parentf0cd669f192495472cd7e76d02b48afe9c3db47c (diff)
tunnel: Add support for matching on OAM packets.
Some tunnel formats have mechanisms for indicating that packets are OAM frames that should be handled specially (either as high priority or not forwarded beyond an endpoint). This provides support for allowing those types of packets to be matched. Signed-off-by: Jesse Gross <jesse@nicira.com> Acked-by: Thomas Graf <tgraf@suug.ch> Acked-by: Pravin B Shelar <pshelar@nicira.com>
Diffstat (limited to 'datapath/flow_netlink.c')
-rw-r--r--datapath/flow_netlink.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/datapath/flow_netlink.c b/datapath/flow_netlink.c
index 0048a6e90..c5ca2f490 100644
--- a/datapath/flow_netlink.c
+++ b/datapath/flow_netlink.c
@@ -347,6 +347,7 @@ static int ipv4_tun_from_nlattr(const struct nlattr *attr,
[OVS_TUNNEL_KEY_ATTR_TTL] = 1,
[OVS_TUNNEL_KEY_ATTR_DONT_FRAGMENT] = 0,
[OVS_TUNNEL_KEY_ATTR_CSUM] = 0,
+ [OVS_TUNNEL_KEY_ATTR_OAM] = 0,
};
if (type > OVS_TUNNEL_KEY_ATTR_MAX) {
@@ -391,6 +392,9 @@ static int ipv4_tun_from_nlattr(const struct nlattr *attr,
case OVS_TUNNEL_KEY_ATTR_CSUM:
tun_flags |= TUNNEL_CSUM;
break;
+ case OVS_TUNNEL_KEY_ATTR_OAM:
+ tun_flags |= TUNNEL_OAM;
+ break;
default:
return -EINVAL;
}
@@ -448,6 +452,9 @@ static int ipv4_tun_to_nlattr(struct sk_buff *skb,
if ((output->tun_flags & TUNNEL_CSUM) &&
nla_put_flag(skb, OVS_TUNNEL_KEY_ATTR_CSUM))
return -EMSGSIZE;
+ if ((output->tun_flags & TUNNEL_OAM) &&
+ nla_put_flag(skb, OVS_TUNNEL_KEY_ATTR_OAM))
+ return -EMSGSIZE;
nla_nest_end(skb, nla);
return 0;