AF:
NF:0
PS:10
SRH:1
SFN:
DSR:
MID:
CFG:
PT:0
S:andy.sharp@lsi.com
RQ:
SSV:mhbs.lsil.com
NSV:
SSH:
R:<Rendell.Fong@lsi.com>
MAID:2
X-Sylpheed-Privacy-System:
X-Sylpheed-Sign:0
SCF:#mh/Mailbox/sent
RMID:#imap/LSI/INBOX	0	1268165053.16781.463.camel@rendellf
X-Sylpheed-End-Special-Headers: 1
Date: Wed, 10 Mar 2010 10:58:56 -0800
From: Andrew Sharp <andy.sharp@lsi.com>
To: Rendell Fong <Rendell.Fong@lsi.com>
Subject: Re: please review - 34392
Message-ID: <20100310105856.439da579@ripper.onstor.net>
In-Reply-To: <1268165053.16781.463.camel@rendellf>
References: <1268165053.16781.463.camel@rendellf>
Organization: LSI
X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.8.20; x86_64-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

On Tue, 9 Mar 2010 13:04:13 -0700 Rendell Fong <Rendell.Fong@lsi.com>
wrote:

> Change 34392 by rendellf@rendellf-test on 2010/02/04 18:41:02
> *pending*
> 
>  Clean up of chassis mgr code by removing obsolete Bobcat and Cheetah
>  ifdef'd cases.  Removed unneeded references to chassis mgr header
> files in other various files.  Added new card type for Cougar
> platform and cpu state mgmt api routines.  Deleted txrx/fp chassis
> code since it has been replaced by user app code "cm".  Replaced use
> of sendAgile messages with rmc.
> 
> Affected files ...
> 
> ... //depot/tuxrx/linux/kernel/linux-
> mips-2.6/arch/mips/onstor/tuxstor/Makefile#1 edit
> ... //depot/tuxrx/linux/kernel/linux-
> mips-2.6/arch/mips/onstor/tuxstor/cm-api.c#1 add
> ... //depot/tuxrx/linux/kernel/linux-mips-2.6/include/linux/onstor/sm-
> chassis/cm-state-api.h#1 add
> ... //depot/tuxrx/linux/kernel/linux-mips-2.6/kernel/panic.c#2 edit
> ... //depot/tuxrx/nfx-tree/code/sm-bsd-
> snmpd/agent/mibgroup/mibII/system_mib.c#2 edit
> ... //depot/tuxrx/nfx-tree/code/sm-chassis/Makefile#3 edit
> ... //depot/tuxrx/nfx-tree/code/sm-chassis/chassis-strings.c#1 edit
> ... //depot/tuxrx/nfx-tree/code/sm-chassis/chassis-ui.c#4 edit
> ... //depot/tuxrx/nfx-tree/code/sm-chassis/chassisd-bc.c#5 delete
> ... //depot/tuxrx/nfx-tree/code/sm-chassis/chassisd-cg.c#4 edit
> ... //depot/tuxrx/nfx-tree/code/sm-chassis/chassisd-msg.c#4 edit
> ... //depot/tuxrx/nfx-tree/code/sm-chassis/chassisd.c#4 edit
> ... //depot/tuxrx/nfx-tree/code/sm-chassis/cm-api-bc.h#1 delete
> ... //depot/tuxrx/nfx-tree/code/sm-chassis/cm-api-cg.h#1 edit
> ... //depot/tuxrx/nfx-tree/code/sm-chassis/cm-api.c#2 delete
> ... //depot/tuxrx/nfx-tree/code/sm-chassis/cm-api.h#4 edit
> ... //depot/tuxrx/nfx-tree/code/sm-chassis/cm-bmfpga.c#3 delete
> ... //depot/tuxrx/nfx-tree/code/sm-chassis/cm-init.c#3 delete
> ... //depot/tuxrx/nfx-tree/code/sm-chassis/cm-intr.c#1 delete
> ... //depot/tuxrx/nfx-tree/code/sm-chassis/cm-linux.c#1 edit
> ... //depot/tuxrx/nfx-tree/code/sm-chassis/cm-msg.c#3 delete
> ... //depot/tuxrx/nfx-tree/code/sm-chassis/cm-openbsd.c#1 delete
> ... //depot/tuxrx/nfx-tree/code/sm-chassis/cm-tux.c#1 add
> ... //depot/tuxrx/nfx-tree/code/sm-chassis/cm-ui.c#3 delete
> ... //depot/tuxrx/nfx-tree/code/sm-chassis/cm-vars.c#1 delete
> ... //depot/tuxrx/nfx-tree/code/sm-chassis/cm.h#3 edit
> ... //depot/tuxrx/nfx-tree/code/sm-chassis/openbsd.h#1 delete
> ... //depot/tuxrx/nfx-tree/code/sm-ea/ea-util.c#3 edit
> ... //depot/tuxrx/nfx-tree/code/sm-utils/chassis-utils.c#1 edit
> ... //depot/tuxrx/nfx-tree/code/sm-utils/sys-utils.c#4 edit
> ... //depot/tuxrx/nfx-tree/code/ssc-cluster/clusdb-upgrade-common.c#4
> edit
> ... //depot/tuxrx/nfx-tree/code/ssc-ndmp/ndmp-config.c#4 edit
> ... //depot/tuxrx/nfx-tree/code/ssc-ndmp/ndmp-main.c#5 edit
> ... //depot/tuxrx/nfx-tree/code/ssc-nfxsh/cmd_flash.c#3 edit
> ... //depot/tuxrx/nfx-tree/code/ssc-nfxsh/cmd_system.c#6 edit
> ... //depot/tuxrx/nfx-tree/code/ssc-nfxsh/cmd_upgrade.c#3 edit
> ... //depot/tuxrx/nfx-tree/code/ssc-vtm/vtm-msg.c#5 edit



