<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
On 03/25/2012 08:14 PM, Kevin Polulak wrote:
<blockquote
cite="mid:CAHRX3kw3ZqjUMq=rFx1uxLeBywST5JXrHw-Y2TGhgABsbg7cWg@mail.gmail.com"
type="cite">On Sun, Mar 25, 2012 at 8:05 PM, Joel Sherrill <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:joel.sherrill@oarcorp.com">joel.sherrill@oarcorp.com</a>></span>
wrote:<br>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
If you are willing to try, then we are willing to help. No one
else has expressed interest in this.</blockquote>
<div><br>
Thank you. Headache slowly fading... ;) <br>
<br>
On Sun, Mar 25, 2012 at 8:05 PM, Joel Sherrill <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:joel.sherrill@oarcorp.com">joel.sherrill@oarcorp.com</a>></span>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Let me break one item down -- the in_cksum one. OAR is
committed to the<br>
port on two architectures (x86 and MIPS). That leaves
potentially 13 other<br>
architectures in RTEMS to address. We don't expect you to
optimize the<br>
in_cksum for all of those. Find an implementation in either
the FreeBSD<br>
or current RTEMS TCP/IP stack, integrate it into
rtems-libbsd.git,<br>
verify that it builds, and our tests continue to link. That's
it for that task.<br>
</blockquote>
<div><br>
Ok, maybe that's not so bad; I enjoy bit bashing. Is <span
style="font-family:courier new,monospace">in_cksum()</span>
an implementation of <a moz-do-not-send="true"
href="http://www.rfc-editor.org/rfc/rfc1071.txt">RFC 1071</a>?
If so, I think I can handle that. How must the checksum
algorithm be optimized though? By "optimize" do you mean, as
RFC 1071 says, "carefully hand-craft the checksum routine,
exploiting every machine-dependent trick possible"? Are they
to be implemented in C or the native assembly language of the
architecture? I would imagine assembly.<br>
</div>
</div>
</blockquote>
I would recommend avoiding writing new implementations. There are<br>
current FreeBSD implementations for some architectures,
implementations<br>
in cpukit/libnetworking for others, and a generic algorithm to fall
back on<br>
when there is not an architecture specific one. That's all we would
expect<br>
as a baseline -- ensure that all architectures covered by union of
two source<br>
bases have optimized versions. If you can find appropriately
licensed versions<br>
for other architectures, they could be included. But the goal is
"compile and<br>
link" for this.<br>
<blockquote
cite="mid:CAHRX3kw3ZqjUMq=rFx1uxLeBywST5JXrHw-Y2TGhgABsbg7cWg@mail.gmail.com"
type="cite">
<div class="gmail_quote">
<div><br>
On Sun, Mar 25, 2012 at 8:05 PM, Joel Sherrill <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:joel.sherrill@oarcorp.com">joel.sherrill@oarcorp.com</a>></span>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
We have (or will have) a spreadsheet of NIC drivers in the
current tree.<br>
For NICs in BSP directories, identify if there is a FreeBSD
version. If so,<br>
integrate it into rtems-libbsd.git and verify it builds. If
time permits, you<br>
may take a stab at a version of the BSP specific glue code for
that BSP<br>
that is known to compile.<br>
</blockquote>
<div><br>
Also not so bad. However, I've never written a NIC driver
before. Are they easy enough to understand that I might be
able to familiarize myself with them before coding starts? Are
there any drivers in particular I could look at that would
serve as a good place to start learning? <br>
</div>
<div> <br>
</div>
</div>
</blockquote>
The cool thing here is that you are not really writing a NIC driver.
You are<br>
writing the glue that ties the generic driver to the proper BSP
specific<br>
access methods (e.g. bus) to use the generic driver. <br>
<br>
In other cases, we may see that say a PowerPC system on chip has its
own<br>
unique NIC. The decision process is:<br>
<br>
+ Does the FreeBSD source have this driver? <br>
- If yes, add it to rtems-libbsd build and add BSP specific
glue.<br>
- If no, add it to set needing update from current to new stack.<br>
<br>
Eventually, you will do that for all existing drivers in the RTEMS
tree<br>
and then have to figure out what is required to modify a driver in<br>
the current RTEMS source to the new stack. We want this to be as<br>
automated (e.g. script driven) and mundane as possible. Say you<br>
can fix 80% by script and have to document the other 20% of<br>
changes to do by hand.<br>
<br>
<br>
<blockquote
cite="mid:CAHRX3kw3ZqjUMq=rFx1uxLeBywST5JXrHw-Y2TGhgABsbg7cWg@mail.gmail.com"
type="cite">
<div class="gmail_quote">
<div>On Sun, Mar 25, 2012 at 8:05 PM, Joel Sherrill <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:joel.sherrill@oarcorp.com">joel.sherrill@oarcorp.com</a>></span>
wrote:</div>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
The first thing to realize is that you won't be a trailblazer
on this project.<br>
The team doing this is focusing on two BSPs and two NIC
drivers to prove<br>
that the stack works. That leaves other architectures, many
other BSPs, and<br>
many NICs to address. We are doing "depth" and you would be
doing "breadth".<br>
The mentorship here should actually be stronger than on many
projects because<br>
we are actively working on this.<br>
</blockquote>
<div> <br>
I'm comfortable with that. That's exactly how I'd like to
start as a newcomer.<br>
<br>
</div>
Maybe having lwIP being tossed won't be such a bad thing. In
fact, I think it might work out for the better. After a little
more detail, the tasks you've described so far all seem like
decent places to start.<br>
<br>
At this point, here's what I think I need to do:<br>
<ul>
<li>Read through RFC 1071 to familiarize myself with the
Internet checksum algorithm.</li>
</ul>
</div>
</blockquote>
Yes but you shouldn't expect to write an architecture optimized one
from scratch.<br>
<blockquote
cite="mid:CAHRX3kw3ZqjUMq=rFx1uxLeBywST5JXrHw-Y2TGhgABsbg7cWg@mail.gmail.com"
type="cite">
<div class="gmail_quote">
<ul>
<li>Look through FreeBSD and RTEMS source for
architecture-specific implementations of <span
style="font-family:courier new,monospace">in_cksum()</span>.</li>
</ul>
</div>
</blockquote>
Grab rtems-libbsd.git and see what is in there already. Also the
libbsd tarball in<br>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<a href="http://www.rtems.org/ftp/pub/rtems/people/joel/freebsd/">http://www.rtems.org/ftp/pub/rtems/people/joel/freebsd/</a>
is what we are using<br>
as "upstream" source. For example, I know cpukit/libnetworking has a
m68k<br>
optimized version and there is not one in the current FreeBSD
source. We want<br>
to get that one into the new tree.<br>
<br>
Also consider NetBSD as a source. They support more architectures. A
quick<br>
search showed sparc which looks like it supports the sparc (not
sparc64) port<br>
in RTEMS.<br>
<br>
Between the libbsd.txt Asciidoc file and the wiki task page, you
should get a better<br>
feel.<br>
<br>
<blockquote
cite="mid:CAHRX3kw3ZqjUMq=rFx1uxLeBywST5JXrHw-Y2TGhgABsbg7cWg@mail.gmail.com"
type="cite">
<div class="gmail_quote">
<ul>
<li>Find a simple NIC driver to learn how they're written to
help gauge my proposal timeline.</li>
</ul>
</div>
</blockquote>
Try to build things as they are now. Build rtems with
--disable-networking<br>
and them build rtems-libbsd per the instructions.<br>
<br>
For this part of the project, you aren't as much writing a driver
from<br>
scratch as determining what is required to get one from the current<br>
RTEMS stack to build with the new FreeBSD stack code. Surely we<br>
can find one quickly which might be interesting to try and see areas<br>
require changes. Even if you have to "if 0" out blocks of code and<br>
say "X won't compile".<br>
<blockquote
cite="mid:CAHRX3kw3ZqjUMq=rFx1uxLeBywST5JXrHw-Y2TGhgABsbg7cWg@mail.gmail.com"
type="cite">
<div class="gmail_quote">
<ul>
<li>Look at NIC spreadsheet and see if a FreeBSD version
exists.<br>
</li>
</ul>
</div>
</blockquote>
First may be to see if I can point you to a specific driver and we<br>
both try to see if it exists in the FreeBSD tree. This would help<br>
make sure you knew how to navigate it. :)<br>
<blockquote
cite="mid:CAHRX3kw3ZqjUMq=rFx1uxLeBywST5JXrHw-Y2TGhgABsbg7cWg@mail.gmail.com"
type="cite">Is that appropriate? Is there anything that should be
added?<br>
<br>
</blockquote>
There are other tasks in this like the linkcmds update. Check your
list against<br>
the Open Project description. :)<br>
<blockquote
cite="mid:CAHRX3kw3ZqjUMq=rFx1uxLeBywST5JXrHw-Y2TGhgABsbg7cWg@mail.gmail.com"
type="cite">-- <br>
- Kevin Polulak (soh_cah_toa)<br>
- <a moz-do-not-send="true" href="http://cybercrud.net"
target="_blank">http://cybercrud.net</a><br>
<br>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Joel Sherrill, Ph.D. Director of Research& Development
<a class="moz-txt-link-abbreviated" href="mailto:joel.sherrill@OARcorp.com">joel.sherrill@OARcorp.com</a> On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
</pre>
</body>
</html>