#ifdef USE_UPSTREAM_TUNNEL
#include_next <net/udp_tunnel.h>
-/* this is to handle the return type change in handle-offload
- * functions.
- */
-static inline int
-rpl_udp_tunnel_handle_offloads(struct sk_buff *skb, bool udp_csum,
- bool is_vxlan)
-{
- if (skb_is_gso(skb) && skb_is_encapsulated(skb)) {
- return -ENOSYS;
- }
- return udp_tunnel_handle_offloads(skb, udp_csum);
-}
-
#else
#include <net/addrconf.h>
void ovs_udp_csum_gso(struct sk_buff *skb);
static inline int rpl_udp_tunnel_handle_offloads(struct sk_buff *skb,
- bool udp_csum,
- bool is_vxlan)
+ bool udp_csum)
{
int type = 0;
fix_segment = ovs_udp_gso;
else
fix_segment = ovs_udp_csum_gso;
-
#if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0)
- if (!is_vxlan)
- type = 0;
+ /* This functuin is not used by vxlan lan tunnel. On older
+ * udp offload only supports vxlan, therefore fallback to software
+ * segmentation.
+ */
+ type = 0;
#endif
return ovs_iptunnel_handle_offloads(skb, udp_csum, type, fix_segment);
}
-#endif /* USE_UPSTREAM_TUNNEL */
#define udp_tunnel_handle_offloads rpl_udp_tunnel_handle_offloads
static inline void ovs_udp_tun_rx_dst(struct metadata_dst *md_dst,
if (udp_hdr(skb)->check)
info->key.tun_flags |= TUNNEL_CSUM;
}
+#endif /* USE_UPSTREAM_TUNNEL */
#endif