xprtrdma: Modernize ops->connect
Adapt and apply changes that were made to the TCP socket connect code. See the following commits for details on the purpose of these changes: Commit7196dbb02e
("SUNRPC: Allow changing of the TCP timeout parameters on the fly") Commit3851f1cdb2
("SUNRPC: Limit the reconnect backoff timer to the max RPC message timeout") Commit02910177ae
("SUNRPC: Fix reconnection timeouts") Some common transport code is moved to xprt.c to satisfy the code duplication police. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:

committed by
Anna Schumaker

parent
5828cebad1
commit
675dd90ad0
@@ -375,6 +375,37 @@ DEFINE_RXPRT_EVENT(xprtrdma_op_inject_dsc);
|
||||
DEFINE_RXPRT_EVENT(xprtrdma_op_close);
|
||||
DEFINE_RXPRT_EVENT(xprtrdma_op_connect);
|
||||
|
||||
TRACE_EVENT(xprtrdma_op_set_cto,
|
||||
TP_PROTO(
|
||||
const struct rpcrdma_xprt *r_xprt,
|
||||
unsigned long connect,
|
||||
unsigned long reconnect
|
||||
),
|
||||
|
||||
TP_ARGS(r_xprt, connect, reconnect),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field(const void *, r_xprt)
|
||||
__field(unsigned long, connect)
|
||||
__field(unsigned long, reconnect)
|
||||
__string(addr, rpcrdma_addrstr(r_xprt))
|
||||
__string(port, rpcrdma_portstr(r_xprt))
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->r_xprt = r_xprt;
|
||||
__entry->connect = connect;
|
||||
__entry->reconnect = reconnect;
|
||||
__assign_str(addr, rpcrdma_addrstr(r_xprt));
|
||||
__assign_str(port, rpcrdma_portstr(r_xprt));
|
||||
),
|
||||
|
||||
TP_printk("peer=[%s]:%s r_xprt=%p: connect=%lu reconnect=%lu",
|
||||
__get_str(addr), __get_str(port), __entry->r_xprt,
|
||||
__entry->connect / HZ, __entry->reconnect / HZ
|
||||
)
|
||||
);
|
||||
|
||||
TRACE_EVENT(xprtrdma_qp_event,
|
||||
TP_PROTO(
|
||||
const struct rpcrdma_xprt *r_xprt,
|
||||
|
Reference in New Issue
Block a user