= Change 34392 by rendellf@rendellf-test on 2010/02/04 18:41:02 *pending*
= 
= 	Clean up of chassis mgr code by removing obsolete Bobcat and Cheetah
= 	ifdef'd cases.  Removed unneeded references to chassis mgr header files
= 	in other various files.  Added new card type for Cougar platform and
= 	cpu state mgmt api routines.  Deleted txrx/fp chassis code since it has
= 	been replaced by user app code "cm".  Replaced use of sendAgile messages
= 	with rmc.
= 

linux/kernel/linux-mips-2.6/arch/mips/onstor/tuxstor/Makefile

     should this not be a general driver, rather than in the platform
     code?

linux/kernel/linux-mips-2.6/arch/mips/onstor/tuxstor/cm-api.c

     >>add linux/kernel/linux-mips-2.6/arch/mips/onstor/tuxstor/cm-api.c

     line 4, please put your name in here as part of the copyright
     attribution.  you don't have to put your email address if you
     don't want to ~:^)

     line 27 for kernel files like this, the comment convention is /*
      * comment
       */
     Actually I think that's the "official" convention for Onstor
     as well.

     line 30, lower case, please.  no study caps.  see line above this
     one if you have questions ~:^)

     line 60 you're mixing uint32 style types with u64 style types
     right next to each other.  that's OK I guess, but I thought I
     would point it out just in case it wasn't what you intended.

     line 65 broken.  doesn't check if cpu is < 0, and upper bound
     is NFX_NFP_NUM_CPUS-1

     line 66 improper printk.  many other places too.  should be
     printk(LEVEL "fmt")

     line 71 (and others) usually the %u conversion is used when %x
     should be used.  would it make more sense reading the output if
     these were displayed as hex numbers?  also, the error message
     should say why it can't, since the code does know why ~:^)

     line 102 super ugly.  left hand cast and everything.  also,
     either the code should be obvious what's going on, or a comment
     explaining would be nice.



     OK, having said all this, I now start to realize what you're
     trying to do with this, but this isn't going to work on tuxstor.
     Individual cores aren't relevant, and don't crash or stuff.
     A thread might crash, but there wouldn't be anything to do in the
     hardware when that happens, at least, not at the mailbox level.
     Let's talk about the purpose of this software and what the design
     should be for tuxstor.




linux/kernel/linux-mips-2.6/include/linux/onstor/sm-chassis/cm-state-api.h

     >>add
     linux/kernel/linux-mips-2.6/include/linux/onstor/sm-chassis/cm-state-api.h

     line 35 hws (hidden or covered white space) after macro name

linux/kernel/linux-mips-2.6/kernel/panic.c

     might need some changes based on comments in previous file

nfx-tree/code/sm-bsd-snmpd/agent/mibgroup/mibII/system_mib.c

     looks good

nfx-tree/code/sm-chassis/Makefile

     looks good

nfx-tree/code/sm-chassis/chassis-strings.c

     line 1, I hate these at the top of a file.  prettier to put them
     at the bottom.

     I doubt most of these card types and whatnot will be here in the
     end version of this.  But you probably figured that out already
     after my other comment.



