[ovs-dev] [PATCH 1/2] vswitchd: Add miimon support.

Ben Pfaff blp at nicira.com
Wed Jan 12 23:43:13 UTC 2011


It sounds like it's actually useful.  I just didn't understand what it
was doing.  I think that your patch is fine as-is, then.

Thanks,

Ben.

On Wed, Jan 12, 2011 at 03:39:47PM -0800, Ethan Jackson wrote:
> The initial call gives you the netdev's phy_id.  Given a phy_id the
> next call gives you the data we want.  I'll poke around the kernel
> source and see if the phy_id is always equal to a devices kernel
> index.  Possibly we can skip the call that way.
> 
> Ethan
> 
> On Wed, Jan 12, 2011 at 3:34 PM, Ben Pfaff <blp at nicira.com> wrote:
> > OK, so what is the initial MIIPHY call good for? ?Can we just do the
> > MIIREG call?
> >
> > (Sorry, none of this is documented as far as I know, so I'm just
> > grasping at straws.)
> >
> > Thanks,
> >
> > Ben.
> >
> > On Wed, Jan 12, 2011 at 03:28:45PM -0800, Ethan Jackson wrote:
> >> Just calling MIIPHY does not work. ?It only fills out the reg_num. The
> >> additional MIIREG call is required.
> >>
> >> Ethan
> >>
> >> On Wed, Jan 12, 2011 at 2:55 PM, Ethan Jackson <ethan at nicira.com> wrote:
> >> >> Presumably mimics whatever the corresponding bridge feature does. ?Is
> >> >> that the intention? ?I haven't looked at how that bridge feature works,
> >> >> so I don't know.
> >> >
> >> > The documentation I found says that linux bridge tries mii and falls
> >> > back to ethtool. ?The goal is to mimic that behavior.
> >> >
> >> >>
> >> >> The data overlaid into struct ifreq is struct mii_ioctl_data, right?
> >> >> Why not use that instead of an array of u16s with magic offsets? ?And I
> >> >> think that 0x0004 is BMSR_LSTATUS, so why not use that macro instead
> >> >> of the literal value?
> >> >
> >> > Oooh wow, I was looking at the mii-tool source which doesn't use this
> >> > structure. ?It must be very out of date. ?I'll update to use this.
> >> >
> >> >> It looks to me from kernel code that SIOCGMIIPHY is a superset of
> >> >> SIOCGMIIREG. ?Is it necessary to call both, or can you just call
> >> >> SIOCGMIIPHY?
> >> >
> >> > The mii-tool source calls both. ?But as mentioned earlier it's fairly
> >> > out of date. ?I can try just calling MIIPHY and see if it works.
> >> >
> >> >> I would argue that we should bump up the minor number of the vswitch
> >> >> schema version, since we added new features.
> >> >
> >> > Sounds fine to me.
> >> >
> >




More information about the dev mailing list