mptcp: add tracepoint in mptcp_sendmsg_frag
authorGeliang Tang <geliang.tang@suse.com>
Mon, 7 Mar 2022 20:44:31 +0000 (12:44 -0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 9 Mar 2022 06:06:10 +0000 (22:06 -0800)
The tracepoint in get_mapping_status() only dumped the incoming mpext
fields. This patch added a new tracepoint in mptcp_sendmsg_frag() to dump
the outgoing mpext too.

Signed-off-by: Geliang Tang <geliang.tang@suse.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/trace/events/mptcp.h
net/mptcp/protocol.c

index 6bf43176f14c14654fd1d656b5805a47f40251da..f8e28e686c65f96ecda2a0a349231b9f773a5ca9 100644 (file)
@@ -115,6 +115,10 @@ DECLARE_EVENT_CLASS(mptcp_dump_mpext,
                  __entry->csum_reqd)
 );
 
+DEFINE_EVENT(mptcp_dump_mpext, mptcp_sendmsg_frag,
+       TP_PROTO(struct mptcp_ext *mpext),
+       TP_ARGS(mpext));
+
 DEFINE_EVENT(mptcp_dump_mpext, get_mapping_status,
        TP_PROTO(struct mptcp_ext *mpext),
        TP_ARGS(mpext));
index 1c72f25f083ead66007ad0c13af5fe972881b44e..36a7d33f670a00e4d5346bd97228573fa2863068 100644 (file)
@@ -1356,6 +1356,7 @@ alloc_skb:
 out:
        if (READ_ONCE(msk->csum_enabled))
                mptcp_update_data_checksum(skb, copy);
+       trace_mptcp_sendmsg_frag(mpext);
        mptcp_subflow_ctx(ssk)->rel_write_seq += copy;
        return copy;
 }