]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
udp6: fix jumbogram reception
authorPaolo Abeni <pabeni@redhat.com>
Mon, 31 Jul 2017 14:52:36 +0000 (16:52 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 1 Aug 2017 05:01:21 +0000 (22:01 -0700)
commitcb891fa6a1d5f52c5f5c07b6f7f4c6d65ea55fc0
treebd5ac01acb50fe8873102d5d3084ee2cc1c73548
parentddab82821fa633da768879fc515e76dcb1207151
udp6: fix jumbogram reception

Since commit 67a51780aebb ("ipv6: udp: leverage scratch area
helpers") udp6_recvmsg() read the skb len from the scratch area,
to avoid a cache miss.
But the UDP6 rx path support RFC 2675 UDPv6 jumbograms, and their
length exceeds the 16 bits available in the scratch area. As a side
effect the length returned by recvmsg() is:
<ingress datagram len> % (1<<16)

This commit addresses the issue allocating one more bit in the
IP6CB flags field and setting it for incoming jumbograms.
Such field is still in the first cacheline, so at recvmsg()
time we can check it and fallback to access skb->len if
required, without a measurable overhead.

Fixes: 67a51780aebb ("ipv6: udp: leverage scratch area helpers")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/ipv6.h
net/ipv6/exthdrs.c
net/ipv6/udp.c