linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: Network hotplug semantics
@ 2001-02-08  7:02 Matthew Dharm
  2001-02-08  7:03 ` Brad Hards
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Matthew Dharm @ 2001-02-08  7:02 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 1174 bytes --]

Given the nature of 10BaseT (being stateless on the wire), I would say that
the interface should be signalled at the presence of hardware, not at the
presence of link.

Another way to look at this is the following:  I can't see if my wire is
connected to a switch.  I _can_ see that the KLSI unit is attached to my
computer.

Matt

On Thu, Feb 08, 2001 at 06:03:34PM +1100, Brad Hards wrote:
> Situation: USB ethernet adapter (in my case, a KLSI one).
> 
> Should the interface (e.g. ethX) be signalled when the device is plugged
> in to the USB port, or when the electrical connection of the 10BaseT
> wire is made? What counts as "plugged" in this case?
> 
> Brad
> 
> _______________________________________________
> Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
> Linux-hotplug-devel@lists.sourceforge.net
> http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

-- 
Matthew Dharm                              Home: mdharm-usb@one-eyed-alien.net 
Maintainer, Linux USB Mass Storage Driver

I'm just trying to think of a way to say "up yours" without getting fired.
					-- Stef
User Friendly, 10/8/1998

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Network hotplug semantics
  2001-02-08  7:02 Network hotplug semantics Matthew Dharm
@ 2001-02-08  7:03 ` Brad Hards
  2001-02-08  8:32 ` Oliver Neukum
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Brad Hards @ 2001-02-08  7:03 UTC (permalink / raw)
  To: linux-hotplug

Situation: USB ethernet adapter (in my case, a KLSI one).

Should the interface (e.g. ethX) be signalled when the device is plugged
in to the USB port, or when the electrical connection of the 10BaseT
wire is made? What counts as "plugged" in this case?

Brad

_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Network hotplug semantics
  2001-02-08  7:02 Network hotplug semantics Matthew Dharm
  2001-02-08  7:03 ` Brad Hards
@ 2001-02-08  8:32 ` Oliver Neukum
  2001-02-09  0:28 ` David Brownell
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Oliver Neukum @ 2001-02-08  8:32 UTC (permalink / raw)
  To: linux-hotplug

On Donnerstag,  8. Februar 2001 08:03, Brad Hards wrote:
> Situation: USB ethernet adapter (in my case, a KLSI one).
>
> Should the interface (e.g. ethX) be signalled when the device is plugged
> in to the USB port, or when the electrical connection of the 10BaseT
> wire is made? What counts as "plugged" in this case?

Quite a lot of ethernet controllers can't tell you whether a wire is 
connected. For other things like wireless networking the destinction is hard
to make. Thus to keep things unified, as soon as the card is up.

	Regards
		Oliver

_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Network hotplug semantics
  2001-02-08  7:02 Network hotplug semantics Matthew Dharm
  2001-02-08  7:03 ` Brad Hards
  2001-02-08  8:32 ` Oliver Neukum
