aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/udp.c
diff options
context:
space:
mode:
authorVlad Yasevich <vyasevic@redhat.com>2012-11-15 03:49:15 -0500
committerDavid S. Miller <davem@davemloft.net>2012-11-15 17:36:17 -0500
commit3336288a9feaa809839adbaf05778dc2f16665dc (patch)
treef536f807902ea4268cc211054a1b234776f5f858 /net/ipv6/udp.c
parentbca49f843eac59cbb1ddd1f4a5d65fcc23b62efd (diff)
ipv6: Switch to using new offload infrastructure.
Switch IPv6 protocol to using the new GRO/GSO calls and data. Signed-off-by: Vlad Yasevich <vyasevic@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/udp.c')
-rw-r--r--net/ipv6/udp.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index 3ad44e176503..e4cc1f41012d 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -1438,8 +1438,6 @@ out:
1438static const struct inet6_protocol udpv6_protocol = { 1438static const struct inet6_protocol udpv6_protocol = {
1439 .handler = udpv6_rcv, 1439 .handler = udpv6_rcv,
1440 .err_handler = udpv6_err, 1440 .err_handler = udpv6_err,
1441 .gso_send_check = udp6_ufo_send_check,
1442 .gso_segment = udp6_ufo_fragment,
1443 .flags = INET6_PROTO_NOPOLICY|INET6_PROTO_FINAL, 1441 .flags = INET6_PROTO_NOPOLICY|INET6_PROTO_FINAL,
1444}; 1442};
1445 1443
@@ -1570,10 +1568,14 @@ int __init udpv6_init(void)
1570{ 1568{
1571 int ret; 1569 int ret;
1572 1570
1573 ret = inet6_add_protocol(&udpv6_protocol, IPPROTO_UDP); 1571 ret = inet6_add_offload(&udpv6_offload, IPPROTO_UDP);
1574 if (ret) 1572 if (ret)
1575 goto out; 1573 goto out;
1576 1574
1575 ret = inet6_add_protocol(&udpv6_protocol, IPPROTO_UDP);
1576 if (ret)
1577 goto out_offload;
1578
1577 ret = inet6_register_protosw(&udpv6_protosw); 1579 ret = inet6_register_protosw(&udpv6_protosw);
1578 if (ret) 1580 if (ret)
1579 goto out_udpv6_protocol; 1581 goto out_udpv6_protocol;
@@ -1582,6 +1584,8 @@ out:
1582 1584
1583out_udpv6_protocol: 1585out_udpv6_protocol:
1584 inet6_del_protocol(&udpv6_protocol, IPPROTO_UDP); 1586 inet6_del_protocol(&udpv6_protocol, IPPROTO_UDP);
1587out_offload:
1588 inet6_del_offload(&udpv6_offload, IPPROTO_UDP);
1585 goto out; 1589 goto out;
1586} 1590}
1587 1591
@@ -1589,4 +1593,5 @@ void udpv6_exit(void)
1589{ 1593{
1590 inet6_unregister_protosw(&udpv6_protosw); 1594 inet6_unregister_protosw(&udpv6_protosw);
1591 inet6_del_protocol(&udpv6_protocol, IPPROTO_UDP); 1595 inet6_del_protocol(&udpv6_protocol, IPPROTO_UDP);
1596 inet6_del_offload(&udpv6_offload, IPPROTO_UDP);
1592} 1597}