From 4975aa3ee6a8e5643b12e8d8d66facb705d11367 Mon Sep 17 00:00:00 2001 From: Pravin B Shelar Date: Mon, 23 May 2016 20:27:14 -0700 Subject: 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 Acked-by: Jesse Gross --- lib/netdev-native-tnl.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'lib/netdev-native-tnl.h') 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; -- cgit v1.2.1