@ 2001-02-09  0:28 ` David Brownell
  2001-02-09  1:27 ` Andrew Morton
  2001-02-10  3:46 ` Brad Hards
  4 siblings, 0 replies; 6+ messages in thread
From: David Brownell @ 2001-02-09  0:28 UTC (permalink / raw)
  To: linux-hotplug

Today, hotplug events basically involve namespace update activities:
for network hotplug events it's just "register" or "unregister".  No
event corresponds to "plugged".

However, I think in general it'd be good to assume that network
interfaces may not be "ready for use" right away.  For example,
there's no sense in even trying to figure out how to route (much
less start advertising a route!) until the link is really usable.  And
when the interface isn't statically configured, the same issue is true
for DHCP setup even earlier than that.

There are two network API calls that seem like they're intended
to be used in such cases:  netif_device_attach(), and its sibling
netif_device_detach() in linux/netdevice.h ... but they seem to
just be queue block/unblock primitives, despite what their names
imply.  The way 3c59x.c and xirc2ps_cs.c use them seems to
relate to handling hotplug and suspend/resume events.

- Dave


----- Original Message ----- 
From: "Oliver Neukum" <Oliver.Neukum@lrz.uni-muenchen.de>
To: "Brad Hards" <bhards@bigpond.net.au>; <linux-hotplug-devel@lists.sourceforge.net>
Sent: Thursday, February 08, 2001 12:32 AM
Subject: Re: Network hotplug semantics


> On Donnerstag,  8. Februar 2001 08:03, Brad Hards wrote:
> > Situation: USB ethernet adapter (in my case, a KLSI one).
> >
> > Should the interface (e.g. ethX) be signalled when the device is plugged
> > in to the USB port, or when the electrical connection of the 10BaseT
> > wire is made? What counts as "plugged" in this case?
> 
> Quite a lot of ethernet controllers can't tell you whether a wire is 
> connected. For other things like wireless networking the destinction is hard
> to make. Thus to keep things unified, as soon as the card is up.
> 
> Regards
> Oliver
> 
> _______________________________________________
> Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
> Linux-hotplug-devel@lists.sourceforge.net
> http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel


_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Network hotplug semantics
  2001-02-08  7:02 Network hotplug semantics Matthew Dharm
                   ` (2 preceding siblings ...)
  2001-02-09  0:28 ` David Brownell
@ 2001-02-09  1:27 ` Andrew Morton
  2001-02-10  3:46 ` Brad Hards
  4 siblings, 0 replies; 6+ messages in thread
From: Andrew Morton @ 2001-02-09  1:27 UTC (permalink / raw)
  To: linux-hotplug

David Brownell wrote:
> 
> Today, hotplug events basically involve namespace update activities:
> for network hotplug events it's just "register" or "unregister".  No
> event corresponds to "plugged".

There's netif_carrier_on and _off.  Practically no drivers use
this at present.  Better netdevice manageability is on the
2.5 dartboard somewhere.

_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Network hotplug semantics
  2001-02-08  7:02 Network hotplug semantics Matthew Dharm
                   ` (3 preceding siblings ...)
  2001-02-09  1:27 ` Andrew Morton
@ 2001-02-10  3:46 ` Brad Hards
  4 siblings, 0 replies; 6+ messages in thread
From: Brad Hards @ 2001-02-10  3:46 UTC (permalink / raw)
  To: linux-hotplug

Oliver Neukum wrote:
> 
> On Donnerstag,  8. Februar 2001 08:03, Brad Hards wrote:
> > Situation: USB ethernet adapter (in my case, a KLSI one).
> >
> > Should the interface (e.g. ethX) be signalled when the device is plugged
> > in to the USB port, or when the electrical connection of the 10BaseT
> > wire is made? What counts as "plugged" in this case?
> 
> Quite a lot of ethernet controllers can't tell you whether a wire is
> connected. For other things like wireless networking the destinction is hard
> to make. Thus to keep things unified, as soon as the card is up.
I am not sure that the device doesn't know - my wireless card (PrismII
based)
certainly has a visual indication (led goes from blinking to on solid). 

There is also a potential problem on the unplug side:

I go to my favourite linux conference, in the 'net room, and am quietly
working away reading my email. In comes a great hulking linux kernel
coder
(who for the purpose of this hypothetical story we'll call "davem").
davem
sees that I am using Netscape to read my email and immediately knows
that
I am a luser. So he grabs the back of my shirt, and throws me and my
netscape
running laptop out the door. He then takes over my port on the switch
and
gets down to a few CVS commits.

In the mean time, I recover from my copious injuries and eventually find 
a script kiddie in the corner trying to break into some site or another, 
and using IE38.92.beta.4crashme to download pr0n. A quick backhander to
the script kiddie, a little bit of crying (over the bruising to my
hand),
and I get to plug my laptop back in to the switch. But in the mean time,
the DHCP server has given my IP to someone else (who for the purposes
of this story we'll call "nina"). So when I plug my laptop in, it gets
messy. And when davem realises that it is me screwing up the switch,
it'll get really messy.

Fundamentally, what is the difference between disconnecting the 
cable on one side of the adapter (the USB socket) or the other (the
10BaseT socket)?

Brad

N.B. Any resemblence to actual people is purely for amusement value.
Please don't sue me or beat me up.

N.B. Any violence implied or expressed in this email is hypothetical.
Unless you are the script kiddie running nmap on my server.
side of my adapter (plugged into USB port) and 
back in, it works, but

_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2001-02-10  3:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-02-08  7:02 Network hotplug semantics Matthew Dharm
2001-02-08  7:03 ` Brad Hards
2001-02-08  8:32 ` Oliver Neukum
2001-02-09  0:28 ` David Brownell
2001-02-09  1:27 ` Andrew Morton
2001-02-10  3:46 ` Brad Hards

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).