• Kevin Kou's avatar
    sctp: add enabled check for path tracepoint loop. · f398efc1
    Kevin Kou authored
    sctp_outq_sack is the main function handles SACK, it is called very
    frequently. As the commit "move trace_sctp_probe_path into sctp_outq_sack"
    added below code to this function, sctp tracepoint is disabled most of time,
    but the loop of transport list will be always called even though the
    tracepoint is disabled, this is unnecessary.
    
    +	/* SCTP path tracepoint for congestion control debugging. */
    +	list_for_each_entry(transport, transport_list, transports) {
    +		trace_sctp_probe_path(transport, asoc);
    +	}
    
    This patch is to add tracepoint enabled check at outside of the loop of
    transport list, and avoid traversing the loop when trace is disabled,
    it is a small optimization.
    Signed-off-by: default avatarKevin Kou <qdkevin.kou@gmail.com>
    Acked-by: default avatarMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    f398efc1
outqueue.c 55 KB