netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cong Wang <amwang@redhat.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>
Subject: Re: [Patch net-next] pktgen: support net namespace
Date: Mon, 28 Jan 2013 15:36:01 +0800	[thread overview]
Message-ID: <1359358561.20444.14.camel@cr0> (raw)
In-Reply-To: <87d2wpyf27.fsf@xmission.com>

On Sun, 2013-01-27 at 22:52 -0800, Eric W. Biederman wrote:
> Cong Wang <amwang@redhat.com> writes:
> 
> > From: Cong Wang <amwang@redhat.com>
> >
> > This patch add net namespace to pktgen, so that
> > we can use pktgen in different namespaces.
> 
> Skimming through this looks like a reasonable patch.
> 
> I am not a fan of the number of threads, but that has nothing to do with
> correctness, and would certainly require a large change in logic to keep
> the number of threads down, which might not be a good idea.

Yeah, I noticed we would have nr_ns*nr_cpu threads after this patch,
unfortunately this is not easy to solve due to the interface of pktgen
by design.

> 
> 
> One small nit below.
...
> >  
> > -	pg_proc_dir = proc_mkdir(PG_PROC_DIR, init_net.proc_net);
> > -	if (!pg_proc_dir)
> > -		return -ENODEV;
> > +	pn->net = net;
> > +	if (!pn->proc_dir) {
>         ^^^^^^^^^^^^^^^^^^^^
> 
> This test is pointless.  pn->proc_dir is allocated with kzalloc so it
> will be initially NULL and pg_net_init will be called exactly once
> per network namespace so pn->proc_dir will always be NULL here. 
> 

Alright... will remove it.

Thanks!

      reply	other threads:[~2013-01-28  7:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-28  6:32 [Patch net-next] pktgen: support net namespace Cong Wang
2013-01-28  6:52 ` Eric W. Biederman
2013-01-28  7:36   ` Cong Wang [this message]

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=1359358561.20444.14.camel@cr0 \
    --to=amwang@redhat.com \
    --cc=davem@davemloft.net \
    --cc=ebiederm@xmission.com \
    --cc=netdev@vger.kernel.org \
    /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).