Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Jan 2012 15:00:01 -0800
From:      Juli Mallett <jmallett@FreeBSD.org>
To:        Aleksandr Rybalko <ray@ddteam.net>
Cc:        freebsd-net@freebsd.org, Adrian Chadd <adrian@freebsd.org>, freebsd-arch@freebsd.org, Aleksandr Rybalko <ray@freebsd.org>, Stefan Bethke <stb@lassitu.de>
Subject:   Re: Ethernet Switch Framework
Message-ID:  <CACVs6=-U9rr7cpeJ%2BVUgP3Xq1yRB=Xk1GjuzEOuXiEUoqGFq_Q@mail.gmail.com>
In-Reply-To: <20120129001251.7e4cfe83.ray@ddteam.net>
References:  <20120120221319.ca8b631f.ray@freebsd.org> <30A45A1E-CA13-4AC8-86FB-F8E06301D1F6@lassitu.de> <20120122195130.360261ce.ray@freebsd.org> <CAJ-VmokTh2q0ZH=kwU6GzJm5Mr4k7geJiFsoX_A9hcLhMZNxsg@mail.gmail.com> <0E31FEC4-963D-4AC8-9AB7-EE6D6D7F86EE@lassitu.de> <CAJ-Vmo=GRKRf%2BYsFqNm9d_T3Tq583uV_pabMV6ozuaytSRLivg@mail.gmail.com> <20120129001251.7e4cfe83.ray@ddteam.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jan 28, 2012 at 14:12, Aleksandr Rybalko <ray@ddteam.net> wrote:
> As I see from your patch, mdio/miiproxy require special bits in MAC
> driver. When I design switch framework, I keeping in mind that
> MAC drivers should be standard as possible

I don't understand why this is desirable in practice.  It's a nice
theory, but it falls down when one thinks in depth about how Ethernet
interfaces are used and administered vs. how switches are used and
administered.  What should media report?  What should media changes
do?  What is link status?  Do you show the CPU-to-switch port, or all
switch ports?

It makes me wonder if the understanding of the relationship in FreeBSD
isn't backwards.  Yes, the MAC sits on a bus and is memory-mapped, but
you can conceptualize of it as a child of the PHY, rather than the
parent of it, especially in systems with switch chipsets.  Especially
in systems where there is a switch chipset attached to multiple MACs.

In that model, it makes sense to semi-generically attach a
CPU-to-switch port's pseudo-PHY (or actual PHY, depending on hardware)
to a MAC generically, but that doesn't meant that the switch itself is
attached generically to the MAC.

There are a lot of switches out there that don't look or act much like
MII-driven PHYs, but which are connected over MDIO, as I've tried to
stress before.  I hope there will be as much separation between the
MII work that is being done and the switch work that is being done as
possible.  I think anything else will prove rapidly-obsolete and
perhaps even obstructive as soon as anyone seeks to add support for
more switch chipsets to FreeBSD.

I suppose the most likely reality, though, is that people simply won't
add switch support to FreeBSD, and will administer them out-of-band
from userland, using gross kernel shims.  That is probably true
whether any of the currently-outstanding work is committed or not,
unfortunately :(  I just hope we'll end up with something flexible
enough, broad enough in applicability, narrow enough in requirements,
etc., that we'll have feature-rich support for a few chipsets in tree
that work in sufficiently-different manners that they can be models
for other drivers in the future.

Thanks,
Juli.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACVs6=-U9rr7cpeJ%2BVUgP3Xq1yRB=Xk1GjuzEOuXiEUoqGFq_Q>