aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorVlad Yasevich <vyasevic@redhat.com>2012-11-15 03:49:23 -0500
committerDavid S. Miller <davem@davemloft.net>2012-11-15 17:39:51 -0500
commitf191a1d17f227032c159e5499809f545402b6dc6 (patch)
tree48fc87a0b34bd2da06fedcd7e5e3ed6b08f7a3ac /include/net
parentc6b641a4c6b32f39db678c2441cb1ef824110d74 (diff)
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/net')
-rw-r--r--include/net/protocol.h10
1 files changed, 3 insertions, 7 deletions
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 @@
29#if IS_ENABLED(CONFIG_IPV6) 29#if IS_ENABLED(CONFIG_IPV6)
30#include <linux/ipv6.h> 30#include <linux/ipv6.h>
31#endif 31#endif
32#include <linux/netdevice.h>
32 33
33/* This is one larger than the largest protocol value that can be 34/* This is one larger than the largest protocol value that can be
34 * found in an ipv4 or ipv6 header. Since in both cases the protocol 35 * found in an ipv4 or ipv6 header. Since in both cases the protocol
@@ -63,13 +64,8 @@ struct inet6_protocol {
63#endif 64#endif
64 65
65struct net_offload { 66struct net_offload {
66 int (*gso_send_check)(struct sk_buff *skb); 67 struct offload_callbacks callbacks;
67 struct sk_buff *(*gso_segment)(struct sk_buff *skb, 68 unsigned int flags; /* Flags used by IPv6 for now */
68 netdev_features_t features);
69 struct sk_buff **(*gro_receive)(struct sk_buff **head,
70 struct sk_buff *skb);
71 int (*gro_complete)(struct sk_buff *skb);
72 unsigned int flags; /* Flags used by IPv6 for now */
73}; 69};
74/* This should be set for any extension header which is compatible with GSO. */ 70/* This should be set for any extension header which is compatible with GSO. */
75#define INET6_PROTO_GSO_EXTHDR 0x1 71#define INET6_PROTO_GSO_EXTHDR 0x1