diff options
author | Tom Herbert <therbert@google.com> | 2014-09-17 12:25:57 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-09-19 17:15:31 -0400 |
commit | afe93325bc02a5b2dea0cd7d78225de692265e6e (patch) | |
tree | 685a28ca9b3d961e64bb2a08d6ced2d92e33329a /net/ipv4/udp_offload.c | |
parent | 23461551c00628c3f3fe9cf837bf53cf8f212b63 (diff) | |
download | op-kernel-dev-afe93325bc02a5b2dea0cd7d78225de692265e6e.zip op-kernel-dev-afe93325bc02a5b2dea0cd7d78225de692265e6e.tar.gz |
fou: Add GRO support
Implement fou_gro_receive and fou_gro_complete, and populate these
in the correponsing udp_offloads for the socket. Added ipproto to
udp_offloads and pass this from UDP to the fou GRO routine in proto
field of napi_gro_cb structure.
Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/udp_offload.c')
-rw-r--r-- | net/ipv4/udp_offload.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ipv4/udp_offload.c b/net/ipv4/udp_offload.c index adab393..d7c43f7 100644 --- a/net/ipv4/udp_offload.c +++ b/net/ipv4/udp_offload.c @@ -276,6 +276,7 @@ unflush: skb_gro_pull(skb, sizeof(struct udphdr)); /* pull encapsulating udp header */ skb_gro_postpull_rcsum(skb, uh, sizeof(struct udphdr)); + NAPI_GRO_CB(skb)->proto = uo_priv->offload->ipproto; pp = uo_priv->offload->callbacks.gro_receive(head, skb); out_unlock: @@ -329,8 +330,10 @@ int udp_gro_complete(struct sk_buff *skb, int nhoff) break; } - if (uo_priv != NULL) + if (uo_priv != NULL) { + NAPI_GRO_CB(skb)->proto = uo_priv->offload->ipproto; err = uo_priv->offload->callbacks.gro_complete(skb, nhoff + sizeof(struct udphdr)); + } rcu_read_unlock(); return err; |