netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Martitz <thomas.martitz@hhi.fraunhofer.de>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, edumazet@google.com,
	herbert@gondor.apana.org.au, ebiederm@xmission.com
Subject: Trying to implement secondary loopback
Date: Tue, 12 Mar 2013 13:05:43 +0100	[thread overview]
Message-ID: <513F1A17.1000809@hhi.fraunhofer.de> (raw)

Hello folks,

(I'm sending this mail a second time (with a few people in CC) because I 
received no response.)

I'm Thomas Martitz, working on my Master Thesis: an Ethernet NIC. As 
part of my work I want to develop a custom loopback interface (for 
testing purposes).

However I'm facing a problem: It doesn't appear to be possible for a 
second loopback device to exist. Even when copying (and module'ifying) 
drivers/net/loopback.c the resulting device doesn't behave like the 
standard lo interface.

After examing the code I found this line (in loopback_net_init()):

loopback.c:206         net->loopback_dev = dev;

This suggests that each network namespace can only have one loopback 
interface. And indeed after modifying my custom interface to include 
this particular line it begins to work, but obviously at the same time 
the standard lo interface stops working.

So my questions are:
* Is this on purpose/expected?
* Is there anyway around it so that I can have a custom loopback 
interface without touching lo's functionality.
* Generally, what's the proper way (if any) implement a secondary 
loopback interface?

Many thanks in advance.

Best regards.

-----
visit us at

CeBIT 2013 / March 5-9 / Hannover, Germany / hall 9, booth E08

OFC 2013 / March 19-21 / Anaheim Convention Center, CA, USA / booth 11807

www.hhi.fraunhofer.de/events

             reply	other threads:[~2013-03-12 12:05 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-12 12:05 Thomas Martitz [this message]
2013-03-13 11:13 ` Trying to implement secondary loopback richard -rw- weinberger
2013-03-13 20:38   ` Martitz, Thomas
2013-03-13 20:46     ` Eric W. Biederman
2013-03-13 21:07       ` AW: " Martitz, Thomas
2013-03-13 21:21         ` Eric W. Biederman
2013-03-13 22:01           ` AW: " Martitz, Thomas
2013-03-15  7:30           ` Thomas Martitz
2013-03-15  8:59             ` Eric W. Biederman
2013-03-15 13:49               ` Thomas Martitz
2013-03-15 13:56                 ` richard -rw- weinberger
2013-03-15 14:08                   ` Thomas Martitz
2013-03-15 14:16                     ` richard -rw- weinberger
2013-03-15 14:20                       ` Thomas Martitz
2013-03-15 14:32                         ` richard -rw- weinberger
2013-03-15 14:35                           ` Thomas Martitz
2013-03-15 14:45                             ` richard -rw- weinberger
2013-03-15 14:50                               ` Thomas Martitz
2013-03-15 15:07                                 ` Thomas Martitz
2013-03-15 15:15                                   ` Hannes Frederic Sowa
2013-03-15 15:37                                   ` Benjamin LaHaise
2013-03-15 19:48                                     ` Martitz, Thomas
2013-03-18  9:33                                       ` Thomas Martitz
2013-03-15 18:36             ` Ben Hutchings
  -- strict thread matches above, loose matches on Subject: below --
2013-03-11  9:49 Thomas Martitz
2013-03-11  9:25 Thomas Martitz

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=513F1A17.1000809@hhi.fraunhofer.de \
    --to=thomas.martitz@hhi.fraunhofer.de \
    --cc=davem@davemloft.net \
    --cc=ebiederm@xmission.com \
    --cc=edumazet@google.com \
    --cc=herbert@gondor.apana.org.au \
    --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).