提交 0918e34b 编写于 作者: G Geliang Tang 提交者: David S. Miller

mptcp: add tracepoint in get_mapping_status

This patch added a tracepoint in the mapping status function
get_mapping_status() to dump every mpext field.
Suggested-by: NPaolo Abeni <pabeni@redhat.com>
Acked-by: NPaolo Abeni <pabeni@redhat.com>
Signed-off-by: NGeliang Tang <geliangtang@gmail.com>
Signed-off-by: NMat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 e10a9892
......@@ -54,6 +54,58 @@ TRACE_EVENT(mptcp_subflow_get_send,
__entry->backup, __entry->ratio)
);
DECLARE_EVENT_CLASS(mptcp_dump_mpext,
TP_PROTO(struct mptcp_ext *mpext),
TP_ARGS(mpext),
TP_STRUCT__entry(
__field(u64, data_ack)
__field(u64, data_seq)
__field(u32, subflow_seq)
__field(u16, data_len)
__field(u8, use_map)
__field(u8, dsn64)
__field(u8, data_fin)
__field(u8, use_ack)
__field(u8, ack64)
__field(u8, mpc_map)
__field(u8, frozen)
__field(u8, reset_transient)
__field(u8, reset_reason)
),
TP_fast_assign(
__entry->data_ack = mpext->ack64 ? mpext->data_ack : mpext->data_ack32;
__entry->data_seq = mpext->data_seq;
__entry->subflow_seq = mpext->subflow_seq;
__entry->data_len = mpext->data_len;
__entry->use_map = mpext->use_map;
__entry->dsn64 = mpext->dsn64;
__entry->data_fin = mpext->data_fin;
__entry->use_ack = mpext->use_ack;
__entry->ack64 = mpext->ack64;
__entry->mpc_map = mpext->mpc_map;
__entry->frozen = mpext->frozen;
__entry->reset_transient = mpext->reset_transient;
__entry->reset_reason = mpext->reset_reason;
),
TP_printk("data_ack=%llu data_seq=%llu subflow_seq=%u data_len=%u use_map=%u dsn64=%u data_fin=%u use_ack=%u ack64=%u mpc_map=%u frozen=%u reset_transient=%u reset_reason=%u",
__entry->data_ack, __entry->data_seq,
__entry->subflow_seq, __entry->data_len,
__entry->use_map, __entry->dsn64,
__entry->data_fin, __entry->use_ack,
__entry->ack64, __entry->mpc_map,
__entry->frozen, __entry->reset_transient,
__entry->reset_reason)
);
DEFINE_EVENT(mptcp_dump_mpext, get_mapping_status,
TP_PROTO(struct mptcp_ext *mpext),
TP_ARGS(mpext));
#endif /* _TRACE_MPTCP_H */
/* This part must be outside protection */
......
......@@ -25,6 +25,8 @@
#include "protocol.h"
#include "mib.h"
#include <trace/events/mptcp.h>
static void mptcp_subflow_ops_undo_override(struct sock *ssk);
static void SUBFLOW_REQ_INC_STATS(struct request_sock *req,
......@@ -862,9 +864,7 @@ static enum mapping_status get_mapping_status(struct sock *ssk,
goto validate_seq;
}
pr_debug("seq=%llu is64=%d ssn=%u data_len=%u data_fin=%d",
mpext->data_seq, mpext->dsn64, mpext->subflow_seq,
mpext->data_len, mpext->data_fin);
trace_get_mapping_status(mpext);
data_len = mpext->data_len;
if (data_len == 0) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册