Skip to content

Commit

Permalink
compat: Remove skbuff header helper backports.
Browse files Browse the repository at this point in the history
These have existed largely since v2.6.22, so it's well overdue.

Signed-off-by: Joe Stringer <[email protected]>
Acked-by: Jesse Gross <[email protected]>
  • Loading branch information
joestringer committed May 3, 2016
1 parent a0c6adf commit 54529e9
Show file tree
Hide file tree
Showing 11 changed files with 0 additions and 193 deletions.
4 changes: 0 additions & 4 deletions acinclude.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down
7 changes: 0 additions & 7 deletions datapath/linux/Modules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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 \
Expand Down
13 changes: 0 additions & 13 deletions datapath/linux/compat/include/linux/icmp.h

This file was deleted.

13 changes: 0 additions & 13 deletions datapath/linux/compat/include/linux/icmpv6.h

This file was deleted.

15 changes: 0 additions & 15 deletions datapath/linux/compat/include/linux/if_arp.h

This file was deleted.

20 changes: 0 additions & 20 deletions datapath/linux/compat/include/linux/ip.h

This file was deleted.

7 changes: 0 additions & 7 deletions datapath/linux/compat/include/linux/ipv6.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
13 changes: 0 additions & 13 deletions datapath/linux/compat/include/linux/sctp.h

This file was deleted.

65 changes: 0 additions & 65 deletions datapath/linux/compat/include/linux/skbuff.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
18 changes: 0 additions & 18 deletions datapath/linux/compat/include/linux/tcp.h

This file was deleted.

18 changes: 0 additions & 18 deletions datapath/linux/compat/include/linux/udp.h

This file was deleted.

0 comments on commit 54529e9

Please sign in to comment.