udp: Add GRO functions to UDP socket
This patch adds GRO functions (gro_receive and gro_complete) to UDP sockets. udp_gro_receive is changed to perform socket lookup on a packet. If a socket is found the related GRO functions are called. This features obsoletes using UDP offload infrastructure for GRO (udp_offload). This has the advantage of not being limited to provide offload on a per port basis, GRO is now applied to whatever individual UDP sockets are bound to. This also allows the possbility of "application defined GRO"-- that is we can attach something like a BPF program to a UDP socket to perfrom GRO on an application layer protocol. Signed-off-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
63058308cd
commit
a6024562ff
@@ -64,6 +64,8 @@
|
||||
#include <asm/uaccess.h>
|
||||
#include <linux/mroute6.h>
|
||||
|
||||
#include "ip6_offload.h"
|
||||
|
||||
MODULE_AUTHOR("Cast of dozens");
|
||||
MODULE_DESCRIPTION("IPv6 protocol stack for Linux");
|
||||
MODULE_LICENSE("GPL");
|
||||
@@ -959,6 +961,10 @@ static int __init inet6_init(void)
|
||||
if (err)
|
||||
goto udplitev6_fail;
|
||||
|
||||
err = udpv6_offload_init();
|
||||
if (err)
|
||||
goto udpv6_offload_fail;
|
||||
|
||||
err = tcpv6_init();
|
||||
if (err)
|
||||
goto tcpv6_fail;
|
||||
@@ -988,6 +994,8 @@ pingv6_fail:
|
||||
ipv6_packet_fail:
|
||||
tcpv6_exit();
|
||||
tcpv6_fail:
|
||||
udpv6_offload_exit();
|
||||
udpv6_offload_fail:
|
||||
udplitev6_exit();
|
||||
udplitev6_fail:
|
||||
udpv6_exit();
|
||||
|
Reference in New Issue
Block a user