diff options
author | Paolo Abeni <pabeni@redhat.com> | 2018-11-07 12:38:30 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-11-08 01:23:04 +0100 |
commit | bcd1665e3569b0a6f569514f023a41fc7df0b4a3 (patch) | |
tree | 4e28d9a2711bdfa1069efdfb49350ede0e1d97f7 /net/ipv4/udp.c | |
parent | udp: implement GRO for plain UDP sockets. (diff) | |
download | linux-bcd1665e3569b0a6f569514f023a41fc7df0b4a3.tar.xz linux-bcd1665e3569b0a6f569514f023a41fc7df0b4a3.zip |
udp: add support for UDP_GRO cmsg
When UDP GRO is enabled, the UDP_GRO cmsg will carry the ingress
datagram size. User-space can use such info to compute the original
packets layout.
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/udp.c')
-rw-r--r-- | net/ipv4/udp.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 9fc08b098ced..dddc6fe90f51 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -1711,6 +1711,10 @@ try_again: memset(sin->sin_zero, 0, sizeof(sin->sin_zero)); *addr_len = sizeof(*sin); } + + if (udp_sk(sk)->gro_enabled) + udp_cmsg_recv(msg, sk, skb); + if (inet->cmsg_flags) ip_cmsg_recv_offset(msg, sk, skb, sizeof(struct udphdr), off); |