diff options
author | Santosh Shilimkar <santosh.shilimkar@oracle.com> | 2016-07-05 01:35:15 -0400 |
---|---|---|
committer | Santosh Shilimkar <santosh.shilimkar@oracle.com> | 2017-01-02 17:02:59 -0500 |
commit | 3289025aedc018f8fd9d0e37fb9efa0c6d531ffa (patch) | |
tree | 251ddb4c6606d91809d98d40a22e18382025664e /net/rds/tcp_recv.c | |
parent | f9fb69adb6c7acca60977a4db5a5f95b8e66c041 (diff) |
RDS: add receive message trace used by application
Socket option to tap receive path latency in various stages
in nano seconds. It can be enabled on selective sockets using
using SO_RDS_MSG_RXPATH_LATENCY socket option. RDS will return
the data to application with RDS_CMSG_RXPATH_LATENCY in defined
format. Scope is left to add more trace points for future
without need of change in the interface.
Reviewed-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Diffstat (limited to 'net/rds/tcp_recv.c')
-rw-r--r-- | net/rds/tcp_recv.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/rds/tcp_recv.c b/net/rds/tcp_recv.c index ad4892e97f91..e006ef8e6d40 100644 --- a/net/rds/tcp_recv.c +++ b/net/rds/tcp_recv.c | |||
@@ -180,6 +180,9 @@ static int rds_tcp_data_recv(read_descriptor_t *desc, struct sk_buff *skb, | |||
180 | rdsdebug("alloced tinc %p\n", tinc); | 180 | rdsdebug("alloced tinc %p\n", tinc); |
181 | rds_inc_path_init(&tinc->ti_inc, cp, | 181 | rds_inc_path_init(&tinc->ti_inc, cp, |
182 | cp->cp_conn->c_faddr); | 182 | cp->cp_conn->c_faddr); |
183 | tinc->ti_inc.i_rx_lat_trace[RDS_MSG_RX_HDR] = | ||
184 | local_clock(); | ||
185 | |||
183 | /* | 186 | /* |
184 | * XXX * we might be able to use the __ variants when | 187 | * XXX * we might be able to use the __ variants when |
185 | * we've already serialized at a higher level. | 188 | * we've already serialized at a higher level. |
@@ -204,6 +207,8 @@ static int rds_tcp_data_recv(read_descriptor_t *desc, struct sk_buff *skb, | |||
204 | /* could be 0 for a 0 len message */ | 207 | /* could be 0 for a 0 len message */ |
205 | tc->t_tinc_data_rem = | 208 | tc->t_tinc_data_rem = |
206 | be32_to_cpu(tinc->ti_inc.i_hdr.h_len); | 209 | be32_to_cpu(tinc->ti_inc.i_hdr.h_len); |
210 | tinc->ti_inc.i_rx_lat_trace[RDS_MSG_RX_START] = | ||
211 | local_clock(); | ||
207 | } | 212 | } |
208 | } | 213 | } |
209 | 214 | ||