compat: Remove skbuff header helper backports.
authorJoe Stringer <joe@ovn.org>
Tue, 3 May 2016 00:47:33 +0000 (17:47 -0700)
committerJoe Stringer <joe@ovn.org>
Tue, 3 May 2016 22:46:44 +0000 (15:46 -0700)
These have existed largely since v2.6.22, so it's well overdue.

Signed-off-by: Joe Stringer <joe@ovn.org>
Acked-by: Jesse Gross <jesse@kernel.org>
acinclude.m4
datapath/linux/Modules.mk
datapath/linux/compat/include/linux/icmp.h [deleted file]
datapath/linux/compat/include/linux/icmpv6.h [deleted file]
datapath/linux/compat/include/linux/if_arp.h [deleted file]
datapath/linux/compat/include/linux/ip.h [deleted file]
datapath/linux/compat/include/linux/ipv6.h
datapath/linux/compat/include/linux/sctp.h [deleted file]
datapath/linux/compat/include/linux/skbuff.h
datapath/linux/compat/include/linux/tcp.h [deleted file]
datapath/linux/compat/include/linux/udp.h [deleted file]

index f2a1ea6..23015fe 100644 (file)
@@ -477,10 +477,6 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
   OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h],
                   [skb_reset_tail_pointer])
   OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_cow_head])
-  OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_transport_header],
-                  [OVS_DEFINE([HAVE_SKBUFF_HEADER_HELPERS])])
-  OVS_GREP_IFELSE([$KSRC/include/linux/icmpv6.h], [icmp6_hdr],
-                  [OVS_DEFINE([HAVE_ICMP6_HDR])])
   OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_warn_if_lro],
                   [OVS_DEFINE([HAVE_SKB_WARN_LRO])])
   OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [consume_skb])
index 7e334cb..5d38766 100644 (file)
@@ -37,15 +37,11 @@ openvswitch_headers += \
        linux/compat/include/linux/err.h \
        linux/compat/include/linux/etherdevice.h \
        linux/compat/include/linux/flex_array.h \
-       linux/compat/include/linux/icmp.h \
-       linux/compat/include/linux/icmpv6.h \
        linux/compat/include/linux/if.h \
-       linux/compat/include/linux/if_arp.h \
        linux/compat/include/linux/if_ether.h \
        linux/compat/include/linux/if_link.h \
        linux/compat/include/linux/if_vlan.h \
        linux/compat/include/linux/in.h \
-       linux/compat/include/linux/ip.h \
        linux/compat/include/linux/ipv6.h \
        linux/compat/include/linux/jiffies.h \
        linux/compat/include/linux/kconfig.h \
@@ -65,13 +61,10 @@ openvswitch_headers += \
        linux/compat/include/linux/rcupdate.h \
        linux/compat/include/linux/reciprocal_div.h \
        linux/compat/include/linux/rtnetlink.h \
-       linux/compat/include/linux/sctp.h \
        linux/compat/include/linux/skbuff.h \
        linux/compat/include/linux/stddef.h \
-       linux/compat/include/linux/tcp.h \
        linux/compat/include/linux/types.h \
        linux/compat/include/linux/u64_stats_sync.h \
-       linux/compat/include/linux/udp.h \
        linux/compat/include/linux/workqueue.h \
        linux/compat/include/net/checksum.h \
        linux/compat/include/net/dst.h \
diff --git a/datapath/linux/compat/include/linux/icmp.h b/datapath/linux/compat/include/linux/icmp.h
deleted file mode 100644 (file)
index 4be4d2b..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef __LINUX_ICMP_WRAPPER_H
-#define __LINUX_ICMP_WRAPPER_H 1
-
-#include_next <linux/icmp.h>
-
-#ifndef HAVE_SKBUFF_HEADER_HELPERS
-static inline struct icmphdr *icmp_hdr(const struct sk_buff *skb)
-{
-       return (struct icmphdr *)skb_transport_header(skb);
-}
-#endif
-
-#endif
diff --git a/datapath/linux/compat/include/linux/icmpv6.h b/datapath/linux/compat/include/linux/icmpv6.h
deleted file mode 100644 (file)
index 06d91b3..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef __LINUX_ICMPV6_WRAPPER_H
-#define __LINUX_ICMPV6_WRAPPER_H 1
-
-#include_next <linux/icmpv6.h>
-
-#ifndef HAVE_ICMP6_HDR
-static inline struct icmp6hdr *icmp6_hdr(const struct sk_buff *skb)
-{
-       return (struct icmp6hdr *)skb_transport_header(skb);
-}
-#endif
-
-#endif
diff --git a/datapath/linux/compat/include/linux/if_arp.h b/datapath/linux/compat/include/linux/if_arp.h
deleted file mode 100644 (file)
index e48d6ba..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-#ifndef __LINUX_IF_ARP_WRAPPER_H
-#define __LINUX_IF_ARP_WRAPPER_H 1
-
-#include_next <linux/if_arp.h>
-
-#ifndef HAVE_SKBUFF_HEADER_HELPERS
-#include <linux/skbuff.h>
-
-static inline struct arphdr *arp_hdr(const struct sk_buff *skb)
-{
-       return (struct arphdr *)skb_network_header(skb);
-}
-#endif /* !HAVE_SKBUFF_HEADER_HELPERS */
-
-#endif
diff --git a/datapath/linux/compat/include/linux/ip.h b/datapath/linux/compat/include/linux/ip.h
deleted file mode 100644 (file)
index c64306e..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifndef __LINUX_IP_WRAPPER_H
-#define __LINUX_IP_WRAPPER_H 1
-
-#include_next <linux/ip.h>
-
-#ifndef HAVE_SKBUFF_HEADER_HELPERS
-#include <linux/skbuff.h>
-
-static inline struct iphdr *ip_hdr(const struct sk_buff *skb)
-{
-       return (struct iphdr *)skb_network_header(skb);
-}
-
-static inline unsigned int ip_hdrlen(const struct sk_buff *skb)
-{
-       return ip_hdr(skb)->ihl * 4;
-}
-#endif /* !HAVE_SKBUFF_HEADER_HELPERS */
-
-#endif
index 0971c56..8a79f9c 100644 (file)
@@ -6,13 +6,6 @@
 struct frag_queue;
 struct inet_frags;
 
