Re: Need patch submission guidance [was: New Myricom 10Gb...]

Timothy Legge <[email protected]> Fri, 3 Mar 2006 12:20:33 -0500 (EST)
Newsgroups gmane.network.etherboot.devel
Message-ID <[email protected]>
--- Glenn Brown <[email protected]> wrote:

> To ensure our Etherboot driver is easily maintained,
> I made it a patched
> version of our Linux driver, hiding most of the
> Linux/Etherboot 
> differences by adding Linux shim code at the start
> of our 
> drivers/net/myri10ge.c file.  This allows most
> patches to our Linux 
> driver to cleanly apply directly to the Etherboot
> driver, trivializing 
> code maintenance.

Hi Glenn

Michael Brown mentioned that he did this for another
driver, but I have not seen that driver yet.

> 
> However, this led to two changes with effects
> outside our driver:
> (1) I had to put 3 small header files in a new
> src/drivers/net/myri
>      directory for this diff/patch tracking to work.
> (2) I had to patch src/core/relocate.c to ensure
> virt_offset is a
>      multipe of 4K.
> 
> The latter (2) merits some explanation: every other
> OS we have ever 
> supported (Linux, FreeBSD, MacOS X, Irix, SunOS,
> Solaris, VxWorks, AIX, 
> Windows NT+) have virt/phys/bus addrs with the
> bottom 12 bits the same. 
>   This makes bus pointer alignment simple in virt
> space, and is 
> essential for this "Linux shim" approach to work
> cleanly, in light of 
> the PCI Express requirement that DMAs not cross 4KB
> boundaries.
> 
> So, are (1) and (2) likely to be acceptable to the
> Etherboot maintainers?

First, I would like to see a patch file generated as:

cvs diff -u 

from the root of the current cvs repository.  That
will give me a better idea of what you are doing and
how widespread the changes to the core of Etherboot.

I suspect that Marty will want to run changes to the
relocate.c file by Michael.  If there is a PCI express
requirment for 4K alignment then we would probably
have to do it anyway at some point.  

Any changes to the way relocation works would (IMO)
require full regression testing of all the drivers .

The sooner you send the patch the better as we can
determine how much effort/testing is required to
accept the patch.

The Linux shim is interesting.  If it is possible to
do this for other drivers, it may be easier to add
drivers for hardware we don't have (at least
esperimentally).

regards

Tim


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642