diff options
| author | 2021-06-04 14:08:09 -0700 | |
|---|---|---|
| committer | 2021-06-04 14:08:09 -0700 | |
| commit | d15fd7359ab18a46c5fefc36be45b36205f1acfc (patch) | |
| tree | 3b036b03ebf2f591b3bf8ec5926ef498c780d157 /include | |
| parent | netdevsim: Fix unsigned being compared to less than zero (diff) | |
| parent | selftests: mptcp_connect: add SO_TIMESTAMPNS cmsg support (diff) | |
Merge branch 'mptcp-timestamps'
Mat Martineau says:
====================
mptcp: Add timestamp support
Enable the SO_TIMESTAMP and SO_TIMESTAMPING socket options for MPTCP
sockets and add receive path cmsg support for timestamps.
Patches 1, 2, and 5 expose existing sock and tcp helpers for timestamps
(no new EXPORT_SYMBOLS()s).
Patch 3 propagates timestamp options to subflows.
Patch 4 cleans up MPTCP handling of SOL_SOCKET options.
Patch 6 adds timestamp csmg data when receiving on sockets that have
been configured for timestamps.
Patch 7 adds self test coverage for timestamps.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/sock.h | 3 | ||||
| -rw-r--r-- | include/net/tcp.h | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index 0e962d8bc73b..9b341c2c924f 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -2743,6 +2743,9 @@ static inline bool sk_dev_equal_l3scope(struct sock *sk, int dif) void sock_def_readable(struct sock *sk); int sock_bindtoindex(struct sock *sk, int ifindex, bool lock_sk); +void sock_set_timestamp(struct sock *sk, int optname, bool valbool); +int sock_set_timestamping(struct sock *sk, int optname, int val); + void sock_enable_timestamps(struct sock *sk); void sock_no_linger(struct sock *sk); void sock_set_keepalive(struct sock *sk); diff --git a/include/net/tcp.h b/include/net/tcp.h index d05193cb0d99..e668f1bf780d 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -412,6 +412,10 @@ int tcp_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, int nonblock, int flags, int *addr_len); int tcp_set_rcvlowat(struct sock *sk, int val); int tcp_set_window_clamp(struct sock *sk, int val); +void tcp_update_recv_tstamps(struct sk_buff *skb, + struct scm_timestamping_internal *tss); +void tcp_recv_timestamp(struct msghdr *msg, const struct sock *sk, + struct scm_timestamping_internal *tss); void tcp_data_ready(struct sock *sk); #ifdef CONFIG_MMU int tcp_mmap(struct file *file, struct socket *sock, |
