X-MimeOLE: Produced By Microsoft Exchange V6.5
Received: by onstor-exch02.onstor.net 
	id <01C7B3A6.29F78336@onstor-exch02.onstor.net>; Wed, 20 Jun 2007 17:47:45 -0800
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----_=_NextPart_001_01C7B3A6.29F78336"
Content-class: urn:content-classes:message
Subject: RE: code review for Cougar changes in sm-ipmd and ssc-vsd
Date: Wed, 20 Jun 2007 17:47:45 -0800
Message-ID: <BB375AF679D4A34E9CA8DFA650E2B04E01401035@onstor-exch02.onstor.net>
In-Reply-To: <BB375AF679D4A34E9CA8DFA650E2B04E0436145D@onstor-exch02.onstor.net>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: code review for Cougar changes in sm-ipmd and ssc-vsd
Thread-Index: AcezlGUMotYr0i8BTOuXw8uZxnwk/AAAMpfwAAOoBLA=
From: "Wencheng Chai" <wencheng.chai@onstor.com>
To: "Maxim Kozlovsky" <maxim.kozlovsky@onstor.com>,
	"Wencheng Chai" <wencheng.chai@onstor.com>
Cc: "Tim Gardner" <tim.gardner@onstor.com>,
	"Andy Sharp" <andy.sharp@onstor.com>

This is a multi-part message in MIME format.

------_=_NextPart_001_01C7B3A6.29F78336
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Ipmd-kern-linux.c:

285: The variable fp is not initialized. Does this code even compile?=20
        The fp should be passed in argument instead of local variable.
        I changed to a subroutine and forgot to change function
parameter.

286: The first iteration of the loop will execute two fgets() in a row.
Is this what you want?=20

         Yes, it will read the name of all the fields of  statistics.

336, 343: Remove the // code

This does not look like a good idea to have same statistics for BSD and
Linux. Half of statistics that linux produces are dropped, and more than
half of bsd defined fields are filled with zeroes. The statistics
display should be different on different platforms, since different
kernels produce different statistics. As I said already, why don't we
just use netstat instead of writing all this code?

The code makes some assumptions about the order of the statistics and
what each statistics means. It will probably break when the kernel
changes. I think you are supposed to read the meaning of the numbers
from the same file

         If we use netstat of Linux, then we have to use different data
structures for all the statistics. I have to get all the people agree on
these changes to use total different data
        Structures. Tim and Andy please comments.

Ipc_linux.c:

59: Why this check for null? Is this function really expected to be
called with NULL string?=20

       I didn't change the interface at all, and the NULL checking was
also taken from=20
       Bsd version of the code.
             =20

      Thanks,
     Wencheng




_____________________________________________
From: Maxim Kozlovsky=20
Sent: Wednesday, June 20, 2007 5:59 PM
To: Wencheng Chai
Cc: Tim Gardner; Andy Sharp
Subject: RE: code review for Cougar changes in sm-ipmd and ssc-vsd

Ipmd-kern-linux.c:

57: Why do we need this ifdef?

65: Don't copy the GPL code inside our sources. This taints the whole
module and may be some others depending on how you interpret the
license.

I assume 229 is the line where GPL code ends and our starts, so since
you have to redo that I didn't review that.

285: The variable fp is not initialized. Does this code even compile?=20

286: The first iteration of the loop will execute two fgets() in a row.
Is this what you want?=20

288, 323, 347: Use strcmp(), strncmp() does not do what you need.

336, 343: Remove the // code

This does not look like a good idea to have same statistics for BSD and
Linux. Half of statistics that linux produces are dropped, and more than
half of bsd defined fields are filled with zeroes. The statistics
display should be different on different platforms, since different
kernels produce different statistics. As I said already, why don't we
just use netstat instead of writing all this code?

The code makes some assumptions about the order of the statistics and
what each statistics means. It will probably break when the kernel
changes. I think you are supposed to read the meaning of the numbers
from the same file.

The code does not deal with the case if the file is > than 1024.

416: Return is redundant.

421: Comment function

440: Remove printf.

446: There must be some constant defined instead of 64

452: Remove printf

The files opened in ipmd_getFromSSC() function are not used. Also you
are not closing them.

Ipmd-kern-openbsd.c:

61: Why are we including -linux file into -openbsd file?


This is not how this library should be created, instead of making two
directories there should be one directory, the Makefile should
conditionally include the appropriate sources which should have -$(OS)
in their name. Otherwise everybody who needs to include this library
will have to pick the library for the OS.=20

Ipc_openbsd.c:

"IPC" looks like a poor choice for a prefix, the natural association for
"ipc" is "inter process communication". Why could not you keep the ipmd
prefix?

Did something change in this file except renaming the functions?

Ipc_openbsd.h:

