summaryrefslogtreecommitdiff
path: root/lib/netdev-native-tnl.h
diff options
context:
space:
mode:
authorPravin B Shelar <pshelar@ovn.org>2016-05-23 20:27:14 -0700
committerPravin B Shelar <pshelar@ovn.org>2016-05-23 20:27:14 -0700
commit4975aa3ee6a8e5643b12e8d8d66facb705d11367 (patch)
treed4ba07aa8428bb9c15ba4af90550b05a33969575 /lib/netdev-native-tnl.h
parentb803e6ac63f03b53bc5d0c52634ea88f783d506f (diff)
downloadopenvswitch-4975aa3ee6a8e5643b12e8d8d66facb705d11367.tar.gz
netdev-native-tnl: Introduce ip_build_header()
The native tunneling build tunnel header code is spread across two different modules, it makes pretty hard to follow the code. Following patch refactors the code to move all code to netdev-ative-tnl module. Signed-off-by: Pravin B Shelar <pshelar@ovn.org> Acked-by: Jesse Gross <jesse@kernel.org>
Diffstat (limited to 'lib/netdev-native-tnl.h')
-rw-r--r--lib/netdev-native-tnl.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/netdev-native-tnl.h b/lib/netdev-native-tnl.h
index e0d15fc44..ed81857ca 100644
--- a/lib/netdev-native-tnl.h
+++ b/lib/netdev-native-tnl.h
@@ -25,7 +25,8 @@
int
netdev_gre_build_header(const struct netdev *netdev,
struct ovs_action_push_tnl *data,
- const struct flow *tnl_flow);
+ const struct netdev_tnl_build_header_params *params);
+
void
netdev_gre_push_header(struct dp_packet *packet,
const struct ovs_action_push_tnl *data);
@@ -38,14 +39,16 @@ netdev_tnl_push_udp_header(struct dp_packet *packet,
int
netdev_geneve_build_header(const struct netdev *netdev,
struct ovs_action_push_tnl *data,
- const struct flow *tnl_flow);
+ const struct netdev_tnl_build_header_params *params);
+
struct dp_packet *
netdev_geneve_pop_header(struct dp_packet *packet);
int
netdev_vxlan_build_header(const struct netdev *netdev,
struct ovs_action_push_tnl *data,
- const struct flow *tnl_flow);
+ const struct netdev_tnl_build_header_params *params);
+
struct dp_packet *
netdev_vxlan_pop_header(struct dp_packet *packet);
@@ -69,6 +72,11 @@ netdev_tnl_ipv6_hdr(void *eth)
return (void *)((char *)eth + sizeof (struct eth_header));
}
+void *
+netdev_tnl_ip_build_header(struct ovs_action_push_tnl *data,
+ const struct netdev_tnl_build_header_params *params,
+ uint8_t next_proto);
+
extern uint16_t tnl_udp_port_min;
extern uint16_t tnl_udp_port_max;