aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/udp_tunnel.h7
-rw-r--r--net/ipv4/udp_tunnel.c2
2 files changed, 9 insertions, 0 deletions
diff --git a/include/net/udp_tunnel.h b/include/net/udp_tunnel.h
index b83114077cee..2dcf1de948ac 100644
--- a/include/net/udp_tunnel.h
+++ b/include/net/udp_tunnel.h
@@ -64,6 +64,11 @@ static inline int udp_sock_create(struct net *net,
64 64
65typedef int (*udp_tunnel_encap_rcv_t)(struct sock *sk, struct sk_buff *skb); 65typedef int (*udp_tunnel_encap_rcv_t)(struct sock *sk, struct sk_buff *skb);
66typedef void (*udp_tunnel_encap_destroy_t)(struct sock *sk); 66typedef void (*udp_tunnel_encap_destroy_t)(struct sock *sk);
67typedef struct sk_buff **(*udp_tunnel_gro_receive_t)(struct sock *sk,
68 struct sk_buff **head,
69 struct sk_buff *skb);
70typedef int (*udp_tunnel_gro_complete_t)(struct sock *sk, struct sk_buff *skb,
71 int nhoff);
67 72
68struct udp_tunnel_sock_cfg { 73struct udp_tunnel_sock_cfg {
69 void *sk_user_data; /* user data used by encap_rcv call back */ 74 void *sk_user_data; /* user data used by encap_rcv call back */
@@ -71,6 +76,8 @@ struct udp_tunnel_sock_cfg {
71 __u8 encap_type; 76 __u8 encap_type;
72 udp_tunnel_encap_rcv_t encap_rcv; 77 udp_tunnel_encap_rcv_t encap_rcv;
73 udp_tunnel_encap_destroy_t encap_destroy; 78 udp_tunnel_encap_destroy_t encap_destroy;
79 udp_tunnel_gro_receive_t gro_receive;
80 udp_tunnel_gro_complete_t gro_complete;
74}; 81};
75 82
76/* Setup the given (UDP) sock to receive UDP encapsulated packets */ 83/* Setup the given (UDP) sock to receive UDP encapsulated packets */
diff --git a/net/ipv4/udp_tunnel.c b/net/ipv4/udp_tunnel.c
index 96599d1a1318..47f12c73d959 100644
--- a/net/ipv4/udp_tunnel.c
+++ b/net/ipv4/udp_tunnel.c
@@ -69,6 +69,8 @@ void setup_udp_tunnel_sock(struct net *net, struct socket *sock,
69 udp_sk(sk)->encap_type = cfg->encap_type; 69 udp_sk(sk)->encap_type = cfg->encap_type;
70 udp_sk(sk)->encap_rcv = cfg->encap_rcv; 70 udp_sk(sk)->encap_rcv = cfg->encap_rcv;
71 udp_sk(sk)->encap_destroy = cfg->encap_destroy; 71 udp_sk(sk)->encap_destroy = cfg->encap_destroy;
72 udp_sk(sk)->gro_receive = cfg->gro_receive;
73 udp_sk(sk)->gro_complete = cfg->gro_complete;
72 74
73 udp_tunnel_encap_enable(sock); 75 udp_tunnel_encap_enable(sock);
74} 76}