This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: ethernet driver package idea



Jonathan Larmour <jlarmour@redhat.com> writes:
> Bart Veer wrote:
> > 
> > >>>>> "Trenton" == Trenton D Adams <tadams@theone.dnsalias.com> writes:
> > 
> >     Trenton> One more thing. You might want to do what I've done
> >     Trenton> below. It's a little nicer using a drop down box than a
> >     Trenton> text box for selection of the ethX device name!
> > 
> >     Trenton>    cdl_option CYGDAT_ETHDRV_NAME {
> >     Trenton>        display       "Name to use for this network device"
> >     Trenton>        flavor        data
> >     Trenton>           legal_values {"\"eth0\"" "\"eth1\""}
> >     Trenton>        default_value { (1 == CYGHWR_NET_DRIVERS) ? "\"eth0\"" :
> >     Trenton> "\"eth1\"" }
> >     Trenton>        description "
> >     Trenton>            The name of this network device for control purposes.
> >     Trenton>        "
> >     Trenton>    }
> > 
> > This would prevent the user from calling the device something other
> > than eth0 or eth1, effectively restricting the system to just two
> > ethernet devices. It is possible to have more than that, although at
> > present only eth0 and eth1 can be easily configured via the
> > configuration tool - any additional ones require effort at the
> > application level. I would prefer users to still have the flexibility
> > to call their network devices anything they want to, even if this
> > involves a bit more complexity in the user interface.
> 
> I'm not sure this is a reasonable concern given the hardwiring of the
> interface names in init_all_network_interfaces(). We should be able to do

init_all_network_interfaces() is *example* code, intended for use mainly by
our own default testcases, remember.  People with more or different
interface lists should write a variant on it.

> better here, but it's more than a few minutes work. Volunteers?

I believe that general problem requires some hypothetical Hardware
Configuration Tool (to generate and catenate code fragments to initialize
extra hardware) and/or C-preprocessor looping directives, neither of which
are scheduled to appear any time soon.

Anyway, restricting interface names even to eth%1d isn't really acceptable,
though it's a neat bit of CDL, for sure.

	- Huge


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]