From: ebiederm@xmission•com (Eric W. Biederman)
To: Ulrich Weber <ulrich.weber@sophos•com>
Cc: <davem@davemloft•net>, <netdev@vger•kernel.org>
Subject: Re: [PATCH net-next] sctp: fix compile issue with disabled CONFIG_NET_NS
Date: Thu, 16 Aug 2012 11:58:34 -0700 [thread overview]
Message-ID: <87fw7m64v9.fsf@xmission.com> (raw)
In-Reply-To: <20120816112449.GA17354@uweber-WS> (Ulrich Weber's message of "Thu, 16 Aug 2012 13:24:49 +0200")
Ulrich Weber <ulrich.weber@sophos•com> writes:
> struct seq_net_private has no struct net
> if CONFIG_NET_NS is not enabled
My mistake.
Reviewed-by: "Eric W. Biederman" <ebiederm@xmission•com>
> Signed-off-by: Ulrich Weber <ulrich.weber@sophos•com>
Ulrich do you get any performance advantage by disabling the network
namespace?
I am wondering if there is any benefit to keeping it possible to disable
the network namespace?
The original reason for the option was so that distributions and
other who wanted to avoid new code could protect their users, and
that reasons seems to have long since passed.
> ---
> net/sctp/proc.c | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/net/sctp/proc.c b/net/sctp/proc.c
> index 3e62ee5..d9cb2ab 100644
> --- a/net/sctp/proc.c
> +++ b/net/sctp/proc.c
> @@ -199,7 +199,6 @@ static void * sctp_eps_seq_next(struct seq_file *seq, void *v, loff_t *pos)
> /* Display sctp endpoints (/proc/net/sctp/eps). */
> static int sctp_eps_seq_show(struct seq_file *seq, void *v)
> {
> - struct seq_net_private *priv = seq->private;
> struct sctp_hashbucket *head;
> struct sctp_ep_common *epb;
> struct sctp_endpoint *ep;
> @@ -216,7 +215,7 @@ static int sctp_eps_seq_show(struct seq_file *seq, void *v)
> sctp_for_each_hentry(epb, node, &head->chain) {
> ep = sctp_ep(epb);
> sk = epb->sk;
> - if (!net_eq(sock_net(sk), priv->net))
> + if (!net_eq(sock_net(sk), seq_file_net(seq)))
> continue;
> seq_printf(seq, "%8pK %8pK %-3d %-3d %-4d %-5d %5d %5lu ", ep, sk,
> sctp_sk(sk)->type, sk->sk_state, hash,
> @@ -307,7 +306,6 @@ static void * sctp_assocs_seq_next(struct seq_file *seq, void *v, loff_t *pos)
> /* Display sctp associations (/proc/net/sctp/assocs). */
> static int sctp_assocs_seq_show(struct seq_file *seq, void *v)
> {
> - struct seq_net_private *priv = seq->private;
> struct sctp_hashbucket *head;
> struct sctp_ep_common *epb;
> struct sctp_association *assoc;
> @@ -324,7 +322,7 @@ static int sctp_assocs_seq_show(struct seq_file *seq, void *v)
> sctp_for_each_hentry(epb, node, &head->chain) {
> assoc = sctp_assoc(epb);
> sk = epb->sk;
> - if (!net_eq(sock_net(sk), priv->net))
> + if (!net_eq(sock_net(sk), seq_file_net(seq)))
> continue;
> seq_printf(seq,
> "%8pK %8pK %-3d %-3d %-2d %-4d "
> @@ -423,7 +421,6 @@ static void sctp_remaddr_seq_stop(struct seq_file *seq, void *v)
>
> static int sctp_remaddr_seq_show(struct seq_file *seq, void *v)
> {
> - struct seq_net_private *priv = seq->private;
> struct sctp_hashbucket *head;
> struct sctp_ep_common *epb;
> struct sctp_association *assoc;
> @@ -438,7 +435,7 @@ static int sctp_remaddr_seq_show(struct seq_file *seq, void *v)
> sctp_local_bh_disable();
> read_lock(&head->lock);
> sctp_for_each_hentry(epb, node, &head->chain) {
> - if (!net_eq(sock_net(epb->sk), priv->net))
> + if (!net_eq(sock_net(epb->sk), seq_file_net(seq)))
> continue;
> assoc = sctp_assoc(epb);
> list_for_each_entry(tsp, &assoc->peer.transport_addr_list,
next prev parent reply other threads:[~2012-08-16 18:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-16 11:24 [PATCH net-next] sctp: fix compile issue with disabled CONFIG_NET_NS Ulrich Weber
2012-08-16 18:58 ` Eric W. Biederman [this message]
2012-08-16 19:36 ` Ben Hutchings
2012-08-16 20:00 ` Eric W. Biederman
2012-08-16 20:36 ` David Miller
2012-08-17 12:07 ` Ulrich Weber
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=87fw7m64v9.fsf@xmission.com \
--to=ebiederm@xmission$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=netdev@vger$(echo .)kernel.org \
--cc=ulrich.weber@sophos$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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