nfx-tree/code/sm-chassis/chassis-ui.c

     line 33 there should be no sm-libc/ usage.  clean up as necessary
     to fix that.  i think.

     line 309, i think this is bad RMC code.  oops, that's redundant.
     check with max on proper RMC api, if you haven't already.  i think
     max once told me good rmc code has either rmc_client_init or
     rmc_server_init in it, but not rmc_open.

     line 500 cleanup this if 0 crap too.  if it's debug code, then
     change this to if DEBUG or something.

     line 789 reboot_slot has no meaning in tuxstor


nfx-tree/code/sm-chassis/chassisd-bc.c

     >>delete nfx-tree/code/sm-chassis/chassisd-bc.c

     good


nfx-tree/code/sm-chassis/chassisd-cg.c

     line 1, move to bottom

     line 1201, unless this polls between SSC and "tuxstor" it doesn't
     have much meaning



nfx-tree/code/sm-chassis/chassisd-msg.c

     line 1, move to bottom

     damn, i might be wrong, but i think most of this might be redundant
     code.  as I said before in a previous comment, this is probably
     all taken care of by the RMC API of new.  Check with Oprah.
     Oops, I mean Max.


nfx-tree/code/sm-chassis/chassisd.c

     looks good

nfx-tree/code/sm-chassis/cm-api-bc.h

     >>delete nfx-tree/code/sm-chassis/cm-api-bc.h

     ok

nfx-tree/code/sm-chassis/cm-api-cg.h

     line 1, ditto



nfx-tree/code/sm-chassis/cm-api.c

     >>delete nfx-tree/code/sm-chassis/cm-api.c

     ok

nfx-tree/code/sm-chassis/cm-api.h

     line 35 uh, i thought we were getting rid of this cruft?
     many changes implied in this code for tuxstor.


nfx-tree/code/sm-chassis/cm-bmfpga.c

     >>delete nfx-tree/code/sm-chassis/cm-bmfpga.c

     ok

nfx-tree/code/sm-chassis/cm-init.c

     >>delete nfx-tree/code/sm-chassis/cm-init.c

     ok

nfx-tree/code/sm-chassis/cm-intr.c

     >>delete nfx-tree/code/sm-chassis/cm-intr.c

     ok


nfx-tree/code/sm-chassis/cm-linux.c

     looks good

nfx-tree/code/sm-chassis/cm-msg.c

     >>delete nfx-tree/code/sm-chassis/cm-msg.c

     ok

nfx-tree/code/sm-chassis/cm-openbsd.c

     >>delete nfx-tree/code/sm-chassis/cm-openbsd.c

     ok

nfx-tree/code/sm-chassis/cm-tux.c

     >>add nfx-tree/code/sm-chassis/cm-tux.c

     line 1, the usual

     lines 21-24, 28-9, i know some of the morons around here can't get
     it through their heads, but header files not below the directory
     where this C file resides should be in <>.  i'm just sayin'.

     line 49,145,151,356, tws

     line 182, if this needs fixing, put a common searchable string
     in front of it line '@@@' or whatever

     line 277 do we *have* to have studly caps?

     line 392, really?  why not?  then it shouldn't be compiled in or
     called anywhere?




nfx-tree/code/sm-chassis/cm-ui.c

     >>delete nfx-tree/code/sm-chassis/cm-ui.c

     ok

nfx-tree/code/sm-chassis/cm-vars.c

     >>delete nfx-tree/code/sm-chassis/cm-vars.c

     ok

nfx-tree/code/sm-chassis/cm.h

     line 111-113 some studly caps, some not.  hmmm.


nfx-tree/code/sm-chassis/openbsd.h

     >>delete nfx-tree/code/sm-chassis/openbsd.h

     yeah!


nfx-tree/code/sm-ea/ea-util.c

     looks good

nfx-tree/code/sm-utils/chassis-utils.c

     looks good

nfx-tree/code/sm-utils/sys-utils.c

     looks good

nfx-tree/code/ssc-cluster/clusdb-upgrade-common.c

     looks good

nfx-tree/code/ssc-ndmp/ndmp-config.c

     looks good

nfx-tree/code/ssc-ndmp/ndmp-main.c

     looks good

nfx-tree/code/ssc-nfxsh/cmd_flash.c

     looks good

nfx-tree/code/ssc-nfxsh/cmd_system.c

     looks good

nfx-tree/code/ssc-nfxsh/cmd_upgrade.c

     looks good

nfx-tree/code/ssc-vtm/vtm-msg.c

     looks good