30: Why does this include "linux" file?

Ipc_linux.h:

26: What's up with the underscores in the #define names? The names
starting with _ and continuing with capital letter are system reserved,
you can't use them.

33: Please take some time and write some comments to all those
constants, structures and global variables. This is extra work, but
you've already done the work on finding out what this all means, why
waste it. Every field in the structure should be commented on a separate
line. The functions declared in the include file should have a comment
in regular comment format.

Ipc_linux.c:

47: Comment the function, especially since there are non-trivial
manipulations with the interface name

59: Why this check for null? Is this function really expected to be
called with NULL string?=20

67: That's completely equivalent to strcpy(ifname, ifstr). If you want
to write safer code, you should check the length of the input instead.

72: Please don't use non-standard functions. All these 3 lines could be
written much more compact, safer and understandable using snprintf().

81: Remove "NOT_USED" code.

113: Why check for NULL?

119: fix strncpy()

This is how far I got today, more tomorrow.













_____________________________________________
From: Wencheng Chai=20
Sent: Wednesday, June 20, 2007 4:41 PM
To: Maxim Kozlovsky; Wencheng Chai
Cc: Tim Gardner; Andy Sharp
Subject: code review for Cougar changes in sm-ipmd and ssc-vsd


      Hi Max,

      Please review the following files that are changed and added for
these two components:

     The files that are changed:

     //depot/cougar/nfx-tree/code/sm-ipmd/ipmd-kern-linux.c#1 - edit
default change (xtext)
    //depot/cougar/nfx-tree/code/sm-ipmd/ipmd-kern-openbsd.c#1 - edit
default change (xtext)
    //depot/cougar/nfx-tree/code/ssc-vsd/vs-ipm-linux.c#2 - edit default
change (xtext)
    //depot/cougar/nfx-tree/code/ssc-vsd/vs-ipm.h#2 - edit default
change (text)

    The new libraries:

     /homes/wenchengc/p4/work/cougar/nfx-tree/code/ssc-ip-openbsd
     /homes/wenchengc/p4/work/cougar/nfx-tree/code/ssc-ip-linux


     The contents of Wiki pages:

     =20
      /homes/wenchengc/p4/work/cougar/nfx-tree/code/sm-ipmd/ipmd.txt
      /homes/wenchengc/p4/work/cougar/nfx-tree/code/ssc-ip-linux/ipc.txt
   =20
      Thanks,
      Wencheng


