[CUWiN-Dev] Questions from Lawrence of CSIR

David Young dyoung at pobox.com
Tue Oct 31 04:12:08 CST 2006


On Tue, Oct 31, 2006 at 02:04:47AM -0600, Ross Musselman wrote:
> Hey guys!
> 
> Lawrence Mboweni is working on porting HSLS to the Linksys WRT54G board. 
> There are several pieces of information that would be very helpful in 
> this process. I'm posting this to the dev-list and hoping that someone 
> can help answer his questions.
> 
> Problem #1: As part of getting HSLS to run on the Linksys board, 
> Lawrence is running into a problem of space. HSLS current takes up about 
> 1 MB uncompressed. He would like to be able to shrink it to 500KB by 
> compressing it. If I'm correct, we generally find that Bzip2 compression 
> is the most effective. Am I correct? Also, are there places where he 
> should concentrate his efforts in reducing the size of HSLS storage? 
> Finally, do we know how much RAM is consumed solely by the HSLS 
> protocol? Knowing that is essential to setting a target for shrinking HSLS.

Bzip2 will work, but 1MB seems too big to start.  Is the binary statically
linked?  Stripped?  Following is the size of hslsd, statically linked,
for sparc64.  (I use sparc64 because it is sparc64 is RISC, so we can
compare the size of binaries more meaningfully between MIPS and sparc64
than between MIPS and i386.  i386 is CISC.)

thule:~/trunk/src/hsls> ls -l ~/scratch-cuw/Z/hsls/hslsd
-rwxr-xr-x  1 dyoung  users  1244094 Oct 31 03:33 /u1/dyoung/scratch-cuw/Z/hsls/hslsd

I strip it, and look again at its size:

thule:~/trunk/src/hsls> strip ~/scratch-cuw/Z/hsls/hslsd
thule:~/trunk/src/hsls> ls -l ~/scratch-cuw/Z/hsls/hslsd
-rwxr-xr-x  1 dyoung  users  668320 Oct 31 03:39 /u1/dyoung/scratch-cuw/Z/hsls/hslsd

Much smaller!

Compare with a dynamically-linked hslsd,

thule:~/trunk/src/hsls> ls -l ~/scratch-cuw/Z/hsls/hslsd
-rwxr-xr-x  1 dyoung  users  55685 Oct 31 03:40 /u1/dyoung/scratch-cuw/Z/hsls/hslsd

Do not be fooled, that tiny binary is linked to some large libraries,
so it's not like I saved 600KB by dynamically-linking it.

thule:~/trunk/src/hsls> ldd ~/scratch-cuw/Z/hsls/hslsd | awk '{ print $3; }' | \
    xargs ls -sk
  14 /u1/dyoung/scratch-cuw/Z/cxn/libcxn.so.0
  89 /u1/dyoung/scratch-cuw/Z/etx/libetx.so.0
   7 /u1/dyoung/scratch-cuw/Z/evwrap/libevwrap.so.0
 816 /u1/dyoung/scratch-cuw/Z/libhsls/libhsls.so.0
  18 /u1/dyoung/scratch-cuw/Z/log/liblog.so.0
  18 /u1/dyoung/scratch-cuw/Z/misc/libmisc.so.0
  14 /u1/dyoung/scratch-cuw/Z/pack/libpack.so.0
  10 /u1/dyoung/scratch-cuw/Z/rib/librib.so.0
  36 /u1/dyoung/scratch-cuw/Z/ssrv/libssrv.so.0
  34 /u1/dyoung/scratch-cuw/Z/zrib/libzrib.so.0
1288 /usr/lib/libc.so.12
  39 /usr/lib/libevent.so.1
  87 /usr/lib/libutil.so.7

> Problem #2: The TelCordia port to linux was based off the 3.4.2.4 
> original BSD version of HSLS. How does that compare to our current 
> version of HSLS? Should Lawrence be using another version of HSLS to 
> start from?

I don't recognize the version number 3.4.2.4.  Perhaps that is 3424?
Lots has changed since 3424.  It is a bad starting point.  The right
place to start is revision 4350, or whatever is at the head of the
Subversion trunk.  Start by adapting the libraries to work in Linux,
in approximately this order:

        trunk/src/evwrap
        trunk/src/misc
        trunk/src/log
        trunk/src/pack
        trunk/src/ssrv
        trunk/src/cxn
        trunk/src/rib
        trunk/src/zrib
        trunk/src/etx
        trunk/src/libhsls

Many of those libraries will port very easily to Linux.

I use Niels Provos' event library, libevent.  It is already available
for Linux.

I use a library called libutil for functions such as sockaddr_snprintf.
It also needs to be ported to Linux, however, it does not need to be
ported in its entirety.

For linked lists and such, I use the macros described in the NetBSD
manual page queue(3).  They ought to Just Work in Linux.

> Side question: I know that we are looking at moving from the ETX metric 
> to the ETT metric, but I assume that this has not been started by 
> anyone. Is there a timetable yet?

I have a plan in mind for ETT for the Atheros WLAN, but there is no
timetable.

Which Broadcom WLAN driver will they use at CSIR?

Dave

-- 
David Young             OJC Technologies
dyoung at ojctech.com      Urbana, IL * (217) 278-3933


More information about the CU-Wireless-Dev mailing list