diff options
author | Tom Herbert <therbert@google.com> | 2014-09-17 15:25:57 -0400 |
---|---|---|
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) |
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 adab393b2fe5..d7c43f764c71 100644 --- a/net/ipv4/udp_offload.c +++ b/net/ipv4/udp_offload.c | |||
@@ -276,6 +276,7 @@ unflush: | |||
276 | 276 | ||
277 | skb_gro_pull(skb, sizeof(struct udphdr)); /* pull encapsulating udp header */ | 277 | skb_gro_pull(skb, sizeof(struct udphdr)); /* pull encapsulating udp header */ |
278 | skb_gro_postpull_rcsum(skb, uh, sizeof(struct udphdr)); | 278 | skb_gro_postpull_rcsum(skb, uh, sizeof(struct udphdr)); |
279 | NAPI_GRO_CB(skb)->proto = uo_priv->offload->ipproto; | ||
279 | pp = uo_priv->offload->callbacks.gro_receive(head, skb); | 280 | pp = uo_priv->offload->callbacks.gro_receive(head, skb); |
280 | 281 | ||
281 | out_unlock: | 282 | out_unlock: |
@@ -329,8 +330,10 @@ int udp_gro_complete(struct sk_buff *skb, int nhoff) | |||
329 | break; | 330 | break; |
330 | } | 331 | } |
331 | 332 | ||
332 | if (uo_priv != NULL) | 333 | if (uo_priv != NULL) { |
334 | NAPI_GRO_CB(skb)->proto = uo_priv->offload->ipproto; | ||
333 | err = uo_priv->offload->callbacks.gro_complete(skb, nhoff + sizeof(struct udphdr)); | 335 | err = uo_priv->offload->callbacks.gro_complete(skb, nhoff + sizeof(struct udphdr)); |
336 | } | ||
334 | 337 | ||
335 | rcu_read_unlock(); | 338 | rcu_read_unlock(); |
336 | return err; | 339 | return err; |