diff options
author | Vlad Yasevich <vyasevic@redhat.com> | 2012-11-15 03:49:11 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-11-15 17:36:17 -0500 |
commit | 22061d8014455b01eb018bd6c35a1b3040ccc230 (patch) | |
tree | 179242661e78e2621c02719cea9cf6e838f9b32a /net/ipv6 | |
parent | 62532da9d5f47a7ced3b965aa73ffd5b1afbeb79 (diff) |
net: Switch to using the new packet offload infrustructure
Convert to using the new GSO/GRO registration mechanism and new
packet offload structure.
Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/af_inet6.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index a974247a9ae4..6e245177608c 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c | |||
@@ -938,6 +938,10 @@ out_unlock: | |||
938 | static struct packet_type ipv6_packet_type __read_mostly = { | 938 | static struct packet_type ipv6_packet_type __read_mostly = { |
939 | .type = cpu_to_be16(ETH_P_IPV6), | 939 | .type = cpu_to_be16(ETH_P_IPV6), |
940 | .func = ipv6_rcv, | 940 | .func = ipv6_rcv, |
941 | }; | ||
942 | |||
943 | static struct packet_offload ipv6_packet_offload __read_mostly = { | ||
944 | .type = cpu_to_be16(ETH_P_IPV6), | ||
941 | .gso_send_check = ipv6_gso_send_check, | 945 | .gso_send_check = ipv6_gso_send_check, |
942 | .gso_segment = ipv6_gso_segment, | 946 | .gso_segment = ipv6_gso_segment, |
943 | .gro_receive = ipv6_gro_receive, | 947 | .gro_receive = ipv6_gro_receive, |
@@ -946,6 +950,7 @@ static struct packet_type ipv6_packet_type __read_mostly = { | |||
946 | 950 | ||
947 | static int __init ipv6_packet_init(void) | 951 | static int __init ipv6_packet_init(void) |
948 | { | 952 | { |
953 | dev_add_offload(&ipv6_packet_offload); | ||
949 | dev_add_pack(&ipv6_packet_type); | 954 | dev_add_pack(&ipv6_packet_type); |
950 | return 0; | 955 | return 0; |
951 | } | 956 | } |
@@ -953,6 +958,7 @@ static int __init ipv6_packet_init(void) | |||
953 | static void ipv6_packet_cleanup(void) | 958 | static void ipv6_packet_cleanup(void) |
954 | { | 959 | { |
955 | dev_remove_pack(&ipv6_packet_type); | 960 | dev_remove_pack(&ipv6_packet_type); |
961 | dev_remove_offload(&ipv6_packet_offload); | ||
956 | } | 962 | } |
957 | 963 | ||
958 | static int __net_init ipv6_init_mibs(struct net *net) | 964 | static int __net_init ipv6_init_mibs(struct net *net) |