From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
To: Neil Horman <nhorman@tuxdriver.com>
Cc: Xin Long <lucien.xin@gmail.com>,
network dev <netdev@vger.kernel.org>,
linux-sctp@vger.kernel.org, Vlad Yasevich <vyasevich@gmail.com>,
daniel@iogearbox.net, davem@davemloft.net
Subject: Re: [PATCH net-next 5/7] sctp: reuse the some transport traversal functions in proc
Date: Thu, 7 Apr 2016 15:29:54 -0300 [thread overview]
Message-ID: <20160407182954.GF15005@localhost.localdomain> (raw)
In-Reply-To: <20160407130930.GA4573@hmsreliant.think-freely.org>
On Thu, Apr 07, 2016 at 09:09:30AM -0400, Neil Horman wrote:
> On Tue, Apr 05, 2016 at 12:06:30PM +0800, Xin Long wrote:
> > There are some transport traversal functions for sctp_diag, we can also
> > use it for sctp_proc. cause they have the similar situation to traversal
> > transport.
> >
> > Signed-off-by: Xin Long <lucien.xin@gmail.com>
> > ---
> > net/sctp/proc.c | 80 +++++++++++++--------------------------------------------
> > 1 file changed, 18 insertions(+), 62 deletions(-)
> >
> > diff --git a/net/sctp/proc.c b/net/sctp/proc.c
> > index 5cfac8d..dd8492f 100644
> > --- a/net/sctp/proc.c
> > +++ b/net/sctp/proc.c
> > @@ -282,80 +282,31 @@ struct sctp_ht_iter {
> > struct rhashtable_iter hti;
> > };
> >
> > -static struct sctp_transport *sctp_transport_get_next(struct seq_file *seq)
> > -{
> > - struct sctp_ht_iter *iter = seq->private;
> > - struct sctp_transport *t;
> > -
> > - t = rhashtable_walk_next(&iter->hti);
> > - for (; t; t = rhashtable_walk_next(&iter->hti)) {
> > - if (IS_ERR(t)) {
> > - if (PTR_ERR(t) == -EAGAIN)
> > - continue;
> > - break;
> > - }
> > -
> > - if (net_eq(sock_net(t->asoc->base.sk), seq_file_net(seq)) &&
> > - t->asoc->peer.primary_path == t)
> > - break;
> > - }
> > -
> > - return t;
> > -}
> > -
>
> this may just be a nit, but you defined the new sctp_transport_get_next in patch
> 2 of this series, and didn't remove this private version until here. Is that
> going to cause some behavioral issue, if someone builds a kernel between patch 2
Yes, it causes issues:
...net/sctp/proc.c:285:31: error: conflicting types for ‘sctp_transport_get_next’
static struct sctp_transport *sctp_transport_get_next(struct seq_file *seq)
^
> and 7? Seems like perhaps those two patches should be merged.
Agreed.
Marcelo
next prev parent reply other threads:[~2016-04-07 18:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-05 4:06 [PATCH net-next 0/7] sctp: support sctp_diag in kernel Xin Long
2016-04-05 4:06 ` [PATCH net-next 1/7] sctp: add sctp_info dump api for sctp_diag Xin Long
2016-04-05 4:06 ` [PATCH net-next 2/7] sctp: export some apis or variables " Xin Long
2016-04-05 4:06 ` [PATCH net-next 3/7] sctp: export some functions for sctp_diag in inet_diag Xin Long
2016-04-05 4:06 ` [PATCH net-next 4/7] sctp: add the sctp_diag.c file Xin Long
2016-04-05 4:06 ` [PATCH net-next 5/7] sctp: reuse the some transport traversal functions in proc Xin Long
2016-04-05 4:06 ` [PATCH net-next 6/7] sctp: merge the seq_start/next/exits in remaddrs and assocs Xin Long
2016-04-05 4:06 ` [PATCH net-next 7/7] sctp: fix some rhashtable functions using in sctp proc/diag Xin Long
2016-04-07 13:09 ` [PATCH net-next 5/7] sctp: reuse the some transport traversal functions in proc Neil Horman
2016-04-07 18:29 ` Marcelo Ricardo Leitner [this message]
2016-04-07 18:17 ` [PATCH net-next 3/7] sctp: export some functions for sctp_diag in inet_diag Marcelo Ricardo Leitner
2016-04-06 20:13 ` [PATCH net-next 0/7] sctp: support sctp_diag in kernel David Miller
2016-04-06 21:42 ` marcelo.leitner
2016-04-07 18:34 ` Marcelo Ricardo Leitner
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=20160407182954.GF15005@localhost.localdomain \
--to=marcelo.leitner@gmail.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=linux-sctp@vger.kernel.org \
--cc=lucien.xin@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=nhorman@tuxdriver.com \
--cc=vyasevich@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).