tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: managed switches on mii(4)



On Tue, Apr 08, 2008 at 08:50:40AM -0600, Herb Peyerl wrote:
> 
> On 8-Apr-08, at 8:31 AM, Jonathan A. Kollasch wrote:
> 
> >I saw the idea of using bridge(4) to take advantage of the  hard-
> >ware  switch,  but  somehow this seems like an unusual idea.  The
> >switch hardware has more configuration options than  just  bridg-
> >ing.  (Although  those  features may not be fully documented pub-
> >licly.)
> >
> >So,  what options have people thought about?  What are their pros
> >and cons?
> 
> In my day-life, on another NetBSD platform, the hardware has a  
> Marvell switch controlled by ioctl()s sent by a userland  
> application.  It's terribly proprietary and won't see human use, so  
> it's not intuitive and requires a block diagram of the system in  
> order to use.  Previous attempts to configure the switch were made by  
> heavily modifying our ifconfig(8) but it was too limited, unwieldy,  
> and (inconclusively) caused at least one brain aneurism.   I provide  
> the below not as an attempt to influence how this is done in the  
> future, but just in case someone does implement something, it might  
> illustrate what functions might be needed by other switches.   
> (wherever you see an option containing 11 digits or letters, then  
> those args reference all 11 ports on the switch.  ie: DDDFCCDFSCS

Let me suggest a different approach to supporting the Marvell switch than
switchctl.  We already have a familiar abstraction for an ethernet port in
our existing drivers (tlp(4), wm(4), et cetera), for a switch/hub/bridge
in bridge(4), and for a VLAN in vlan(4).  Let us reuse those.  Represent
the ports in the Marvell switch using 11 interfaces, mrvl0..mrvl10.
Change each port's media settings and such in the usual way with ifconfig.
Connect/partition ports on the switch with bridge(4).  Add and remove
VLAN tags on some ports with vlan(4).  Let the underlying hardware driver
set the switching matrix and other parameters in order to optimize the
configuration of mrvl0..10, vlan0..N, and bridge0..M.

Dave

-- 
David Young             OJC Technologies
dyoung%ojctech.com@localhost      Urbana, IL * (217) 278-3933 ext 24


Home | Main Index | Thread Index | Old Index