-#ifndef HAVE_SKBUFF_HEADER_HELPERS
-static inline struct ipv6hdr *ipv6_hdr(const struct sk_buff *skb)
-{
-       return (struct ipv6hdr *)skb_network_header(skb);
-}
-#endif
-
 #if LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0)
 void rpl_ip6_expire_frag_queue(struct net *net, struct frag_queue *fq,
                               struct inet_frags *frags);
diff --git a/datapath/linux/compat/include/linux/sctp.h b/datapath/linux/compat/include/linux/sctp.h
deleted file mode 100644 (file)
index b91c9c6..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef __LINUX_SCTP_WRAPPER_H
-#define __LINUX_SCTP_WRAPPER_H 1
-
-#include_next <linux/sctp.h>
-
-#ifndef HAVE_SKBUFF_HEADER_HELPERS
-static inline struct sctphdr *sctp_hdr(const struct sk_buff *skb)
-{
-       return (struct sctphdr *)skb_transport_header(skb);
-}
-#endif /* HAVE_SKBUFF_HEADER_HELPERS */
-
-#endif
index ab54a83..376dfda 100644 (file)
@@ -111,71 +111,6 @@ static inline struct rtable *skb_rtable(const struct sk_buff *skb)
 #define CHECKSUM_COMPLETE CHECKSUM_HW
 #endif
 
-#ifndef HAVE_SKBUFF_HEADER_HELPERS
-static inline unsigned char *skb_transport_header(const struct sk_buff *skb)
-{
-       return skb->h.raw;
-}
-
-static inline void skb_reset_transport_header(struct sk_buff *skb)
-{
-       skb->h.raw = skb->data;
-}
-
-static inline void skb_set_transport_header(struct sk_buff *skb,
-                       const int offset)
-{
-       skb->h.raw = skb->data + offset;
-}
-
-static inline unsigned char *skb_network_header(const struct sk_buff *skb)
-{
-       return skb->nh.raw;
-}
-
-static inline void skb_reset_network_header(struct sk_buff *skb)
-{
-       skb->nh.raw = skb->data;
-}
-
-static inline void skb_set_network_header(struct sk_buff *skb, const int offset)
-{
-       skb->nh.raw = skb->data + offset;
-}
-
-static inline unsigned char *skb_mac_header(const struct sk_buff *skb)
-{
-       return skb->mac.raw;
-}
-
-static inline void skb_reset_mac_header(struct sk_buff *skb)
-{
-       skb->mac_header = skb->data;
-}
-
-static inline void skb_set_mac_header(struct sk_buff *skb, const int offset)
-{
-       skb->mac.raw = skb->data + offset;
-}
-
-static inline int skb_transport_offset(const struct sk_buff *skb)
-{
-       return skb_transport_header(skb) - skb->data;
-}
-
-static inline int skb_network_offset(const struct sk_buff *skb)
-{
-       return skb_network_header(skb) - skb->data;
-}
-
-static inline void skb_copy_to_linear_data(struct sk_buff *skb,
-                                          const void *from,
-                                          const unsigned int len)
-{
-       memcpy(skb->data, from, len);
-}
-#endif /* !HAVE_SKBUFF_HEADER_HELPERS */
-
 #ifndef HAVE_SKB_WARN_LRO
 #ifndef NETIF_F_LRO
 static inline bool skb_warn_if_lro(const struct sk_buff *skb)
diff --git a/datapath/linux/compat/include/linux/tcp.h b/datapath/linux/compat/include/linux/tcp.h
deleted file mode 100644 (file)
index 9260b19..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef __LINUX_TCP_WRAPPER_H
-#define __LINUX_TCP_WRAPPER_H 1
-
-#include_next <linux/tcp.h>
-
-#ifndef HAVE_SKBUFF_HEADER_HELPERS
-static inline struct tcphdr *tcp_hdr(const struct sk_buff *skb)
-{
-       return (struct tcphdr *)skb_transport_header(skb);
-}
-
-static inline unsigned int tcp_hdrlen(const struct sk_buff *skb)
-{
-       return tcp_hdr(skb)->doff * 4;
-}
-#endif /* !HAVE_SKBUFF_HEADER_HELPERS */
-
-#endif
diff --git a/datapath/linux/compat/include/linux/udp.h b/datapath/linux/compat/include/linux/udp.h
deleted file mode 100644 (file)
index 6a805b5..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef __LINUX_UDP_WRAPPER_H
-#define __LINUX_UDP_WRAPPER_H 1
-
-#include_next <linux/udp.h>
-
-#ifndef HAVE_SKBUFF_HEADER_HELPERS
-static inline struct udphdr *udp_hdr(const struct sk_buff *skb)
-{
-       return (struct udphdr *)skb_transport_header(skb);
-}
-#endif /* HAVE_SKBUFF_HEADER_HELPERS */
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)
-static inline void udp_encap_enable(void)
-{
-}
-#endif
-#endif