diff options
author | Vlad Yasevich <vyasevic@redhat.com> | 2012-11-15 12:49:23 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-11-16 02:39:51 +0400 |
commit | f191a1d17f227032c159e5499809f545402b6dc6 (patch) | |
tree | 48fc87a0b34bd2da06fedcd7e5e3ed6b08f7a3ac /include | |
parent | c6b641a4c6b32f39db678c2441cb1ef824110d74 (diff) | |
download | linux-f191a1d17f227032c159e5499809f545402b6dc6.tar.xz |
net: Remove code duplication between offload structures
Move the offload callbacks into its own structure.
Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/netdevice.h | 10 | ||||
-rw-r--r-- | include/net/protocol.h | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 61bc8483031f..e46c830c88d8 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -1515,15 +1515,19 @@ struct packet_type { struct list_head list; }; -struct packet_offload { - __be16 type; /* This is really htons(ether_type). */ +struct offload_callbacks { struct sk_buff *(*gso_segment)(struct sk_buff *skb, netdev_features_t features); int (*gso_send_check)(struct sk_buff *skb); struct sk_buff **(*gro_receive)(struct sk_buff **head, struct sk_buff *skb); int (*gro_complete)(struct sk_buff *skb); - struct list_head list; +}; + +struct packet_offload { + __be16 type; /* This is really htons(ether_type). */ + struct offload_callbacks callbacks; + struct list_head list; }; #include <linux/notifier.h> diff --git a/include/net/protocol.h b/include/net/protocol.h index 2c90794c139d..047c0476c0a0 100644 --- a/include/net/protocol.h +++ b/include/net/protocol.h @@ -29,6 +29,7 @@ #if IS_ENABLED(CONFIG_IPV6) #include <linux/ipv6.h> #endif +#include <linux/netdevice.h> /* This is one larger than the largest protocol value that can be * found in an ipv4 or ipv6 header. Since in both cases the protocol @@ -63,13 +64,8 @@ struct inet6_protocol { #endif struct net_offload { - int (*gso_send_check)(struct sk_buff *skb); - struct sk_buff *(*gso_segment)(struct sk_buff *skb, - netdev_features_t features); - struct sk_buff **(*gro_receive)(struct sk_buff **head, - struct sk_buff *skb); - int (*gro_complete)(struct sk_buff *skb); - unsigned int flags; /* Flags used by IPv6 for now */ + struct offload_callbacks callbacks; + unsigned int flags; /* Flags used by IPv6 for now */ }; /* This should be set for any extension header which is compatible with GSO. */ #define INET6_PROTO_GSO_EXTHDR 0x1 |