All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Geliang Tang <geliangtang@gmail.com>
To: Paolo Abeni <pabeni@redhat.com>,
	Matthieu Baerts <matthieu.baerts@tessares.net>
Cc: mptcp@lists.linux.dev
Subject: Re: [MPTCP][PATCH v3 mptcp-next] Squash to "mptcp: add tracepoint in mptcp_subflow_get_send"
Date: Fri, 2 Apr 2021 11:35:49 +0800	[thread overview]
Message-ID: <CA+WQbwug7fgP_sZurx2Bf8XfC1k+hDPLWf4rZ8wFpUFcB1xUYg@mail.gmail.com> (raw)
In-Reply-To: <323c294f0f6161da5dad17306775172add7d0dc5.camel@redhat.com>

Note: v2 wasn't shown in ML since I forgot to cc mptcp@lists.linux.dev in
it. Sorry about that.

-Geliang

Paolo Abeni <pabeni@redhat.com> 于2021年4月2日周五 上午1:14写道:
>
> On Fri, 2021-04-02 at 00:54 +0800, Geliang Tang wrote:
> > Reduce the indentation level and zero the uninitialized fields.
> >
> > Suggested-by: Paolo Abeni <pabeni@redhat.com>
> > Signed-off-by: Geliang Tang <geliangtang@gmail.com>
> > ---
> >  include/trace/events/mptcp.h | 27 +++++++++++++++++----------
> >  1 file changed, 17 insertions(+), 10 deletions(-)
> >
> > diff --git a/include/trace/events/mptcp.h b/include/trace/events/mptcp.h
> > index f1c836573744..b1617a0162da 100644
> > --- a/include/trace/events/mptcp.h
> > +++ b/include/trace/events/mptcp.h
> > @@ -23,22 +23,29 @@ TRACE_EVENT(mptcp_subflow_get_send,
> >       ),
> >
> >       TP_fast_assign(
> > -             bool sk = sk_fullsock(subflow->tcp_sock);
> > +             struct sock *ssk;
> >
> >               __entry->active = mptcp_subflow_active(subflow);
> >               __entry->backup = subflow->backup;
> > -             if (sk) {
> > -                     struct sock *ssk = mptcp_subflow_tcp_sock(subflow);
> >
> > +             if (subflow->tcp_sock && sk_fullsock(subflow->tcp_sock))
> >                       __entry->free = sk_stream_memory_free(subflow->tcp_sock);
> > -                     if (ssk) {
> > -                             __entry->snd_wnd = tcp_sk(ssk)->snd_wnd;
> > -                             __entry->pace = ssk->sk_pacing_rate;
> > -                             if (__entry->pace)
> > -                                     __entry->ratio = div_u64((u64)ssk->sk_wmem_queued << 32,
> > -                                                              __entry->pace);
> > -                     }
> > +             else
> > +                     __entry->free = 0;
> > +
> > +             ssk = mptcp_subflow_tcp_sock(subflow);
> > +             if (ssk && sk_fullsock(ssk)) {
> > +                     __entry->snd_wnd = tcp_sk(ssk)->snd_wnd;
> > +                     __entry->pace = ssk->sk_pacing_rate;
> > +             } else {
> > +                     __entry->snd_wnd = 0;
> > +                     __entry->pace = 0;
> >               }
> > +
> > +             if (ssk && sk_fullsock(ssk) && __entry->pace)
> > +                     __entry->ratio = div_u64((u64)ssk->sk_wmem_queued << 32, __entry->pace);
> > +             else
> > +                     __entry->ratio = 0;
> >       ),
> >
> >       TP_printk("active=%d free=%d snd_wnd=%u pace=%u backup=%u ratio=%llu",
>
> LGTM, thanks!
>
> Paolo
>

  reply	other threads:[~2021-04-02  3:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-01 16:54 [MPTCP][PATCH v3 mptcp-next] Squash to "mptcp: add tracepoint in mptcp_subflow_get_send" Geliang Tang
2021-04-01 17:14 ` Paolo Abeni
2021-04-02  3:35   ` Geliang Tang [this message]
2021-04-02 19:18 ` Matthieu Baerts

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+WQbwug7fgP_sZurx2Bf8XfC1k+hDPLWf4rZ8wFpUFcB1xUYg@mail.gmail.com \
    --to=geliangtang@gmail.com \
    --cc=matthieu.baerts@tessares.net \
    --cc=mptcp@lists.linux.dev \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.