linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Krishna Chaitanya <chaitanya.mgit@gmail.com>
Cc: Michal Kazior <michal.kazior@tieto.com>,
	linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: mac80211_hwsim + iperf + netns
Date: Thu, 04 Feb 2016 13:51:27 +0100	[thread overview]
Message-ID: <1454590287.2564.9.camel@sipsolutions.net> (raw)
In-Reply-To: <CABPxzY+N=3cuMB4Z7q6gqPkhh1GoiCrpG6G3E2bHLB96oqZfyw@mail.gmail.com> (sfid-20160204_134343_938123_4EC6FB6C)

On Thu, 2016-02-04 at 18:13 +0530, Krishna Chaitanya wrote:
> On Thu, Feb 4, 2016 at 6:05 PM, Johannes Berg <johannes@sipsolutions.
> net> wrote:
> > On Thu, 2016-02-04 at 17:58 +0530, Krishna Chaitanya wrote:
> > > On Thu, Feb 4, 2016 at 5:49 PM, Johannes Berg <johannes@sipsoluti
> > > ons.
> > > net> wrote:
> > > > On Thu, 2016-02-04 at 12:32 +0100, Michal Kazior wrote:
> > > > > 
> > > > >  ip netns add ns1
> > > > >  ip netns exec ns1 bash # get the PID in the session and
> > > > > don't
> > > > > close
> > > > > it
> > > > >  iw phy phyX set netns $pid_of_that_shell
> > > > > 
> > > > 
> > > > If you also have a recent enough iw version, you can use
> > > > 
> > > > iw phy phyX set netns name ns1
> > > > 
> > > My iw has this option, but it throws an error.
> > > Does this command have any prerequisites?
> > > 
> > > # iw phy phy1 set netns name ns1
> > > Invalid parameter: nsname(name)
> > > 
> > 
> > This happens if the ns1 doesn't exist.
> ok, so we need latest iprotue2 to create the
> namespace?

for this way to work, yes. you could hack your own C program to do the
required unshare() call and exec bash and then use the PID ... I used
to have one but can't find it now.

johannes

      reply	other threads:[~2016-02-04 12:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-04 11:22 mac80211_hwsim + iperf + netns Krishna Chaitanya
2016-02-04 11:32 ` Michal Kazior
2016-02-04 11:49   ` Krishna Chaitanya
2016-02-04 11:53     ` Michal Kazior
2016-02-04 12:27       ` Krishna Chaitanya
2016-02-04 12:46         ` Krishna Chaitanya
2016-02-04 12:51           ` Michal Kazior
2016-02-04 13:38             ` Krishna Chaitanya
2016-02-04 12:19   ` Johannes Berg
2016-02-04 12:28     ` Krishna Chaitanya
2016-02-04 12:35       ` Johannes Berg
2016-02-04 12:43         ` Krishna Chaitanya
2016-02-04 12:51           ` Johannes Berg [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=1454590287.2564.9.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=chaitanya.mgit@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=michal.kazior@tieto.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).