summaryrefslogtreecommitdiffstats
path: root/net/ipv4/af_inet.c
diff options
context:
space:
mode:
authorVlad Yasevich2012-11-15 09:49:11 +0100
committerDavid S. Miller2012-11-15 23:36:17 +0100
commit22061d8014455b01eb018bd6c35a1b3040ccc230 (patch)
tree179242661e78e2621c02719cea9cf6e838f9b32a /net/ipv4/af_inet.c
parentnet: Add generic packet offload infrastructure. (diff)
downloadkernel-qcow2-linux-22061d8014455b01eb018bd6c35a1b3040ccc230.tar.gz
kernel-qcow2-linux-22061d8014455b01eb018bd6c35a1b3040ccc230.tar.xz
kernel-qcow2-linux-22061d8014455b01eb018bd6c35a1b3040ccc230.zip
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/ipv4/af_inet.c')
-rw-r--r--net/ipv4/af_inet.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index 766c59658563..4c99c5fdba3f 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -1662,6 +1662,10 @@ static int ipv4_proc_init(void);
static struct packet_type ip_packet_type __read_mostly = {
.type = cpu_to_be16(ETH_P_IP),
.func = ip_rcv,
+};
+
+static struct packet_offload ip_packet_offload __read_mostly = {
+ .type = cpu_to_be16(ETH_P_IP),
.gso_send_check = inet_gso_send_check,
.gso_segment = inet_gso_segment,
.gro_receive = inet_gro_receive,
@@ -1781,6 +1785,7 @@ static int __init inet_init(void)
ipfrag_init();
+ dev_add_offload(&ip_packet_offload);
dev_add_pack(&ip_packet_type);
rc = 0;