diff options
author | David S. Miller <davem@davemloft.net> | 2014-11-11 13:32:25 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-11-11 13:32:25 -0500 |
commit | 4083c8056deebc01e658d6a2ba060cca4e733fb8 (patch) | |
tree | 031b87d6800ba69eab4f00c304472864e50c51d2 /net/openvswitch/vport-gre.c | |
parent | a2ae6007a442d6bb27d77bf20ec1b06cda9e306e (diff) | |
parent | 05da5898a96c05e32aa9850c9cd89eef29471b13 (diff) | |
download | kernel_replicant_linux-4083c8056deebc01e658d6a2ba060cca4e733fb8.tar.gz kernel_replicant_linux-4083c8056deebc01e658d6a2ba060cca4e733fb8.tar.bz2 kernel_replicant_linux-4083c8056deebc01e658d6a2ba060cca4e733fb8.zip |
Merge branch 'net_next_ovs' of git://git.kernel.org/pub/scm/linux/kernel/git/pshelar/openvswitch
Pravin B Shelar says:
====================
Open vSwitch
Following batch of patches brings feature parity between upstream
ovs and out of tree ovs module.
Two features are added, first adds support to export egress
tunnel information for a packet. This is used to improve
visibility in network traffic. Second feature allows userspace
vswitchd process to probe ovs module features. Other patches
are optimization and code cleanup.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/openvswitch/vport-gre.c')
-rw-r--r-- | net/openvswitch/vport-gre.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/net/openvswitch/vport-gre.c b/net/openvswitch/vport-gre.c index 00270b608844..8e61a5c6ae7c 100644 --- a/net/openvswitch/vport-gre.c +++ b/net/openvswitch/vport-gre.c @@ -108,7 +108,7 @@ static int gre_rcv(struct sk_buff *skb, return PACKET_REJECT; key = key_to_tunnel_id(tpi->key, tpi->seq); - ovs_flow_tun_info_init(&tun_info, ip_hdr(skb), key, + ovs_flow_tun_info_init(&tun_info, ip_hdr(skb), 0, 0, key, filter_tnl_flags(tpi->flags), NULL, 0); ovs_vport_receive(vport, skb, &tun_info); @@ -284,12 +284,22 @@ static void gre_tnl_destroy(struct vport *vport) gre_exit(); } +static int gre_get_egress_tun_info(struct vport *vport, struct sk_buff *skb, + struct ovs_tunnel_info *egress_tun_info) +{ + return ovs_tunnel_get_egress_info(egress_tun_info, + ovs_dp_get_net(vport->dp), + OVS_CB(skb)->egress_tun_info, + IPPROTO_GRE, skb->mark, 0, 0); +} + static struct vport_ops ovs_gre_vport_ops = { .type = OVS_VPORT_TYPE_GRE, .create = gre_create, .destroy = gre_tnl_destroy, .get_name = gre_get_name, .send = gre_tnl_send, + .get_egress_tun_info = gre_get_egress_tun_info, .owner = THIS_MODULE, }; |