diff options
author | Tom Herbert <therbert@google.com> | 2015-01-12 20:00:37 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-01-14 15:20:04 -0500 |
commit | a2b12f3c7ac1ea43ae646db74faf0b56c2bba563 (patch) | |
tree | 4d2e38b8b963db38a3cff21ec16cf2e4e16a27ed /drivers/net/vxlan.c | |
parent | d823ab68fbb0fa504a2490bd499ac921bdf497d8 (diff) |
udp: pass udp_offload struct to UDP gro callbacks
This patch introduces udp_offload_callbacks which has the same
GRO functions (but not a GSO function) as offload_callbacks,
except there is an argument to a udp_offload struct passed to
gro_receive and gro_complete functions. This additional argument
can be used to retrieve the per port structure of the encapsulation
for use in gro processing (mostly by doing container_of on the
structure).
Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/vxlan.c')
-rw-r--r-- | drivers/net/vxlan.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index 985359dd6033..5c56a3ff25aa 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c | |||
@@ -539,7 +539,9 @@ static int vxlan_fdb_append(struct vxlan_fdb *f, | |||
539 | return 1; | 539 | return 1; |
540 | } | 540 | } |
541 | 541 | ||
542 | static struct sk_buff **vxlan_gro_receive(struct sk_buff **head, struct sk_buff *skb) | 542 | static struct sk_buff **vxlan_gro_receive(struct sk_buff **head, |
543 | struct sk_buff *skb, | ||
544 | struct udp_offload *uoff) | ||
543 | { | 545 | { |
544 | struct sk_buff *p, **pp = NULL; | 546 | struct sk_buff *p, **pp = NULL; |
545 | struct vxlanhdr *vh, *vh2; | 547 | struct vxlanhdr *vh, *vh2; |
@@ -578,7 +580,8 @@ out: | |||
578 | return pp; | 580 | return pp; |
579 | } | 581 | } |
580 | 582 | ||
581 | static int vxlan_gro_complete(struct sk_buff *skb, int nhoff) | 583 | static int vxlan_gro_complete(struct sk_buff *skb, int nhoff, |
584 | struct udp_offload *uoff) | ||
582 | { | 585 | { |
583 | udp_tunnel_gro_complete(skb, nhoff); | 586 | udp_tunnel_gro_complete(skb, nhoff); |
584 | 587 | ||