Ethernet driver guide - Minix

This is a discussion on Ethernet driver guide - Minix ; Hi I need to know how a driver for a network interface card works, I want to learn the basic principles since I know that every driver has its specific implementation. For example when we speak about the scheduler, we ...

+ Reply to Thread
Results 1 to 10 of 10

Thread: Ethernet driver guide

  1. Ethernet driver guide

    Hi

    I need to know how a driver for a network interface card works, I want
    to learn the basic principles since I know that every driver has its
    specific implementation.
    For example when we speak about the scheduler, we can read an
    operating system book and learn general design concepts e.g.
    multilevel feedback, round robin schedule, etc. Then if we look at
    minix's scheduler we can learn its specific implementation for one of
    the general scheduler studied form the operating system book.
    I'd like to do the same thing with the NIC driver.
    Thank you in advance.

  2. Re: Ethernet driver guide

    puntino wrote:
    > Hi
    >
    > I need to know how a driver for a network interface card works, I want
    > to learn the basic principles since I know that every driver has its
    > specific implementation.
    > For example when we speak about the scheduler, we can read an
    > operating system book and learn general design concepts e.g.
    > multilevel feedback, round robin schedule, etc. Then if we look at
    > minix's scheduler we can learn its specific implementation for one of
    > the general scheduler studied form the operating system book.
    > I'd like to do the same thing with the NIC driver.
    > Thank you in advance.


    Is there in general a driver developer guid ??

    --Armin

  3. Re: Ethernet driver guide

    On 05/20/08 09:19, puntino wrote:

    > I need to know how a driver for a network interface card works, I
    > want to learn the basic principles since I know that every driver
    > has its specific implementation. For example when we speak about
    > the scheduler, we can read an operating system book and learn
    > general design concepts e.g. multilevel feedback, round robin
    > schedule, etc. Then if we look at minix's scheduler we can learn
    > its specific implementation for one of the general scheduler
    > studied form the operating system book. I'd like to do the same
    > thing with the NIC driver. Thank you in advance.


    Read the code of the other drivers.

    I suggest that you use the dpeth for the 3c509 NIC I wrote. It
    supports several popular ISA NICs and it is designed to have a generic
    part and specific interfaces for the supported NICs.

    I also implemented a version for PCI that you can find at
    http://giovanni.homelinux.net/development/ where you can browse the
    source files or download a tarball.

    It is aligned to Minix 3.1.2, but there are changes for Minix 3.1.3
    due to changes in the kernel interfaces.

    Ciao
    Giovanni
    --
    A computer is like an air conditioner,
    it stops working when you open Windows.
    Registered Linux user #337974 < http://giovanni.homelinux.net/ >

  4. Re: Ethernet driver guide

    On May 20, 12:16 pm, Giovanni wrote:
    > On 05/20/08 09:19, puntino wrote:
    >
    > > I need to know how a driver for a network interface card works, I
    > > want to learn the basic principles since I know that every driver
    > > has its specific implementation. For example when we speak about
    > > the scheduler, we can read an operating system book and learn
    > > general design concepts e.g. multilevel feedback, round robin
    > > schedule, etc. Then if we look at minix's scheduler we can learn
    > > its specific implementation for one of the general scheduler
    > > studied form the operating system book. I'd like to do the same
    > > thing with the NIC driver. Thank you in advance.

    >
    > Read the code of the other drivers.
    >
    > I suggest that you use the dpeth for the 3c509 NIC I wrote. It
    > supports several popular ISA NICs and it is designed to have a generic
    > part and specific interfaces for the supported NICs.
    >
    > I also implemented a version for PCI that you can find athttp://giovanni.homelinux.net/development/where you can browse the
    > source files or download a tarball.
    >
    > It is aligned to Minix 3.1.2, but there are changes for Minix 3.1.3
    > due to changes in the kernel interfaces.
    >
    > Ciao
    > Giovanni
    > --
    > A computer is like an air conditioner,
    > it stops working when you open Windows.
    > Registered Linux user #337974


    To tell the truth I'm interested in the lance driver.
    Anyway I'm looking for a generic guide and then I''ll start to study
    the lance driver.

  5. Re: Ethernet driver guide

    On May 20, 10:43*pm, puntino wrote:
    > On May 20, 12:16 pm, Giovanni wrote:
    >
    >
    >
    >
    >
    > > On 05/20/08 09:19, puntino wrote:

    >
    > > > I need to know how a driver for a network interface card works, I
    > > > want to learn the basic principles since I know that every driver
    > > > has its specific implementation. For example when we speak about
    > > > the scheduler, we can read an operating system book and learn
    > > > general design concepts e.g. multilevel feedback, round robin
    > > > schedule, etc. Then if we look at minix's scheduler we can learn
    > > > its specific implementation for one of the general scheduler
    > > > studied form the operating system book. I'd like to do the same
    > > > thing with the NIC driver. Thank you in advance.

    >
    > > Read the code of the other drivers.

    >
    > > I suggest that you use the dpeth for the 3c509 NIC I wrote. *It
    > > supports several popular ISA NICs and it is designed to have a generic
    > > part and specific interfaces for the supported NICs.

    >
    > > I also implemented a version for PCI that you can find athttp://giovanni..homelinux.net/development/whereyou can browse the
    > > source files or download a tarball.

    >
    > > It is aligned to Minix 3.1.2, but there are changes for Minix 3.1.3
    > > due to changes in the kernel interfaces.

    >
    > > Ciao
    > > Giovanni
    > > --
    > > * *A computer is like an air conditioner,
    > > * *it stops working when you open Windows.
    > > * *Registered Linux user #337974 *

    >
    > To tell the truth I'm interested in the lance driver.
    > Anyway I'm looking for *a generic guide and then I''ll start to study
    > the lance driver.- Hide quoted text -
    >
    > - Show quoted text -


    Dear Puntino,

    I guess you may try to refer to the < Edition>> / <> and then follow the
    real world Linux Drivers' source code. And there are also a tremendous
    amount of articles about all sorts of drivers. Although most of the
    articles are not a full documentation of any specific device driver,
    you can always search through the internet to find the clues among
    them and form a complete map by yourself.

    Anyway, device drivers are OS specific. I assume that you wanna
    develop drivers for UNIX-like OSs like MINIX3. And if you need the two
    books I mentioned above, I think I can send you the complete
    electronic version.

    Best regards,

  6. Re: Ethernet driver guide

    On 05/20/08 22:05, Sean Bray wrote:

    > I guess you may try to refer to the < > Edition>> / <> and then follow the
    > real world Linux Drivers' source code. And there are also a
    > tremendous amount of articles about all sorts of drivers. Although
    > most of the articles are not a full documentation of any specific
    > device driver, you can always search through the internet to find
    > the clues among them and form a complete map by yourself.


    Reading documentation about Linux Drivers is not going to help in
    writing drivers for Minix. Device drivers are OS specific and Minix
    has its own requirements.

    > Anyway, device drivers are OS specific. I assume that you wanna
    > develop drivers for UNIX-like OSs like MINIX3. And if you need the
    > two books I mentioned above, I think I can send you the complete
    > electronic version.


    What it is absolutely needed are the device specifications and it is
    not easy to obtain them. Source code can only help to copy how the
    original designer implemented the hardware interface, but that all.

    As a matter of fact I had experiences in the design of ethernet device
    drivers for a proprietary OS, but when it came to porting to Minix the
    3c501/3/9 NICs I had to start from scratch studying the internals of
    the Minix kernel. And unfortunately there is no documentation about
    this subject.

    I just suggested to analyze the work I did (porting for ISA bus
    drivers) because I made a big effort to keep separate the OS specific
    requirements and the hardware specific interface and in my opinion
    this can save a lot of time focusing only on the hardware interface.
    Well for this the Linux Device Drivers book may help (I didn't read
    it), if it goes in such details, since Linux because it modularity
    implements separation of OS and hardware specific parts. As also is
    useful reading books on how code should be structured in big projects.

    It is also my habit to comment my code as much as it is reasonable for
    future maintenance should it done by me or any designer who is going
    to handle my code. Unfortunately it is very uncommon for the code
    distributed as free code.

    http://giovanni.homelinux.net/development/

    Ciao
    Giovanni
    --
    A computer is like an air conditioner,
    it stops working when you open Windows.
    Registered Linux user #337974 < http://giovanni.homelinux.net/ >

  7. Re: Ethernet driver guide

    On May 21, 4:35*pm, Giovanni wrote:
    > On 05/20/08 22:05, Sean Bray wrote:
    >
    > > I guess you may try to refer to the < > > Edition>> / <> and then follow the
    > > real world Linux Drivers' source code. And there are also a
    > > tremendous amount of articles about all sorts of drivers. Although
    > > most of the articles are not a full documentation of any specific
    > > device driver, you can always search through the internet to find
    > > the clues among them and form a complete map by yourself.

    >
    > Reading documentation about Linux Drivers is not going to help in
    > writing drivers for Minix. *Device drivers are OS specific and Minix
    > has its own requirements.
    >
    > > Anyway, device drivers are OS specific. I assume that you wanna
    > > develop drivers for UNIX-like OSs like MINIX3. And if you need the
    > > two books I mentioned above, I think I can send you the complete
    > > electronic version.

    >
    > What it is absolutely needed are the device specifications and it is
    > not easy to obtain them. *Source code can only help to copy how the
    > original designer implemented the hardware interface, but that all.
    >
    > As a matter of fact I had experiences in the design of ethernet device
    > drivers for a proprietary OS, but when it came to porting to Minix the
    > 3c501/3/9 NICs I had to start from scratch studying the internals of
    > the Minix kernel. *And unfortunately there is no documentation about
    > this subject.
    >
    > I just suggested to analyze the work I did (porting for ISA bus
    > drivers) because I made a big effort to keep separate the OS specific
    > requirements and the hardware specific interface and in my opinion
    > this can save a lot of time focusing only on the hardware interface.
    > Well for this the Linux Device Drivers book may help (I didn't read
    > it), if it goes in such details, since Linux because it modularity
    > implements separation of OS and hardware specific parts. As also is
    > useful reading books on how code should be structured in big projects.
    >
    > It is also my habit to comment my code as much as it is reasonable for
    > future maintenance should it done by me or any designer who is going
    > to handle my code. *Unfortunately it is very uncommon for the code
    > distributed as free code.
    >
    > http://giovanni.homelinux.net/development/
    >
    > Ciao
    > Giovanni
    > --
    > * *A computer is like an air conditioner,
    > * *it stops working when you open Windows.
    > * *Registered Linux user #337974 *



    Well, the MINIX3 group hired a bunch of students through the Google
    Summer of Code project to work on some important issues. And NDIS
    wrapper is one of them. I guess they're gonna get it done soon or at
    least make remarkable progress on it and we can develop device drivers
    under the NDIS wrapper after then. Erik DalÚn has been recruited for
    this job. He's supervised by Ben Gras. I think you guys are better of
    talking to them to get to know more about it. Or, just like Giovanni
    said, you're gonna have to dance with the kernel :-)

    Best regards,

  8. Re: Ethernet driver guide

    First of all, thanks to everyone for the useful advices .
    I'll take a look at Giovanni's driver implementation, in the
    meanwhile,
    Sean could you send me your eletronic version of the book "Essential
    device drivers", please ?
    Thank you


  9. Re: Ethernet driver guide

    On May 22, 12:35*am, puntino wrote:
    > First of all, thanks to everyone for the useful advices .
    > I'll take a look at Giovanni's driver implementation, in the
    > meanwhile,
    > Sean could you send me your eletronic version of the book "Essential
    > device drivers", please ?
    > Thank *you


    Sure, I'm gonna send a copy to you. It's a new book, just published on
    March 27, 2008. But please remember, this electronic version is just
    for you to check out whether it is helpful. If it is, I guess you
    should purchase a paper copy from a legal distributor :-)

    Best regards,

  10. Re: Ethernet driver guide

    On May 22, 2:41 am, Sean Bray wrote:
    > On May 22, 12:35 am, puntino wrote:
    >
    > > First of all, thanks to everyone for the useful advices .
    > > I'll take a look at Giovanni's driver implementation, in the
    > > meanwhile,
    > > Sean could you send me your eletronic version of the book "Essential
    > > device drivers", please ?
    > > Thank you

    >
    > Sure, I'm gonna send a copy to you. It's a new book, just published on
    > March 27, 2008. But please remember, this electronic version is just
    > for you to check out whether it is helpful. If it is, I guess you
    > should purchase a paper copy from a legal distributor :-)
    >
    > Best regards,



    Dear Sean,
    thank you for your interesting, I'm ver y lucky because I found
    the book in the university library.
    Thank you again

+ Reply to Thread