------_=_NextPart_001_01C7B3A6.29F78336
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
6.5.7652.24">
<TITLE>RE: code review for Cougar changes in sm-ipmd and ssc-vsd</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">Ipmd-kern-linux.c:</FONT></SPAN><SPAN =
LANG=3D"en-us"></SPAN><SPAN LANG=3D"en-us"></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">285: The variable fp is not initialized. Does this code =
even compile? </FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The fp should =
be passed in argument instead of local variable.</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I changed to a =
subroutine and forgot to change function parameter.</FONT></SPAN><SPAN =
LANG=3D"en-us"></SPAN><SPAN LANG=3D"en-us"></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">286: The first iteration of the loop will execute two =
fgets() in a row. Is this what you want?</FONT></SPAN><SPAN =
LANG=3D"en-us"></SPAN><SPAN LANG=3D"en-us"> </SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Yes, it =
will read the name of all the fields of&nbsp; =
statistics.</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">336, 343: Remove the // code</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">This does not look like a good idea to have same =
statistics for BSD and Linux. Half of statistics that linux produces are =
dropped, and more than half of bsd defined fields are filled with =
zeroes. The statistics display should be different on different =
platforms, since different kernels produce different statistics. As I =
said already, why don&#8217;t we just use netstat instead of writing all =
this code?</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">The code makes some assumptions about the order of the =
statistics and what each statistics means. It will probably break when =
the kernel changes. I think you are supposed to read the meaning of the =
numbers from the same file</FONT></SPAN><SPAN =
LANG=3D"en-us"></SPAN><SPAN LANG=3D"en-us"></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If we =
use netstat of Linux, then we have to use different data structures for =
all the statistics. I have to get all the people agree on these changes =
to use total different data</FONT></SPAN><SPAN =
LANG=3D"en-us"></SPAN><SPAN LANG=3D"en-us"></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Structures. =
Tim</FONT></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN LANG=3D"en-us"> <FONT =
COLOR=3D"#000080" SIZE=3D2 FACE=3D"Arial">and Andy please =
comments.</FONT></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN =
LANG=3D"en-us"></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">Ipc_linux.c</FONT></SPAN><SPAN =
LANG=3D"en-us"></SPAN><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" =
SIZE=3D2 FACE=3D"Arial">:</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">59: Why this check for null? Is this function really =
expected to be called with NULL string?</FONT></SPAN><SPAN =
LANG=3D"en-us"></SPAN><SPAN LANG=3D"en-us"> </SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I =
didn</FONT></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN LANG=3D"en-us"><FONT =
COLOR=3D"#000080" SIZE=3D2 FACE=3D"Arial">&#8217;</FONT></SPAN><SPAN =
LANG=3D"en-us"></SPAN><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" =
SIZE=3D2 FACE=3D"Arial">t change the interface at all, and the NULL =
checking was also taken from </FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
Bsd</FONT></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN LANG=3D"en-us"> <FONT =
COLOR=3D"#000080" SIZE=3D2 FACE=3D"Arial">version of the =
code.</FONT></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN =
LANG=3D"en-us"></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;</FONT></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN =
LANG=3D"en-us"> </SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Thanks,</FONT></SPAN><SPAN =
LANG=3D"en-us"></SPAN><SPAN LANG=3D"en-us"></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp; Wencheng</FONT></SPAN></P>
<BR>
<BR>
<BR>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Tahoma">_____________________________________________<BR>
</FONT></SPAN><SPAN LANG=3D"en-us"><B></B></SPAN><SPAN =
LANG=3D"en-us"><B><FONT SIZE=3D2 =
FACE=3D"Tahoma">From:</FONT></B></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN =
LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Tahoma"> Maxim Kozlovsky<BR>
</FONT></SPAN><SPAN LANG=3D"en-us"><B></B></SPAN><SPAN =
LANG=3D"en-us"><B><FONT SIZE=3D2 =
FACE=3D"Tahoma">Sent:</FONT></B></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN =
LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Tahoma"> Wednesday, June 20, 2007 =
5:59 PM<BR>
</FONT></SPAN><SPAN LANG=3D"en-us"><B></B></SPAN><SPAN =
LANG=3D"en-us"><B><FONT SIZE=3D2 =
FACE=3D"Tahoma">To:</FONT></B></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN =
LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Tahoma"> Wencheng Chai<BR>
</FONT></SPAN><SPAN LANG=3D"en-us"><B></B></SPAN><SPAN =
LANG=3D"en-us"><B><FONT SIZE=3D2 =
FACE=3D"Tahoma">Cc:</FONT></B></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN =
LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Tahoma"> Tim Gardner; Andy =
Sharp<BR>
</FONT></SPAN><SPAN LANG=3D"en-us"><B></B></SPAN><SPAN =
LANG=3D"en-us"><B><FONT SIZE=3D2 =
FACE=3D"Tahoma">Subject:</FONT></B></SPAN><SPAN =
LANG=3D"en-us"></SPAN><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Tahoma"> RE: code review for Cougar changes in sm-ipmd and =
ssc-vsd</FONT></SPAN><SPAN LANG=3D"en-us"></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">Ipmd-kern-linux.c:</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">57: Why do we need this ifdef?</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">65: Don&#8217;t copy the GPL code inside our sources. =
This taints the whole module and may be some others depending on how you =
interpret the license.</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">I assume 229 is the line where GPL code ends and our =
starts, so since you have to redo that I didn&#8217;t review =
that.</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">285: The variable fp is not initialized. Does this code =
even compile? </FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">286: The first iteration of the loop will execute two =
fgets() in a row. Is this what you want? </FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">288, 323, 347: Use strcmp(), strncmp() does not do what =
you need.</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">336, 343: Remove the // code</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">This does not look like a good idea to have same =
statistics for BSD and Linux. Half of statistics that linux produces are =
dropped, and more than half of bsd defined fields are filled with =
zeroes. The statistics display should be different on different =
platforms, since different kernels produce different statistics. As I =
said already, why don&#8217;t we just use netstat instead of writing all =
this code?</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">The code makes some assumptions about the order of the =
statistics and what each statistics means. It will probably break when =
the kernel changes. I think you are supposed to read the meaning of the =
numbers from the same file.</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">The code does not deal with the case if the file is &gt; =
than 1024.</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">416: Return is redundant.</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">421: Comment function</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">440: Remove printf.</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">446: There must be some constant defined instead of =
64</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">452: Remove printf</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">The files opened in ipmd_getFromSSC() function are not =
used. Also you are not closing them.</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">Ipmd-kern-openbsd.c:</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">61: Why are we including &#8211;linux file into =
&#8211;openbsd file?</FONT></SPAN></P>
<BR>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">This is not how this library should be created, instead =
of making two directories there should be one directory, the Makefile =
should conditionally include the appropriate sources which should have =
-$(OS) in their name. Otherwise everybody who needs to include this =
library will have to pick the library for the OS. </FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">Ipc_openbsd.c:</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">&#8220;IPC&#8221; looks like a poor choice for a prefix, =
the natural association for &#8220;ipc&#8221; is &#8220;inter process =
communication&#8221;. Why could not you keep the ipmd =
prefix?</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">Did something change in this file except renaming the =
functions?</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">Ipc_openbsd.h:</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">30: Why does this include &#8220;linux&#8221; =
file?</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">Ipc_linux.h:</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">26: What&#8217;s up with the underscores in the #define =
names? The names starting with _ and continuing with capital letter are =
system reserved, you can&#8217;t use them.</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">33: Please take some time and write some comments to all =
those constants, structures and global variables. This is extra work, =
but you&#8217;ve already done the work on finding out what this all =
means, why waste it. Every field in the structure should be commented on =
a separate line. The functions declared in the include file should have =
a comment in regular comment format.</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">Ipc_linux.c:</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">47: Comment the function, especially since there are =
non-trivial manipulations with the interface name</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">59: Why this check for null? Is this function really =
expected to be called with NULL string? </FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">67: That&#8217;s completely equivalent to strcpy(ifname, =
ifstr). If you want to write safer code, you should check the length of =
the input instead.</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">72: Please don&#8217;t use non-standard functions. All =
these 3 lines could be written much more compact, safer and =
understandable using snprintf().</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">81: Remove &#8220;NOT_USED&#8221; code.</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">113: Why check for NULL?</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">119: fix strncpy()</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">This is how far I got today, more =
tomorrow.</FONT></SPAN></P>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Tahoma">_____________________________________________<BR>
</FONT></SPAN><SPAN LANG=3D"en-us"><B></B></SPAN><SPAN =
LANG=3D"en-us"><B><FONT SIZE=3D2 =
FACE=3D"Tahoma">From:</FONT></B></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN =
LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Tahoma"> Wencheng Chai<BR>
</FONT></SPAN><SPAN LANG=3D"en-us"><B></B></SPAN><SPAN =
LANG=3D"en-us"><B><FONT SIZE=3D2 =
FACE=3D"Tahoma">Sent:</FONT></B></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN =
LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Tahoma"> Wednesday, June 20, 2007 =
4:41 PM<BR>
</FONT></SPAN><SPAN LANG=3D"en-us"><B></B></SPAN><SPAN =
LANG=3D"en-us"><B><FONT SIZE=3D2 =
FACE=3D"Tahoma">To:</FONT></B></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN =
LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Tahoma"> Maxim Kozlovsky; Wencheng =
Chai<BR>
</FONT></SPAN><SPAN LANG=3D"en-us"><B></B></SPAN><SPAN =
LANG=3D"en-us"><B><FONT SIZE=3D2 =
FACE=3D"Tahoma">Cc:</FONT></B></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN =
LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Tahoma"> Tim Gardner; Andy =
Sharp<BR>
</FONT></SPAN><SPAN LANG=3D"en-us"><B></B></SPAN><SPAN =
LANG=3D"en-us"><B><FONT SIZE=3D2 =
FACE=3D"Tahoma">Subject:</FONT></B></SPAN><SPAN =
LANG=3D"en-us"></SPAN><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Tahoma"> code review for Cougar changes in sm-ipmd and =
ssc-vsd</FONT></SPAN><SPAN LANG=3D"en-us"></SPAN></P>
<BR>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Hi Max,</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Please review the =
following files that are changed and added for these two =
components:</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp; The files that are =
changed:</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp; =
//depot/cougar/nfx-tree/code/sm-ipmd/ipmd-kern-linux.c#1 - edit default =
change (xtext)</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp; =
//depot/cougar/nfx-tree/code/sm-ipmd/ipmd-kern-openbsd.c#1 - edit =
default change (xtext)</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp; =
//depot/cougar/nfx-tree/code/ssc-vsd/vs-ipm-linux.c#2 - edit default =
change (xtext)</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp; =
//depot/cougar/nfx-tree/code/ssc-vsd/vs-ipm.h#2 - edit default change =
(text)</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp; The new libraries:</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp; =
/homes/wenchengc/p4/work/cougar/nfx-tree/code/ssc-ip-openbsd</FONT></SPAN=
></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp; =
/homes/wenchengc/p4/work/cougar/nfx-tree/code/ssc-ip-linux</FONT></SPAN><=
/P>
<BR>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp; The contents of Wiki =
pages:</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
/homes/wenchengc/p4/work/cougar/nfx-tree/code/sm-ipmd/ipmd.txt</FONT></SP=
AN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
/homes/wenchengc/p4/work/cougar/nfx-tree/code/ssc-ip-linux/ipc.txt</FONT>=
</SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp; </FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Thanks,</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Wencheng</FONT></SPAN></P>

</BODY>
</HTML>
------_=_NextPart_001_01C7B3A6.29F78336--
