aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/af_inet.c
diff options
context:
space:
mode:
authorDaniel Borkmann <dborkman@redhat.com>2013-06-08 06:56:03 -0400
committerDavid S. Miller <davem@davemloft.net>2013-06-12 03:47:25 -0400
commitda5bab079f9b7d90ba234965a14914ace55e45e9 (patch)
tree868de978a44f6a59ccc7a2f4f9c096707c5bf044 /net/ipv4/af_inet.c
parent946d3bd7231be3b6202759ea0bea59989ae28c4a (diff)
net: udp4: move GSO functions to udp_offload
Similarly to TCP offloading and UDPv6 offloading, move all related UDPv4 functions to udp_offload.c to make things more explicit. Also, by this, we can make those functions static. Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/af_inet.c')
-rw-r--r--net/ipv4/af_inet.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index 7b514290efc6..5598b06d62db 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -1566,13 +1566,6 @@ static const struct net_protocol udp_protocol = {
1566 .netns_ok = 1, 1566 .netns_ok = 1,
1567}; 1567};
1568 1568
1569static const struct net_offload udp_offload = {
1570 .callbacks = {
1571 .gso_send_check = udp4_ufo_send_check,
1572 .gso_segment = udp4_ufo_fragment,
1573 },
1574};
1575
1576static const struct net_protocol icmp_protocol = { 1569static const struct net_protocol icmp_protocol = {
1577 .handler = icmp_rcv, 1570 .handler = icmp_rcv,
1578 .err_handler = icmp_err, 1571 .err_handler = icmp_err,
@@ -1672,7 +1665,7 @@ static int __init ipv4_offload_init(void)
1672 /* 1665 /*
1673 * Add offloads 1666 * Add offloads
1674 */ 1667 */
1675 if (inet_add_offload(&udp_offload, IPPROTO_UDP) < 0) 1668 if (udpv4_offload_init() < 0)
1676 pr_crit("%s: Cannot add UDP protocol offload\n", __func__); 1669 pr_crit("%s: Cannot add UDP protocol offload\n", __func__);
1677 if (tcpv4_offload_init() < 0) 1670 if (tcpv4_offload_init() < 0)
1678 pr_crit("%s: Cannot add TCP protocol offload\n", __func__); 1671 pr_crit("%s: Cannot add TCP protocol offload\n", __func__);