From: Florian Westphal <fw@strlen.de>
To: Paolo Abeni <pabeni@redhat.com>
Cc: Florian Westphal <fw@strlen.de>, mptcp@lists.linux.dev
Subject: Re: [PATCH mptcp-next 3/4] mptcp: listen diag dump support
Date: Thu, 24 Mar 2022 18:07:44 +0100 [thread overview]
Message-ID: <20220324170744.GA30280@breakpoint.cc> (raw)
In-Reply-To: <4e72bdc521dd29c791a51b85700a54a03aba4c00.camel@redhat.com>
Paolo Abeni <pabeni@redhat.com> wrote:
> On Thu, 2022-03-24 at 14:57 +0100, Florian Westphal wrote:
> > makes 'ss -Ml' show mptcp listen sockets.
> >
> > Signed-off-by: Florian Westphal <fw@strlen.de>
> > ---
> > net/mptcp/mptcp_diag.c | 67 ++++++++++++++++++++++++++++++++++++++++++
> > 1 file changed, 67 insertions(+)
> >
> > diff --git a/net/mptcp/mptcp_diag.c b/net/mptcp/mptcp_diag.c
> > index c4992eeb67d8..6a6dfc7eac33 100644
> > --- a/net/mptcp/mptcp_diag.c
> > +++ b/net/mptcp/mptcp_diag.c
> > @@ -69,6 +69,8 @@ static int mptcp_diag_dump_one(struct netlink_callback *cb,
> > struct mptcp_diag_ctx {
> > long s_slot;
> > long s_num;
> > + unsigned int l_slot;
> > + unsigned int l_num;
> > };
> >
> > static void mptcp_diag_dump(struct sk_buff *skb, struct netlink_callback *cb,
> > @@ -114,6 +116,71 @@ static void mptcp_diag_dump(struct sk_buff *skb, struct netlink_callback *cb,
> > }
> > cond_resched();
> > }
> > +
> > + if (r->idiag_states & TCPF_LISTEN) {
> > + int i;
>
> perhaps here we need to add something alike:
>
> if (r->id.idiag_dport)
> return;
[..]
> Also, what about moving the following chunk in separate helper -
> mptcp_diag_dump_listener()?
Changed to:
if ((r->idiag_states & TCPF_LISTEN) && r->id.idiag_dport == 0)
mptcp_diag_dump_listeners(skb, cb, r, net_admin);
next prev parent reply other threads:[~2022-03-24 17:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-24 13:57 [PATCH mptcp-next 0/4] mptcp: listen dump support Florian Westphal
2022-03-24 13:57 ` [PATCH mptcp-next 1/4] mptcp: diag: switch to context structure Florian Westphal
2022-03-24 13:57 ` [PATCH mptcp-next 2/4] mptcp: remove locking in mptcp_diag_fill_info Florian Westphal
2022-03-24 13:57 ` [PATCH mptcp-next 3/4] mptcp: listen diag dump support Florian Westphal
2022-03-24 16:52 ` Paolo Abeni
2022-03-24 17:07 ` Florian Westphal [this message]
2022-03-24 13:57 ` [PATCH mptcp-next 4/4] mptcp: let mptcp listen dump show listen backlog size Florian Westphal
2022-03-24 16:45 ` Paolo Abeni
2022-03-24 17:35 ` Florian Westphal
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=20220324170744.GA30280@breakpoint.cc \
--to=fw@strlen.de \
--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.