diff options
author | David Howells <dhowells@redhat.com> | 2018-10-04 11:10:51 +0100 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2018-10-08 15:45:18 +0100 |
commit | 5271953cad31b97dea80f848c16e96ad66401199 (patch) | |
tree | d7ebc9c86a13557a6802fab23b7b1a25a708d6b5 /include/uapi | |
parent | 2cfa2271604bb26e75b828d38f357ed084464795 (diff) | |
download | linux-stable-5271953cad31b97dea80f848c16e96ad66401199.tar.gz linux-stable-5271953cad31b97dea80f848c16e96ad66401199.tar.bz2 linux-stable-5271953cad31b97dea80f848c16e96ad66401199.zip |
rxrpc: Use the UDP encap_rcv hook
Use the UDP encap_rcv hook to cut the bit out of the rxrpc packet reception
in which a packet is placed onto the UDP receive queue and then immediately
removed again by rxrpc. Going via the queue in this manner seems like it
should be unnecessary.
This does, however, require the invention of a value to place in encap_type
as that's one of the conditions to switch packets out to the encap_rcv
hook. Possibly the value doesn't actually matter for anything other than
sockopts on the UDP socket, which aren't accessible outside of rxrpc
anyway.
This seems to cut a bit of time out of the time elapsed between each
sk_buff being timestamped and turning up in rxrpc (the final number in the
following trace excerpts). I measured this by making the rxrpc_rx_packet
trace point print the time elapsed between the skb being timestamped and
the current time (in ns), e.g.:
... 424.278721: rxrpc_rx_packet: ... ACK 25026
So doing a 512MiB DIO read from my test server, with an unmodified kernel:
N min max sum mean stddev
27605 2626 7581 7.83992e+07 2840.04 181.029
and with the patch applied:
N min max sum mean stddev
27547 1895 12165 6.77461e+07 2459.29 255.02
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'include/uapi')
-rw-r--r-- | include/uapi/linux/udp.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/uapi/linux/udp.h b/include/uapi/linux/udp.h index 09d00f8c442b..09502de447f5 100644 --- a/include/uapi/linux/udp.h +++ b/include/uapi/linux/udp.h @@ -40,5 +40,6 @@ struct udphdr { #define UDP_ENCAP_L2TPINUDP 3 /* rfc2661 */ #define UDP_ENCAP_GTP0 4 /* GSM TS 09.60 */ #define UDP_ENCAP_GTP1U 5 /* 3GPP TS 29.060 */ +#define UDP_ENCAP_RXRPC 6 #endif /* _UAPI_LINUX_UDP_H */ |