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:<Maxim.Kozlovsky@lsi.com>,<Brian.Stark@lsi.com>
MAID:2
X-Sylpheed-Privacy-System:
X-Sylpheed-Sign:0
SCF:#mh/Mailbox/sent
RMID:#imap/LSI/INBOX	0	861DA0537719934884B3D30A2666FECC010E4AC41F@cosmail02.lsi.com
X-Sylpheed-End-Special-Headers: 1
Date: Thu, 1 Apr 2010 11:54:53 -0700
From: Andrew Sharp <andy.sharp@lsi.com>
To: "Kozlovsky, Maxim" <Maxim.Kozlovsky@lsi.com>
Cc: "Stark, Brian" <Brian.Stark@lsi.com>
Subject: Re: Review Requested Changelist 34077 and 34432
Message-ID: <20100401115453.6ee52a73@ripper.onstor.net>
In-Reply-To: <861DA0537719934884B3D30A2666FECC010E4AC41F@cosmail02.lsi.com>
References: <4BAC1931.9060304@lsi.com>
	<861DA0537719934884B3D30A2666FECC010E4AC3E1@cosmail02.lsi.com>
	<20100401113724.70d536af@ripper.onstor.net>
	<861DA0537719934884B3D30A2666FECC010E4AC41F@cosmail02.lsi.com>
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=UTF-8
Content-Transfer-Encoding: quoted-printable

If it really is an April Fool's joke, be aware that I don't think Bill
knows that ~:^)

On Thu, 1 Apr 2010 12:39:01 -0600 "Kozlovsky, Maxim"
<Maxim.Kozlovsky@lsi.com> wrote:

> Yes it is. I just hope I don't have to make the same one the next
> year. It sure does look like it is possible at this point.
>=20
> -----Original Message-----
> From: Andrew Sharp [mailto:andy.sharp@lsi.com]
> Sent: Thursday, April 01, 2010 11:37 AM
> To: Kozlovsky, Maxim
> Cc: Stark, Brian
> Subject: Re: Review Requested Changelist 34077 and 34432
>=20
> Is this another April Fool's joke?
>=20
> On Thu, 1 Apr 2010 11:56:43 -0600 "Kozlovsky, Maxim"
> <Maxim.Kozlovsky@lsi.com> wrote:
>=20
> > Looks good Bill. Go ahead and check in.
> >
> > -----Original Message-----
> > From: William Fisher [mailto:bill.fisher@lsi.com]
> > Sent: Thursday, March 25, 2010 7:17 PM
> > To: Kozlovsky, Maxim; Stark, Brian; Scheer, Larry; Fong, Rendell;
> > Sharp, Andy Cc: Fisher, Bill
> > Subject: Re: Review Requested Changelist 34077 and 34432
> >
> > Folks:
> >
> > here is the latest. This is sync'ed/resolved to have
> > the files in the tree as of todayu. Both the TXRX
> > and SSC daemon's build with just a few warnings
> > on ISO C90 code violations in the CIFS/NFS state
> > machine code.
> >
> > Below are my responses to Max's code review.
> >
> > There are a few things that can be done later;
> >
> > 1) The infamous conversion of PREFETCH() to use
> >     the architecture independent API for cache
> >     prefetching. I noted this in the initial
> >     send of the change list. This is something
> >     that should be isolated. The PREFETCH()
> >     macro is defined as a no-op right now,
> >     but the code has not been changed to
> >     remove any of them.
> >
> > 2) The general problem Larry is
> >     working on, for compiling printk/printf
> >     for the 32-bit SSC builds versus the
> >     64-bit variables, aka being either "ll" or
> >     "l".
> >
> >     These are isolated to about 4-5 files and
> >     can be fixed in another independent
> >     changelist. They are a showstopper for
> >     getting the SSC deamons to compile since
> >     -Wall and prototypes defined are required
> >     and anything produces errors.
> >
> > 3) The fixing of the kernel's kmem_cache_create()
> >     calls which, the ctor and dtor callback
> >     procedures do not adhere to the kernel
> >     type definitions.
> >     The reason this hasn't been a problem is that
> >     all of the callers pass NULL into the create
> >     call. When somebody attempts to use this
> >     feature, they will get compilation errors.
> >
> > 4) I have added a definition for "bool" for the
> >     SSC daemon compilation case, since they
> >     are pulling in some of the eee-XXX.h header
> >     files which are using "bool" for return types.
> >
> >     This is fine for the Linux kernel but "bool"
> >     is not defined for the SSC builds. Max suggested
> >     including "stdbool.h" but it was considerably
> >     easier to add this trivial fix to nfs-types.h
> >     which is the solution I implemented.
> >
> > 5) There are a number of places in the scsi code
> >     where the header files are ifdef'ed DEBUG for
> >     both procedures and structure field names,
> >     however the code has lots of ASSERTS which
> >     use these field names and cause compiler
> >     errors.
> >
> >     This code now is compiled with both
> >     ASSERT and VERIFY defined and not no-op
> >     as in the current scheme, hence no errors
> >     are produced in these cases. Either the
> >     ifdef DEBUG's can be removed from the header
> >     and source code to allow the ASSERT's to
> >     be valid in all cases, both debug and opt
> >     builds.
> >     I simply added "ifdef DEBUG" around these
> >     ASSERT's so that things will compile correctly
> >     given the state of the stock header files.
> >
> > 6) There are a number of places in the virtual
> >     server specific code where I have ifdef'ed code:
> >     #ifdef VIRTUAL_SERVER_IMPLEMENTED which
> >     Rendell will convert to he new code. Rendell
> >     and I have talked about these files and this
> >     was a easy string to search for. He knows
> >     these well.
> >
> >     I have NOT deleted all of this code
> >     and these are needed to avoid adding
> >     all the virtual server code to this
> >     change list.
> >
> >     Rendell and I modified
> >     a few header files in the BSD
> >     tree to get things completely compiled.
> >
> > 7) I have included both Rendell's and Larry's
> >     code review comments into this change
> >     list set.
> >
> > This has taken a huge amount of time to complete
> > and Max caught a number of things, however I'd
> > like to avoid chasing the train to keep this
> > change list completely up to date with the
> > daily work of everybody.
> >
> > Hence we need to
> > submit this as soon as possible.
> >
> > -- Bill
> >
> > -----------------------------------
> > Kozlovsky, Maxim wrote:
> > > Nfx-error.h:
> > >
> > > 72: definition of assert is wrong.
> > >
> >             ASSERT was not defined in the old version. This is
> >             new for the SSC daemon builds.
> > > Nfx-types-extra.h:
> > >
> > > Comment format, lines > 80 characters.
> >             done
> > >
> > > 123, 126: meaningless comment
> >
> >             Fine.
> > >
> > > 134: cache_create() definition is wrong.
> >
> >           The kernel definition in slab.h is:
> >
> > struct kmem_cache *kmem_cache_create(const char *, size_t, size_t,
> >                  unsigned long,
> >                  void (*)(void *, struct kmem_cache *, unsigned
> > long), void (*)(void *, struct kmem_cache *, unsigned
> > long));
> >
> > The version from code/sm-malloc/malloc.h was:
> >
> > struct mm_cache *
> > cache_create(uint32 flags,
> >                 uint32 objsize,
> >                 uint32 align,
> >                 uint32 slabsize,
> >                 void (*ctor)(void *obj, uint32 obj_size),
> >                 void (*dtor)(void *obj));
> >
> > The version in nfx-types-extra.h that Andy defined is:
> >
> > #define cache_create(U, isize, align, size, ctor, dtor) \
> >            kmem_cache_create( #ctor, size, align,          \
> >            SLAB_POISON | SLAB_RED_ZONE | SLAB_HWCACHE_ALIGN, ctor,
> > dtor)
> >
> > Hence the mapping from ctor and dtor to the kernel
> > procedures is not correct;
> >
> > Greping for ctor and dtor on all cache_create() calls in the
> > code we find:
> > code/sm-esm/esm.c:    esm_event_cache =3D kmem_cache_create(
> > code/sm-esm/esm.c:    if (kmem_cache_create =3D=3D NULL) {
> > code/sm-esm/esm-threads.mod.c:  { 0xfa099bb4, "kmem_cache_create" },
> > code/sm-fs/fs-global.c:    fs_compact_leaf_cache =3D cache_create(0,
> > code/sm-fs/fs-global.c:    fs_bufptr_cache =3D
> > cache_create(CACHE_INMEM_SLAB, code/sm-fs/fs-global.c:
> > fs_bufpagehdr_cache =3D cache_create(CACHE_INMEM_SLAB,
> > code/sm-fs/fs-global.c:    fs_vl_unstableFH_cache =3D
> > cache_create(CACHE_INMEM_SLAB,
> > code/sm-fs/fs-global.c:    fs_log_buf_cache =3D
> > cache_create(CACHE_INMEM_SLAB, code/sm-fs/fs-global.c:
> > fs_log_undo_summ_cache =3D cache_create(CACHE_INMEM_SLAB,
> > code/sm-fs/fs-global.c:    fs_waiter_cache =3D
> > cache_create(CACHE_INMEM_SLAB, code/sm-fs/fs-global.c:
> > fs_logsummary_cache =3D cache_create(CACHE_INMEM_SLAB,
> > code/sm-fs/fs-global.c:    fs_inode_cache =3D
> > cache_create(CACHE_INMEM_SLAB, code/sm-fs/fs-global.c:
> > fs_context_cache =3D cache_create(CACHE_INMEM_SLAB,
> > code/sm-fs/fs-global.c:    fs_quota_cache =3D
> > cache_create(CACHE_INMEM_SLAB, code/sm-fs/fs-global.c:
> > fs_io_queue_cache =3D cache_create(CACHE_INMEM_SLAB,
> > code/sm-fs/fs-global.c: cache_create(CACHE_INMEM_SLAB,
> > code/sm-fs/fs_mod.mod.c:        { 0xfa099bb4, "kmem_cache_create" },
> > code/sm-malloc-slab/malloc.c:    Initialize the malloc cache. See
> > cache_create() for detailed description.
> > code/sm-malloc-slab/malloc.c:    See cache_create() for the rest.
> > code/sm-malloc-slab/malloc.c:    be equal to objsize parameter
> > specified to cache_create().
> > code/sm-malloc-slab/malloc.c:cache_create(uint32 flags,
> > code/sm-malloc-slab/malloc.c:        struct mm_cache *cache =3D
> > cache_create( code/sm-malloc-slab/malloc.c:        struct mm_cache
> > *cache =3D cache_create( code/sm-nfs/nfs-req-api.c:
> > nfs_request_cache =3D cache_create(CACHE_INMEM_SLAB,
> > code/sm-open/fcb-api.c:    fcb_lockRecordCache =3D
> > cache_create(CACHE_INMEM_SLAB,
> > code/sm-rmc/rmc_api.c:    rmc_msg_cache =3D
> > kmem_cache_create("rmc_msg", sizeof(rmc_msg_t), 0, 0,
> > code/sm-stats/kpi-api.c:    return cache_create(CACHE_INMEM_SLAB,
> > code/sm-stats/stats-client.c:    stats_client_cs_pool_cache =3D
> > kmem_cache_create("stats_client_cache",
> > code/sm-vscan/vscan-api.c:    vscan_ctl_cache =3D
> > cache_create(CACHE_INMEM_SLAB,
> >
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D
> >
> > Hence nobody is passing anything except NULL pointers
> > for the ctor and dtor procedures, which is the reason
> > we are not getting compiler errors.
> >
> > With no users of the ctor and dtor procedures in the
> > nfx-tree, this is a non-issue until they are used.
> >
> > >
> > > Nfx-types.h:
> > >
> > > 12: useless comment
> > > 17,18: remove
> >
> >             Done.
> > >
> > > 54: NTSTATUS is defined in ntstatus.h. I heard your argument about
> > > include files, it is not accepted.
> >   >  The change contradicts the rule about not having duplicate
> >   > code.
> >
> >             I have moved to to nfx-defs.h since it is used in lots
> > of places
> >             other than NFS and CIFS code. This includes the kernel
> >             files as well as code in the nfx-tree/code directories.
> >
> >             This avoids pulling in
> >             "../sm-cifs/win-compat.h" into nearly every file
> >             in the system for this simple trivial typedef.
> >             I removed it's definition from win-compat.h to avoid any
> >             duplicate definitions.
> >
> >          This works fine and the whole system is now compiled
> >          and linked with this.
> >
> > >
> > > 59: no #ifdef is necessary, the definition should be the same for
> > > kernel and user space
> > >
> > > 73: useless comment, and wrong as well. VS_ID_INVALID never was
> > > ULL.
> > >
> > > 78: Useless comment.
> >
> >             Done. I have put back 0ULL, below are your previoous
> > comments:
> >
> >             >Nfx-types.h
> >
> >      >> 71: why this is LL?
> >      >>
> >
> >             Ask Rendell.
> > >
> > > 79: Why you are changing this from 0ULL?
> >
> >             Since last time you complained about LL. I dont'care
> >             either wasy since 0 is equivalent to 0ULL in the
> >             comparisons.
> > >
> > > Ntstatus.h:
> > >
> > > Undo.
> > >
> >             Done.
> >
> > > eee-poll.h:
> > >
> > > Unrelated and unnecessary changes.
> >
> >             boolean is defined in the nfx-types.h and
> >             so be consistent I have converted everything to
> >             use bool since they are not the same typedef.
> > >
> > > Eee-timer-api.h:
> > >
> > > 18: don't put offensive comments in source code
> >
> >           "weird" is hardly "offensive" and is in fact
> >           quite accurate. I removed it for you.
> >          Having to include and error header file
> >          to get some asserts is "weird".
> > >
> > > 64: Should be typedef struct timespec as it was before.
> >
> >             It was never timespec. This is as per the
> >             definition in the dev tree for eeeGMT_t:
> >
> >             timer-api.h
> >
> > // How to tell time in the embedded environment
> >
> > typedef struct {
> >              int32 sec;
> >              int32 usec;
> > } eeeGMT_t;
> >
> > Andy changed this to be consistent
> >             with tv_sec and tv_nsec and so
> >             I went with that. I will
> >             convert it to timespec since
> >             they are equivalent.
> > >
> > > 205: redundant return
> > > 674: redundant return
> > > 722: redundant return
> > >
> >             Fine, I removed them.
> >
> > > Eee-timer.h:
> > >
> > > 71: Unrelated unnecessary change.
> > >
> >             Fine.
> >
> > > Tpl_internal.h:
> > > Copyright lsi
> > > Lines > 80 characters
> > >
> >             Fixed.
> >
> > > File should include the include files necessary for its
> > > compilation, like spinlock.h, atomic.h, ip.h, etc.
> > >
> >             NO. I hate including LOTS of addiotional linux header
> > files in the internal header files containing only data structures.
> >            It also violates the loose kernel conventions on
> > overloading header files. It's compiling just fine without them.
> >
> >             The nfx-tree/code directories are completely
> > inconsistent in this reqgard. Some use a file like "fs-includes.h"
> >             which includes nearly every file system header file in
> > every single code file, without regard to whether the code needs
> >             any or all of those definitions.
> >
> >            Others include foo.h in the
> >             code files which is trivial wrapper to include nearly
> > every include file they might want to use in that directory.
> >
> >            Others follow the foo.h, foo-api.h, foo-struct.h
> > convention which is the "endorsed" standard.
> >             The usage is totally inconsistent across the code base.
> >
> >             Andy removed 100's of extraneous includes which is the
> >            code that we are using today. In the new code I'm against
> >             adding such hacks since I am not too lazy to figure out
> >             what it needs.
> >
> >             The convention of having:
> >             foo-api.h
> >             foo.h
> >             foo-struct.h
> >
> >             with the external's in the foo-api.h is just fine.
> >             I don't problem with that scheme, in fact most
> >            of your comments center on following this convention.
> >
> >             However even that scheme is not consistently used across
> >             the code base. Some have no foo-api.h header file
> >             and just foo.h and others have all three. Some do
> >             not put the extern's into the foo-api.h header file,
> > etc.
> >
> > > Eee-fwd.c:
> > >
> > > Unnecessary unrelated changes
> > >
> >             What specifically? Since I wrote this code,
> >
> > > Eee-poll.c:
> > >
> > > This file needs to be resolved correctly. The change is undoing
> > > some of the changes to this file.
> > >
> > > 439, 443: unnecessary unrelated change
> > >
> >            done.
> > > Eee-timer.c:
> > >
> > > 552, 553: unnecessary unrelated change
> > >
> >             done.
> >
> > > tpl-rcv.c:
> > >
> > > 66: function prototypes should be in a header file
> > >
> > > Tpl.c:
> > >
> > > 69: useless comment
> > >
> >             fine.
> >
> > > 141: function prototypes should be in a header file
> > >
> > > 153: useless comment
> > >
> > > 168: This is gross and needs to be fixed.
> >
> >             What specifically is "gross"?
> > >
> > > Smp-api.h:
> > >
> > > 21: just remove the code and the comment, stop commenting the code
> > > that was there before.
> > >
> >
> >             What file are your referring to.
> >             I do NOT have the Includes/smp-api.h file open
> >             for edit, and it doesn't contain
> >             what you object to. Hence you can make that change:
> >
> > bfisher-linux: 19073>p4 describe 34077 |grep "smp-api.h"
> > ... //depot/tuxrx/nfx-tree/Includes/bc/FCNIM/smp-api.h#1 delete
> > ... //depot/tuxrx/nfx-tree/Includes/bc/NFP_FP/smp-api.h#1 delete
> > ... //depot/tuxrx/nfx-tree/Includes/bc/NFP_TXRX/smp-api.h#1 delete
> > ... //depot/tuxrx/nfx-tree/Includes/bc/SSC/smp-api.h#1 delete
> > ... //depot/tuxrx/nfx-tree/Includes/bl/FCNIM/smp-api.h#1 delete
> > ... //depot/tuxrx/nfx-tree/Includes/bl/NFP_FP/smp-api.h#1 delete
> > ... //depot/tuxrx/nfx-tree/Includes/bl/NFP_TXRX/smp-api.h#1 delete
> > ... //depot/tuxrx/nfx-tree/Includes/bl/SSC/smp-api.h#1 delete
> > ... //depot/tuxrx/nfx-tree/Includes/cg/SSC/smp-api.h#1 edit
> > ... //depot/tuxrx/nfx-tree/Includes/ch/FCNIM/smp-api.h#1 delete
> > ... //depot/tuxrx/nfx-tree/Includes/ch/NFP_FP/smp-api.h#1 delete
> > ... //depot/tuxrx/nfx-tree/Includes/ch/NFP_TXRX/smp-api.h#1 delete
> > ... //depot/tuxrx/nfx-tree/Includes/ch/SSC/smp-api.h#1 delete
> > ... //depot/tuxrx/nfx-tree/Includes/ch/SSC_MGMT/smp-api.h#1 delete
> >
> > bfisher-linux: 19074>ls -l ./Includes/smp-api.h
> > -r--r--r--  1 bfisher software 3095 Aug 25
> > 2009 ./Includes/smp-api.h
> >
> >             The only file I have open is includes/cg/SSC/smp-api.h
> >             for the SSC deeamon compilation cases.
> > > Rpc.h:
> > >
> > > 46: remove, don't comment deleted code.
> >
> >             done.
> > >
> > > 115: NFP_FP is defined for all the code, so this #ifdef is
> > > pointless along with the comment
> >
> >             This header file IS used to compile the TXRX and the SSC
> > code and hence
> >             without this "ifdef" lots of additional headers must be
> >             included when they are not needed.
> >
> >             The whole port waiters
> >             scheme is not required for the FP case.
> >             If you are waiting/listening on a port
> >             the Linux socket code will handle that case
> >             and not this code. If you have exhausted the
> >             IP 16-bit port space, this code will not handle
> >             that case either since it is not in control
> >             of the port number allocation.
> >
> >             The CIFS/NFS/NETBIOS listener schemes will follow Linux
> >             networking conventions and will handle the connection
> >             accept, the creation and initialization of new
> > connections and the initialization of the virtual server.
> >
> >             I left the following in, but doubt it will be used.
> >
> >          /* The list of requests which are waiting for GETPORT
> > result */
> >          req_wait_queue_t get_port_waiters;
> >
> >
> > >
> > > 147: struct. Don't use void * if there is only one possible
> > > structure referenced through the pointer.
> > >
> > > 153: struct
> > >
> > > 173, 176: struct
> > >
> > > 183: NFP_FP is defined
> > >
> > > Undo changes to comment format.
> > >
> > > Xdr.h:
> > >
> > > Most of changes to this file are pointless. Why move the
> > > definition of XDR and replace all references? Does not change
> > > anything
> >
> >             The old code of typedef XDR XDR and XDR * all over the
> > place is rather pointless, confusing and messy to say the least.
> >             These at least make it clear:
> >
> >             new: typedef struct _xdr XDR;
> >
> >             old: typedef XDR XDR;
> >
> > >
> > > Defs.mk:
> > >
> > > File was not resolved correctly
> >             resolved.
> > >
> > > 211: Why would you remove -DNETEEE_FRAGMENT? It was supposed to be
> > > defined
> >
> >             Fixed.
> >
> >             Nearly every protocol implementation that does
> >             fragmentation and reassembly does NOT compile the
> > protocol stack with this as a compilation option. The packets
> > specify that they are fragmented or the interface specifies
> >             that no fragmentation should NOT happen on transmit.
> >             Look at the IP fragmentation options, DECNet, etc.
> >
> >             Who ever did this in the first place was missing the
> > boat and ignorant of networking protocols.
> >
> >             It hasn't been changed but the SSC compiles things with
> >             this off and all of the inlines had to be fixed so the
> >             prototypes were correct.
> > >
> > > Anpssc-api.h:
> > >
> > > 27: useless comment
> >
> >             Removed BUT it was only required for the timers as the
> > comment stated.
> > >
> > > 31: don't put this "originally in" comments everywhere. They don't
> > > help reading the code at all.
> >
> >             I didn't add that, so blame somebody else, I removed
> > them.
> > >
> > > Author-api.h:
> > >
> > > 28: prototypes should be in header files
> > >
> >
> >             I presume you are talking about crc32_checksum().
> >             This is defined in code/sm-libc/libc.h
> >             however the author-includes.h header file
> >             does not include that one. I added it.
> >
> >             This is another instance where some of the
> >             code uses "author-includes.h" and other
> >             code in the same directory does not.
> >
> > > Author-cmd.c:
> > >
> > > 2523: this is not how you keep compiler happy. Use correct format
> > > character.
> >
> >             This was the original code. I changed to "%uc" since the
> >             sid->revision is uint8 in authen-struct.h
> > >
> > > Author-sec.c:
> > >
> > > 38: function prototypes should be in header files.
> >
> >             The definition of:
> >
> > extern void
> > cifs_access_token_free(sec_cifsAccessTokenFrag *tok, vs_t *p_vs);
> >
> > extern int32
> > cifs_access_token_sort_groups(sec_cifsAccessTokenFrag
> > *destAccessTok);
> >
> > are in: sm-cifs/cifs-smb-common.h
> >
> > which Andy commented out. I restored it. Fixed.
> >
> > >
> > > Author_stats.h:
> > >
> > > 253: There are eee_printf() and FMT64 definitions in nfx-defs.h,
> > > use those.
> > >
> >        LARRY: No definition found for eee_printf() in the dev branch
> > with cscope. I did find EEE_PRINTF in code/sm-eee/eee.h but it is
> > just:
> >
> > #if defined(EEE_DEBUG)
> > #define EEE_PRINTF(x) printf x
> > #else
> > #define EEE_PRINTF(x)
> > #endif
> >
> >             We will come-up with  a general solution, and covert to
> > that. This problem exists in several code files and I don't
> >             think adding it to nfx-defs.h is the right place.
> >             It needs __KERNEL__ and SSC ifdefs to get the right
> > cases.
> >
> > sm-utils/cmd-utils.c:#define FMT64 "ll"
> > sm-utils/cmd-utils.c:#define FMT64 "l"
> > sm-utils/cmd-utils.c:    CMD_PRINT("user read(fp)     %7d   %8d
> > %9"FMT64"u   %9"FMT64"u   %9"FMT64"u   %11"FMT64"u  "
> > sm-utils/cmd-utils.c:           " %11"FMT64"u\n",
> > sm-utils/cmd-utils.c:           "                  %11"FMT64"u\n",
> > sm-utils/cmd-utils.c:    CMD_PRINT("meta read(fp)     %7d   %8d
> > %9"FMT64"u   %9"FMT64"u   %9"FMT64"u   %11"FMT64"u  "
> > sm-utils/cmd-utils.c:           " %11"FMT64"u\n",
> > sm-utils/cmd-utils.c:           "                  %11"FMT64"u\n",
> > sm-utils/cmd-utils.c:    CMD_PRINT("write(fp)         %7d   %8d
> > %9"FMT64"u   %9"FMT64"u   %9"FMT64"u   %11"FMT64"u  "
> > sm-utils/cmd-utils.c:           " %11"FMT64"u\n",
> > sm-utils/cmd-utils.c:           "                  %11"FMT64"u\n",
> > sm-utils/cmd-utils.c:    CMD_PRINT("meta write        %7d   %8d
> > %9"FMT64"u   %9"FMT64"u   %9"FMT64"u   %11"FMT64"u\n",
> > sm-utils/cmd-utils.c:    CMD_PRINT("cmd relay         %7d   %8d
> > %9"FMT64"u   %9"FMT64"u   %9"FMT64"u   %11"FMT64"u\n",
> > ssc-rmc/rmc_rpc_api.c:#define FMT64 "l"
> > ssc-rmc/rmc_rpc_api.c:#define FMT64 "ll"
> > ssc-rmc/rmc_rpc_api.c:            rmc_printf(RMC_WARN, "%s: no
> > matched tag %"FMT64"x from %s\n",
> > ssc-rmc/rmc_rpc_api.c:               "%s: forward msg[%p]
> > tag[0x%"FMT64"x] to %s queue_sz(%d)",
> >
> >
> > Larry has suggested inttypes.h which is pretty general and
> > in in the /user/mipsel include directory. He is looking
> > into a general solution to the 32 vs 64 bit compilation
> > differences between the TXRX/FP and SSC worlds.
> >
> > In the meantime, things compile correctly for both cases.
> >
> > We can convert it when Larry proposes something more general.
> >
> > > cifs-conn-struct.h:
> > >
> > > Lines > 80 characters.
> > >
> > > 116: why change this, now you have to change all the code that
> > > references the acpu_conn fields,
> >     > and not in a good way. Just undo your changes to this file
> >     > below the includes line, none of them should are necessary.
> >     >
> >
> >             Having unamed structure names embedded in other
> > structures which requires unique names is not standard for any
> > flavor of Linux or Unix kernels or C coding standards that I have
> >             ever used in any large project.
> >
> >             I have already converted all of the instances that
> > reference fields in the acpu_conn
> >             structure. I have left ALL  of the other cases alone
> > since they are used all over the place and that would cause
> >            un-necessary change.
> >
> >            Since the connection block AND the bind block are now
> >            embedded in the acpu_conn structure,
> >            just like you requested, there are lots of fields that
> >            don't require unique names, so it is just good
> > programming to explictly reference which field you are
> >            accessing. The only most heavily used is the "raddr"
> >           field buried in the bind block. It is far easier to
> > explictly reference the field name
> > acpu_conn.tblConnCb.tplBindCb.raddr that having the compiler guess
> > in order to get the correct offset. It also
> >            makes the code cleaner and all of the TPL code follows
> >            the using standard structure field selection names.
> >
> >             The other wholesale uses in the code of that feature
> >             have NOT been touched, however this one has since
> >             it is all new code to implement the TPL API
> >             using standard sockets, I chose to use standard
> >           conventions.
> > >
> > > Cifs-rpc-ed-hdr.c:
> > >
> > > I've replaced uchar8 with uint8, why change it back. You are not
> > > doing p4 sync/resolve correctly.
> > >
> >             Fixed.
> >
> > > Cifs-rpc-srvsvc.c:
> > >
> > > 995: redundant return
> > >
> > > 2285: unnecessary changes
> > >
> >             No, these fixed the infamous ISO C90 warnings.
> >
> >             "warning: ISO C90 forbids mixed declarations and code"
> >
> >             I have no preference but since -Wall is defined I have
> >             fixed lots of these. The scoping was not being
> >             used.
> >
> >             The FSM code in CIFS/NFS has LOTS of warnings
> >             for "int _did_block_;" declarations that is
> >             sometimes later checked. These
> >             were left alone since it wasn't clear how
> >             to fix them and since the code repeatedly uses
> >             that same pattern all over the place.
> >
> >             The state machine code could have been smarter
> >             than the simple switch template it follows.
> >
> > > 2989: should not need changing this
> > >
> >             reverted to the old symbol ACPU_CONN_PSEUDO
> >
> > > Cifs-rpc-utils.c:
> > >
> > > Use eee_printf()
> >
> >             See above on the general solution, we will convert
> >            to that when Larry defines it. Right now all the
> >            code compiles fine with the current defines
> >            for both SSC and TXRX.
> > >
> > > Cifs-rpc-winreg.c:
> > >
> > > Uchar8 changes
> > >
> >             resolved.
> >
> > > Cifs-rpc-wkssvc.c:
> > >
> > > 182: unnecessary changes.
> >
> >             Fixes a warning that the compiler issued
> >             on potentially uninitialized variable.
> >             Since it doesn't hurt.
> > >
> > > Cifs-rpc.c:
> > >
> > > 73: Use eee_printf()
> >
> >             See above solution description. We'll convert
> >            when Larry describes the general solution.
> >            It compiles correcctly for all cases now.
> > >
> > > Uchar8 changes
> >
> >             resolved.
> > >
> > > Cifs-brlock.c:
> > >
> > > 57: function prototypes must be in include files.
> > >
> >            fixed.
> >
> >             Warnings like these persist, due to the fact
> >            that the macro definitions are not clean.
> >
> >             code/sm-cifs/cifs-brlock.c:679:
> >             "warning: ISO C90 forbids mixed declarations and code"
> >
> > > Cifs-conn-api.h:
> > >
> > > 34, 373: function prototypes must be in include files.
> > >
> >           fixed.
> >
> > > 752: redundant return
> >
> >           I removed it just for you. It was harmless.
> > >
> > > Cifs-conn.c:
> > >
> > > 57: function prototypes must be in include files.
> > >
> > > 734: should call acpu_conn_init()
> > >
> >           fixed.
> >
> > > 741: useless comment
> > > 742: cast is redundant
> > > 747: useless comment
> > >
> >           removed just for you.
> >
> > > 789: should call acpu_conn_init()
> > >
> >           restored.
> > > 989: unnecessary changes
> > >
> >           I restored them just for you. They
> >           were equivalent and used only a single
> >           return statement rather than two.
> >
> > > 1065: don't just comment out code
> >
> >           I restored them even though the
> >           Virtual server maintains it's
> >           own reference count. Also the
> >           acpu_conn structure cannot
> >           be deallocated from the socket
> >           by this code, since it is not
> >           under it's control. The only
> >           things that can be deleted are
> >           allocated structures inside the
> >           cifs-conn and nfs_conn structures.
> > >
> > > 1292: don't comment out code. The change should not be necessary.
> >
> >           maintaining two interfaces to send packets is
> >           redundant. Since pkt_acpu_send() is equivalent
> >           to calling pkt_send() with the same arguments
> >           they are equivalent.
> >
> > >
> > > 1521: huh? Refcnt should be maintained here, session has a pointer
> > > to connection, should have a reference.
> > >
> >
> >           The ref count on the "ctx->ccdc_conn" ?
> >
> >           That is not the way Rendell has done this
> >           since the CIFS connections are NOT hung off
> >           the conenction block structures as before.
> >          They now hang off the VS structure and the VS
> >          now implements the shutdown cleanup of
> >          all open connections associated with a VS
> >          by walking thiss list and handling the
> >          parent-child relationship.
> >
> >           Hence the code:
> >
> >           //
> >            // The list of active cifs connections is NO
> >            // longer hung off the acpu connection data structure of
> > old // Must do something here.
> >            //
> >            conn_next =3D (cifs_conn_t *)BSD_LIST_NEXT(ctx->ccdc_conn,
> >                   ac_vs_entry);
> >
> >           I put it back, however Rendell can fix this and remove the
> >           vs list from the connection block.
> >
> >           He has already done this in his version.
> >
> > > 1547, 1548: undo formatting changes
> > >
> > > 1576: The return value is unused
> >
> >             However the pkt_send() DOES return an
> >             error indication which is what is being
> >            saved.
> >             The pkt_send() procedure SHOULD return a status
> >             value and NOT void. Saving the return value
> >            is fine. pkt_send() can fail for a number of
> >           reasons, and this should be checked.
> >           However the CIFS and NFS code XXX_conn_send()
> >           returns a void. This is weak error recovery
> >           and should be fixed.
> >
> >             The callers include:
> >
> > code/sm-cifs/cifs-conn.c:cifs_conn_send(cifs_conn_t *conn,
> > code/sm-cifs/cifs-req.c:        cifs_conn_send(conn, packet, NULL);
> > code/sm-cifs/cifs-req.c:         * to the client by calling
> > cifs_conn_send().
> > code/sm-cifs/cifs-req.c:   /* Make the queue empty before calling
> > cifs_conn_send. If the
> > code/sm-cifs/cifs-req.c:    cifs_conn_send(cifs_req_conn(req), pkt,
> > req); code/sm-cifs/cifs-trans-util.c:
> > cifs_conn_send(cifs_req_conn(req), req->cr_smb_response.pq_head,
> > NULL); code/sm-netbios/nb-ss.c:    cifs_conn_send(conn, pkt, NULL);
> > code/sm-oplock/oplock-api.c: *          cifs_conn_send();
> > code/sm-oplock/oplock-api.c: *          cifs_conn_send();
> > code/sm-oplock/oplock-api.c:    cifs_conn_send(cifs_conn_p, pkt,
> > NULL); code/sm-oplock/oplock-api.c:    cifs_conn_send(cifs_conn_p,
> > pkt, NULL);
> >
> >
> >             The API is wrong but has remained as it was, since
> >            changing it will require some serious editing.
> > >
> > > 1579: useless comment
> > >
> > > 1959: don't comment out code that is not fixed
> > >
> >             fixed.
> >
> > > Cifs-csn.c:
> > >
> > > 58: function prototypes must be in include files.
> > >
> >             fixed.
> >
> > > Cifs-kerb.c:
> > >
> > > 58: function prototypes must be in include files.
> > >
> >             Added sm-eee/eee-app.h
> >
> > > Cifs-negotiate.c:
> > >
> > > 56: function prototypes must be in include files.
> > >
> >             fixed.
> >
> > > Cifs-ntlmv2.c:
> > >
> > > 82: unnecessary change
> >
> >             Using a named acpu_conn structure element is
> >             considerably clearer than looking at the
> >             nested structures looking for ac_XXX,
> >            such as ac_flags, av_vs, ac_type and the
> >            like.
> >
> >             This works for ac_flags and ac_vs which
> >             are at the top, however all of the
> >             raddr and other accessed fields are buried
> >             down below in the bind block, etc. These
> >            are two structures down and are considerable
> >            cleaner to simply reference.
> > >
> > > Cifs-read-write.c:
> > >
> > > 272, 323, 343: useless comment
> >
> >             removed, but the comments added clarity.
> > >
> > > Cifs-req-api.h:
> > >
> > > 43: function prototypes must be in include files.
> > >
> >             fixed.
> >
> > > Cifs-req.c:
> > >
> > > 111: extern variables and function prototypes must be in include
> > > files.
> > >
> >           These global variables are defined in the kernel.
> >           The external procedures were added to pkt-queue-api.h.
> >
> >           The globals:
> >
> >           extern uint32 nfxMyCPUId;
> >           extern uint32 nfxMySlotId;
> >
> >           should be converted to constants since
> >           this is the txrx case only. What did
> >           you convert them to on the FP side?
> >
> > > 1621: unnecessary change
> >
> >          I added:
> >          #endif /* CIFS_DONT_FREE_REQUESTS */
> >
> >          versus
> >          #endif
> >
> >          This definitely adds clarity since this
> >          code has lots of ifdef's
> >
> > > 2077: useless comment
> >       /* If command is an ANDX command, then we set a flag
> >        * indicating the same
> >        */
> >
> >          I didn't add nor remove that. I left it unchanged.
> >
> > > 2085: code commented out
> > >
> >          What a blank line was removed?
> >
> > > Cifs-search.c:
> > >
> > > 17: I'm getting tired of seeing the same list of include files
> > > everywhere. This likely means that your include files are not
> >   > organized correctly. Include files should include everything
> >   > they need for their own compilation.
> > >
> >           Editoral comment. That statement is not true having spent
> > 7+ weeks looking at the headers. The headers are all over
> >          the map with respect to "including everything they need".
> >          One of the reasons the headers are so intertwined
> >          is a over-use of including everything.
> >
> >          Andy's hours of editing has removed lots these
> >          extraneous includes. The warnings and other
> >          undefined prototypes and undefined externs
> >          has required some of them to be put back.
> >
> >          We are at a happy medium these days. If we
> >          were to start over, we could rework them.
> >
> >          Having fs-include.h include over 50+ other header
> >          files, so that is has everything it needs is
> >          overkill in the other direction.
> >
> >          The fs-includes.h file removes any prospect of
> >          information hiding between the header file layers
> >          and code isolation. Having the disk block allocation
> >          code know about the attribute format is not required
> >          and just introduces opportunity for error.
> >
> >          Finding the exact disk file format is another hidden
> >          question, since it isn't immediately obvious.
> >
> >          We are all working toward the same goal, it just
> >          might take lots of steps to get there.
> >
> > > Cifs-sess-setup.c:
> > >
> > > 62: function prototypes must be in include files.
> >           Fixed, by including <sm-eee/eee-app.h>
> > >
> > > Cifs-smb-attributes.c:
> > >
> > > 115: function prototypes must be in include files.
> > >
> >           fixed.
> >
> > > 4208: useless comment
> >
> >
> > /* Validate the inputs.
> >         */
> >
> > >    what ?
> >
> >
> > > Cifs-smb-linkrename.c:
> > >
> > > 338: unnecessary change
> > >
> >           equivalent.
> >
> > > cifs-tcon.c:
> > >
> > > 823: unnecessary change
> > >
> >           Equivalent, put it back to make you happy.
> >
> > > 1011: unnecessary change
> > >
> >           cifs_tree_connect_verify_server_name
> > > Cifs-trans-common.c:
> > >
> > > 55: function prototypes must be in include files.
> > >
> >           fixed.
> >
> > > Cs-api.c:
> > >
> > > 55: function prototypes must be in include files.
> >
> >           added
> >           #include <sm-vsvr/vs-api.h>
> >
> > >
> > > Dcache-display.c:
> > >
> > > 57, 286, 355: function prototypes must be in include files
> > >
> >
> >           added dcache-stats.h as somebody deleted it.
> >           They both are in-lines.
> >
> >           extern uint32 eee_getAvailableNbrOfBufs(uint32 buf_size);
> >
> >           This is defined in:
> >
> > smoo-linux/linux-stubs.c:size_t eee_getAvailableNbrOfBufs(int type)
> > smoo-linux/linux-stubs.c:EXPORT_SYMBOL(eee_getAvailableNbrOfBufs);
> >
> >           and there is NOT and smoo-linux/liux-stubs-api.h header
> > file.
> >
> > > Dcache-hash.c:
> > >
> > > 65: GFP_ATOMIC means __GFP_HIGH
> >
> >              /* Create global hash table for file data
> >                   (not directory data)
> >         */
> >        dcacheHash =3D kzalloc(DCACHE_HASH_NUM_BUCKETS *
> > sizeof(dcacheHash_t), (GFP_ATOMIC | __GFP_HIGH));
> >        return;
> >
> >
> >           Yes, this can be reduced to a single flag.
> >
> >               /* Create global hash table for file data (not
> > directory data) */
> >        dcacheHash =3D kzalloc(DCACHE_HASH_NUM_BUCKETS *
> > sizeof(dcacheHash_t), GFP_ATOMIC);
> >
> > >
> > > 66: redundant return
> >
> >           nit.
> > >
> > > 707: do not remove asserts
> > >
> >
> >           This ASSERT fails co compile, since ASSERT's are now
> >           turned on and the field no longer exists.
> >
> >                 // ASSERT(dcp =3D=3D
> > dcp->dc_fcb->fcb_dcache.dcachePtr.lh_first);
> >
> >           The fdb_dache.dcachePtr no longer exists:
> >
> >
> > typedef struct dcache_s {
> >
> >        /* The file context block of the file/dir associated with
> > this data.  We
> >         * do NOT hold a reference on the FCB.  We do not want to
> > prevent the FCB
> >         * from being recycled.
> >         */
> >        struct fcb_s *dc_fcb;
> >
> >           from the definition of fcb_s we find:
> >
> >       /* The next entry in the linked list of data cache structures
> > for
> >         * this file.  These structures are of type dcache_t.  This
> > is the head
> >         * of the list.  A reference is NOT held on this structure by
> > the entries
> >         * in this list, if the FCB is not marked dirty, we do not
> > want them to
> >         * prevent the FCB from being recycled. If the FCB is dirty,
> > the reference
> >         * to the FCB would be released once we have dcache is
> > committed. */
> >            BSD_LIST_HEAD(, dcache_s) fcb_dcache;
> >
> >           The ASSERT is WRONG/BROKEN as there is no dcachePtr field
> >           in the BSD_LIST_HEADER macro defined in bqueue.h
> >
> >           I will try and convert it to:
> >
> >           ASSERT(dcp =3D=3D dcp->dc_fcb->fcb_dcache.lh_first);
> >
> > > Dcache-rx.c:
> > >
> > > 61: function prototypes must be in include files
> > >
> >
> >           I don't know about MUST. I added
> >           #include <sm-eee/eee-app.h>
> >
> > > Dcache-struct.h:
> > >
> > > 215: comment format
> > >
> >
> >           Removed the extra line:
> > /* Context structure for req_copy_dcaches().
> >     * Moved from pkt-queue-struct.h header file
> >     * to heere since it's more appropriate to be
> >     * with the dcache structures.
> >     */
> >
> >
> > > Dcache-tune.c:
> > >
> > > 54: function prototypes must be in include files
> > >
> >
> >           The following are defined in smoo-linux/linux-stub.c
> >           and have NO equivalent header file.
> >
> > extern uint64 eee_getAvailableNbrOfBufs(int32 buf_size);
> > extern uint64 eee_getTotalNbrOfBufs(int32 buf_size);
> > extern uint64 eee_getAvailableNbrOfDescs(void);
> >
> >
> > > 216: redundant return
> >
> >           nit, I removed it to keep you happy.
> > >
> > > Dcache-tx.c:
> > >
> > > 56: function prototypes must be in include files
> > >
> > > Ea-evm.c:
> > >
> > > 26: Strlcpy is in string.h
> >
> >            No, sorry I tried that. It is in sm-libc/libc-api.h
> >            since it is something created here. Adding string.h
> >            does not solve the warnings.
> > >
> > > Evm-cfgd-rx.c:
> > >
> > > 28: include something.
> > >
> >
> >           fixed, via adding #include "../sm-libc/libc.h"
> >
> > > Evm-cfgd.c:
> > >
> > > 30: include something
> > >
> >
> >           same as above.
> >
> > > Evm-db.c:
> > >
> > > 27: include
> > >
> >
> >           same as above.
> >
> > > Evm-diag.c:
> > >
> > > 27: include
> > >
> >           same as above.
> > > Evm-event.c:
> > >
> > > 33: include
> > >
> >           same as above.
> > > Evm-sdm.c:
> > >
> > > 19: include
> >
> >           same as above.
> > >
> > > Evm-spm.c:
> > >
> > > 27: include
> >
> >           same as above.
> > >
> > > Evm-util.c:
> > >
> > > 57: include
> >
> >           same as above.
> > >
> > > Fs-dnlc.c:
> > >
> > > 21: include
> >
> >           memsize_const() was defined in:
> >
> >           sm-sb1250/mem-api.h:memsize_const(uint64 c_1gb,
> >
> >           which no longer exists and was NOT ported over.
> >
> > >
> > > Cstring.c:
> > >
> > > 23: useless comment
> >
> >           unknow history, but probably true.
> >           I removed it to keep you happy.
> > >
> > > Icu_onstor.c:
> > >
> > > 42: Unnecessary changes
> > >
> >           wrong required to get it to compile
> >           under both SSC and TXRX.
> >
> >           See long back comment on eee_print()
> >           which does NOT do the proper thing.
> >
> >           Can be converted with Larry's new scheme;
> >
> > #ifdef __KERNEL__
> > #define ICU_PRINT(_fmt, ...) printk(_fmt, ##__VA_ARGS__)
> > #else
> > #define ICU_PRINT(_fmt, ...) printf(_fmt, ##__VA_ARGS__)
> > #endif // __KERNEL__
> >
> >
> > > Lock.c:
> > >
> > > 61: include
> > >
> >
> >           See previous comment on no equivalent.
> >
> > > Nb-ss.c:
> > >
> > > 65: include
> > >
> >           fixed.
> >
> > > 285: undo formatting changes
> > >
> >           very minor nit:
> >
> >        } else { /* Remember client name */
> >
> > versus:
> >
> >       } else {
> >            /* Remember client name.
> >             */
> >
> >           You are now arguing CR
> >           versus blank!
> >
> > > 295: redundant return
> > >
> >
> >           Removed just to please you.
> >
> > > Nb-tpl.c:
> > >
> > > 56: include
> > >
> >
> >           The definitions of:
> > static inline uint32
> > pkt_raddr(pkt_desc_t *pkt,
> >              int direction,
> >              int path,
> >              int protocol_flags)
> > {
> >        ASSERT((pkt->flags & PKT_INPUT) =3D=3D direction);
> >        if (direction =3D=3D PKT_INPUT) {
> >            return ((uint32 *)pkt_ip(pkt,
> >                                     PKT_INPUT,
> >                                     path,
> >                                     protocol_flags))[3];
> >        } else {
> >            return ((uint32 *)pkt_ip(pkt,
> >                                     PKT_OUTPUT,
> >                                     path,
> >                                     protocol_flags))[4];
> >        }
> > }
> >
> >
> > have no linux equivalent and this code needs
> > to be reworked for finding the raddr from the
> > skb.
> >
> > Adding an include is not solving the problem here
> > since these need to interrogate the
> > skb to get the header location, etc.
> >
> > In fact Rendell and I are reworking the
> > aclling api sinc the follwing is not valid
> > under linux.
> >
> > void
> > nb_tplNsRcvPktInd(void *app_handle,
> >                      pkt_desc_t *pkt,
> >                      void *pHdr,
> >                      uint64 tval)
> > {
> >        vs_t *vs =3D NULL;
> >        vs_if_t *ifP =3D NULL;
> >        nb_srvCB_t *srvCbP =3D NULL;
> >        boolean keepTplConn =3D FALSE;
> >        tpl_connCb_t *conn =3D (tpl_connCb_t *)(pkt->pTplConn);
> >        uint32 raddr;
> >        uint16 rport;
> >
> >        nb_globalCfg.dbgCounters.nb_tplRcvPktInd++;
> >           .............
> >
> >
> >
> > > 98: unnecessary change
> > >
> > > 178: unnecessary change which changes the logic
> > >
> > The previous version was:
> >
> >        /* Note: In case of a broadcast packet, then the connection
> > Indication
> >         *       routine is not called but packet is directly
> > delivered.
> >         *       In this case the app_handle is NULL but
> > pdesc->pTplConn contains
> >         *       the bindCb.
> >         */
> >        if (pkt->flags & PKT_BROADCAST) {
> >            if (((tpl_bindCb_t *)pkt->pTplConn)->laddr !=3D 0) {
> >               /* Received broadcast packet on unicast port, drop it.
> >                 */
> >
> >                goto nb_tplNsRcvPktInd_done;
> >
> >
> >           The reworked version is:
> >
> >        if ((pkt->flags & PKT_BROADCAST) && (conn->bindCb.laddr)) {
> >               /* Rcv bcast pkt on unicast port, drop it */
> >                goto nb_tplNsRcvPktInd_done;
> >        }
> >
> >
> >           Neither of these are correct since you are NOT told
> >           that the packet is a BROADCAST one via the sbk
> >           header flags. You have to get the IP address
> >           and the device flags in order to determine
> >           if the packet received was a broadcast one.
> >
> >           You also have to check if any of the IP address
> >           alias'es associated with the interface may
> >           match the IP address in the header.
> >
> >           Are saying that the laddr in the bind
> >           block is not the same as the previous one
> >           in the connection block?
> >
> >           The connection
> >           block is not the truth under linux only
> >           the socket information which is copied
> >           into the bind block for the local IP
> >           address that is bound to the socket.
> >
> > > Nb-util.c:
> > >
> > > 57: include
> > >
> >           removed.
> >
> > > Ncp-api.c:
> > >
> > > 60: include
> > >
> >           removed.
> > > 1310, 1672: don't comment out code
> > >
> >           // atomic_inc(&txrx_requests_pending);
> >           in both cases.
> >
> >           This is NOT an atomic variable any more
> >           and has been moved into the VS code;
> >
> > bfisher-linux: 20338>grep txrx_requests_pending */*.h
> > sm-vsvr/vs-struct.h:    uint32 txrx_requests_pending;
> >
> > bfisher-linux: 20340>grep txrx_requests_pending */*.c
> > sm-nfs/ncp-api.c:                //
> > atomic_inc(&txrx_requests_pending); sm-nfs/ncp-api.c:            //
> > atomic_inc(&txrx_requests_pending);
> >
> > sm-nfs/nfs-proc.c:    while
> > ((atomic_inc_return(&txrx_requests_pending) >
> > sm-nfs/nfs-proc.c:        atomic_inc(&txrx_requests_pending);
> > sm-vsvr/vs-api.c:        rsp->req_stats.txrx_requests_pending =3D
> > txrx_requests_pending; ssc-nfxsh/cmd_stats.c:    printf("REQ
> > PENDING       %u\n", rsp.req_stats.txrx_requests_pending);
> >
> > This is an OPEN issue in the VS code as per the comment
> > in vs-api.c. This is Rendell's problem to solve.
> >
> > static void
> > vs_proc_get_stats_summary_req(rmc_msg_t *req_msg, rmc_msg_t
> > *rsp_msg) {
> >
> > ---------------
> >
> > I left in the increments. It is also not clear why they
> > have to be atomic? You have no interrupts, they variable
> > is not incremented in an interrupt handler nor interrogated
> > by any upper level software.
> >
> > In face it is only put into the rsp->req_stats structure
> > and printed out in the ssc-nfxsh/cmd-stats.c code.
> >
> > Also this is simply and kpi type statistic:
> >
> > static void
> > ncp_volume_event_handler(nfx_eventMsg_t *msg)
> > {
> >        vol_event_t *ev =3D &msg->param.volEvent;
> >        if (ev->event =3D=3D EVENT_VOL_ONLINE) {
> >            nfs_request_t *req =3D nfs_req_alloc();
> >            if (req !=3D NULL) {
> >                nfs_req_init(req, NULL, NULL);
> >                kpi_start(&req->rh_kpi, KPI_TOP,
> > KPI_NCP_VOLUME_EVENT); atomic_inc(&txrx_requests_pending);
> >
> >                req->rh_state =3D NCP_VOLUME_EVENT_0;
> >                req->nr_volId =3D ev->volId;
> >                req_add_to_active_queue(req, REQ_PRIORITY_WAKEUP);
> >            }
> >        }
> > }
> >
> >
> > > Nfs-conn-api.h:
> > >
> > > 196: unnecessary change
> > >
> >
> >           Line is: "Routine Description:"
> >
> > > 224: need refcnt on the connection structure
> > >
> > > 290, 484: include
> > >
> > > 490: should not need to change this
> > >
> >
> >           This is an open issue;
> >
> >           You can NOT hange the list of open
> >           requests off the socket acpu_conn
> >           structure, since this does not have
> >           global aware-ness. The socket is
> >           local to the process and can go
> >           away at any time.
> >
> > static inline void
> > nfs_conn_remove_pending_request(nfs_conn_t *conn, nfs_request_t
> > *req) {
> >        acpu_conn_remove_pending_request(&conn->acpu_conn,
> > (any_acpu_conn_ptr_t)req);
> > #ifdef LATER
> >        if (BSD_LIST_EMPTY(&conn->ac_pending_requests)) {
> >            acpu_conn_has_become_idle(conn, nfs_conn_timeout(conn));
> >        }
> > #endif /* LATER */
> > }
> >
> >           The nfs_conn_t structure with the ac_pending_request
> >           list was maintained until a solution is determined.
> >
> >           The scanning of the socket table for idle connections
> >           is fine, so the IDLE/ACTIVE flags are being maintained
> >           in the acpu_conn block. However we need a workable
> >           solution to the closing the idle connections problem
> >
> >           These data structures are not going to work.
> >
> >           I you want to maintain a list of active requests
> >           sorted by active sockets that is fine, but they
> >           acpu_conn structure which now hangs off the Linux
> >           socket is not the place to do this.
> >
> >           We will have to work out a solution.
> >
> > > Nfs-conn-struct.h:
> > >
> > > There should not be any changes in this file.
> >
> >           I added the new includes and a compilation
> >           legth check.
> > >
> > > Nfs-conn-init.c:
> >
> >           The file is nfs-conn.c: nfs_conn_init() is the procedure;
> >
> >           Also the code does not zero out the rpc_client space
> >           since that is required;
> >
> >           The old code was:
> >
> > void
> > acpu_conn_init(any_acpu_conn_ptr_t conn,
> >                   struct vs_s *vs,
> >                   enum acpu_conn_type type)
> > {
> >        ref_set_if(conn.v, ac_vs, vs_hold_if(vs));
> >
> >        switch (type) {
> >        case ACPU_CONN_TYPE_CIFS:
> >        case ACPU_CONN_TYPE_PSEUDO_CIFS:
> >            vs_addCIFSConn(conn.v->ac_vs, conn.cifs);
> >            break;
> >        case ACPU_CONN_TYPE_NFS:
> >        case ACPU_CONN_TYPE_PSEUDO_NFS:
> >            vs_addNFSConn(conn.v->ac_vs, conn.nfs);
> >            break;
> >        case ACPU_CONN_TYPE_RPC:
> >            break;
> >        default:
> >            VERIFY(0);
> >            break;
> >        }
> >        conn.v->ac_type =3D type;
> >
> >        LIST_INIT(&conn.v->ac_pending_requests);
> >
> >        switch (type) {
> >        case ACPU_CONN_TYPE_PSEUDO_CIFS:
> >        case ACPU_CONN_TYPE_PSEUDO_NFS:
> >            conn.v->ac_flags =3D ACPU_CONN_PSEUDO;
> >            conn.v->vsid =3D conn.v->ac_vs->vs_id;
> >            conn.v->pSock =3D NULL;
> > #ifdef UNIT_TEST
> >            conn.v->ac_pseudo_send =3D NULL;
> > #endif
> >            break;
> >        default:
> >           .............
> > }
> >
> > >
> > > 215: acpu_conn_init(). Should not need to change any of this code
> > > really
> > >
> > > Undo comment format changes
> > >
> >
> >           The ac_pending_request is broken since that
> >           needs to be moved somewhere else rather
> >           than the socket sk_user_data area.
> >
> >           The whole list of pending requests
> >           for any given socket was fine in your
> >           EEE world but that won't work for the
> >           Linux socket scheme.
> >
> >           A new set of global structures for this
> >           type of operations need to be created.
> >
> >           We need a discussion about this.
> >
> > > 1411: don't comment out code.
> > >
> >           fixed as per the vs-> pointer manipulation scheme.
> > > 1528: include.
> > >
> > > Nfs-dupcache.c:
> > >
> > > 63: include
> > >
> > > Nfs-global.h:
> > >
> > > 67: how is that not acpu_conn or nfs_conn?
> > >
> > > Nfs-monitor-api.c:
> > >
> > > 85: include
> > >
> > > Nfs-open.c:
> > >
> > > 183: unnecessary change
> > >
> > > Nfs-proc.c:
> > >
> > > 76: duplicate code, use #include
> > >
> > > 81: include
> > >
> > > 4873: useless comment.
> > >
> > > 5602, 5710, 5958: unnecessary changes
> > >
> > > 6181: unnecessary change, how can ac_vs ever be NULL
> > >
> > > 6192: redundant return
> > >
> > > Nfs-reply.c:
> > >
> > > 66: include
> > >
> > > 223, 5322: useless comment
> > >
> > > 5355, 6907: undo formatting  change
> > >
> > > 7419: unnecessary change
> > >
> > > 7613: change should not be necessary
> > >
> > > Nfs-req-api.c:
> > >
> > > 55: include
> > >
> > > Undo comment format changes
> > >
> > > 131: there is no destructor. Linux allocator does not allow
> > > destructors.
> > >
> > > Nfs-req-struct.h:
> > >
> > > 127: undo comment format change
> > >
> > > Nfs-stats.c:
> > >
> > > Undo formatting changes
> > >
> > > Nfs-stats.h:
> > >
> > > 31: remove don't comment out
> > >
> > > Ns-api.c:
> > >
> > > 54: include
> > >
> > > Undo comment format changes
> > >
> > > 810: ?? This is not socket receive function.
> > >
> > > 3974: don't comment out code
> > >
> > > 3980: don't comment out code
> > >
> > > 4511: no this is not socket receive function
> > >
> > > Ns-api.h:
> > >
> > > 440: how is that code ifdef later? What did you break that it does
> > > not compile anymore?
> > >
> > > Rpc.c:
> > >
> > > 57: include
> > >
> > > Undo changes to comment format
> > >
> > >
> > > Fcb-api.h:
> > >
> > > 427: include
> > >
> > > Ofh-api.c:
> > >
> > > 62: include
> > >
> > > 438, 511: this is wrong
> > >
> > > 668: does not make sense, hanging from linux socket does not
> > > remove the need for reference count.
> > >
> > > 2777: wrong
> > >
> > > Open-api.c:
> > >
> > > 58: include
> > >
> > > 80: include
> > >
> > > Vcb-api.c:
> > >
> > > 84, 217, 221: include
> > >
> > > Oplock-api.c:
> > >
> > > 1290: need reference counting on connections
> > >
> > > Req-queue-api.c:
> > >
> > > 224, 255, 741 : don't comment out code. This needs to be
> > > implemented eventually
> > >
> > > Req-queue-api.h:
> > >
> > > 221: Should be BSD_LIST_INIT
> >
> >             fixed
> > >
> > > 355, 429, 597: don't comment out code
> > >
> >             fixed.
> >
> > > 1613: include
> > >
> >             fixed.
> >      >
> > > Req-queue-struct.h:
> > >
> > > 32: undo formatting changes
> > >
> > > 49: why are you moving the fields? The fields were placed in some
> > > order according to the access pattern, so fields used together are
> > > on the same cache lines.
> > >
> >             done.
> >
> > > 217: undo formatting changes
> > >
> >             fine.
> >
> > > Req-utils-api.c:
> > >
> > > 124: undo
> > >
> >            That is a blank line, undo what, nothing changed
> >
> > > Smb-mgmt.c:
> > >
> > > 353, 411, 627,724: Don't comment out asserts.
> >
> >            The assert:
> >               // ASSERT(!CM_IS_TXRX_NCPU); has no meaning
> >
> >            Line 411: is NOT commented out:
> >
> >               VERIFY(!sbm_verifyIsCODInSac(dest_cod, 0));
> >
> >            Line 627:
> >        VERIFY(sbm_verifyIsCODInSac(src_cod, 1));
> >            is NOT commented out.
> >
> >            Line 724 is NOT commented out:
> >        VERIFY(sbm_verifyIsCODInSac(dest_cod, 1));
> >
> >
> > > Sbm-txrx.c:
> > >
> > > 130, 156: don't comment out asserts.
> >
> >
> > // ASSERT(!CM_IS_TXRX_NCPU); This has not meaning
> >
> >            Line 156 is not an assert NOR Verify.
> >
> >
> > >
> > > Sbm-db.c:
> >
> >            You must mean /sm-sdm/sdm-db.c
> > >
> > > 69: undo
> >
> >            That is a blank line and the file has been syne'ed.
> > >
> > > 104, 428, 435,445: huh? The code said panic() and it meant
> > > panic().
> >
> > >bfisher-linux: 19717>cd sm-sbm-rev2
> > bfisher-linux: 19718>grep panic *.c
> > sbm-init.c:        panic("Can not allocate zero buffer\n");
> > sbm-init.c:        panic("Can not allocate missing data buffer\n");
> > sbm-mgmt.c:        panic("chksum failed, stored =3D 0x%x, calc =3D
> > 0x%x\n", sbm-mgmt.c:            panic("%s: invalid buffer ofset
> > %d\n", __FUNCTION__, src_off);
> >
> >
> > bfisher-linux: 19725>cd sm-sdm
> > bfisher-linux: 19726>ls
> > Makefile    sdm-db.c~   sdm-init.c~          sdm-init-disk.c~
> > sdm-main.c~   sdm-verify.c~
> > Makefile~   sdm-db.h    sdm-init-changer.c   sdm-init-disk-mylex.h
> > #sdm-msg.c#   storage.c
> > sdm-api.h   sdm-devcap  sdm-init-changer.c~  sdm-init.h
> > sdm-msg.c     storage.c~
> > sdm-api.h~  sdm.h       sdm-init-devcap.c    sdm-init-tape.c
> > sdm-msg.c~    storage.c.fisher
> > sdm-conf.c  sdm.h~      sdm-init-devcap.c~   sdm-init-tape.c~
> > sdm-msg.h
> > sdm-db.c    sdm-init.c  sdm-init-disk.c      sdm-main.c
> > sdm-verify.c
> > bfisher-linux: 19727>grep panic *.c
> > sdm-db.c:extern void panic(char *str);
> > sdm-db.c:    if (db) { // if (db =3D=3D NULL) {panic("Out of memory");}
> > sdm-init.c:#include "../sm-libc/libc.h" // for panic and
> > crc32_checksum sdm-init.c:extern void panic(char *str);
> > sdm-init.c:        panic("Out of memory");
> > sdm-init.c:        panic("dir =3D=3D NULL");
> > sdm-init.c:        panic("Out of memory");
> > sdm-init.c:            panic("Out of memory");
> > sdm-init.c:        panic("matchType invalid");
> > sdm-init.c:        panic("Out of memory");
> > sdm-init-devcap.c:extern void panic(char *msg);
> > sdm-init-devcap.c:                panic("Out of memory");
> > sdm-init-devcap.c:                panic("Out of memory");
> > sdm-main.c:        panic("Out of memory");
> > sdm-main.c:        panic("Failed to locate a Valid Product State
> > Table"); sdm-main.c:        panic("Out of memory");
> > sdm-msg.c:// extern void panic(char *str);
> > sdm-msg.c:        panic("Freeing request not in use");
> > sdm-msg.c:            panic("Out of memory");
> > sdm-msg.c:        panic("Out of memory");
> > sdm-msg.c:        panic("Out of memory");
> > sdm-msg.c:        panic("Out of memory");
> > sdm-msg.c:                panic("Out of memory");
> > sdm-msg.c:        panic("Out of memory");
> > sdm-msg.c:        panic("Out of memory");
> > sdm-msg.c:        panic("Out of memory");
> > sdm-msg.c:        panic("Out of memory");
> > sdm-msg.c:        panic("Couldn't allocate a transaction to connect
> > to scsi");
> > sdm-msg.c:        panic("Out of memory");
> > sdm-msg.c:            panic("Out of memory");
> > sdm-verify.c:extern void panic(char *str);
> > sdm-verify.c:            panic("Out of memory");
> > sdm-verify.c:        panic("Out of memory");
> > sdm-verify.c:        panic("Out of memory");
> >
> >
> > No panic has been removed that I can see
> >
> >
> >
> > > Sdm-init.c:
> > >
> > > 55: include
> > >
> > > Sdm-main.c:
> > >
> > > 1987: don't comment out asserts
> >
> >            The code in question:
> >
> >            // ASSERT(sizeof(sdm_msgTab) =3D=3D
> >             //   ((SDM_MID_LAST - SDM_MSG_BASE) *
> > sizeof(sdm_msgTab_t)));
> >
> >            Causes compilation errors now that ASSERT is not a nop-op
> >            like in Andy's version.
> >
> >            The code in sdm.h defines the SDM Message Processing
> > Table to be:
> >
> > /* SDM Message Processing Table
> >      */
> > extern sdm_msgTab_t sdm_msgTab[];
> >
> >            However the size is set at code initialization time in
> > the file sdm-msg.c:
> >
> >
> > /* SDM Message Processing Table
> >      */
> > sdm_msgTab_t sdm_msgTab[] =3D {
> >         { SDM_MID_DEV_LIST_REQ      , sdm_procDevListReq        },
> >         { SDM_MID_DEV_LIST_RSP      , sdm_procNeverReceivedCmd  },
> >         { SDM_MID_DEV_INFO_REQ      , sdm_procDevInfoReq        },
> >         { SDM_MID_DEV_INFO_RSP      , sdm_procNeverReceivedCmd  },
> >         { SDM_MID_DEV_OPEN_REQ      , sdm_procOpenReq           },
> >         { SDM_MID_DEV_OPEN_RSP      , sdm_procNeverReceivedCmd  },
> >         { SDM_MID_DEV_CLOSE_REQ     , sdm_procCloseReq          },
> >         { SDM_MID_DEV_CLOSE_RSP     , sdm_procNeverReceivedCmd  },
> >
> >
> >            In the header file sdm-api.h we find:
> >        /* Insert all new messages before this entry.
> >          */
> >         SDM_MID_LAST
> >
> > } sdm_msgTypes_t;
> >
> >
> > typedef enum {
> >         SDM_MID_DEV_LIST_REQ =3D SDM_MSG_BASE,
> >
> >
> >            That is all well and good but the compiler barfs with the
> >            following err:
> >
> >
> >
> > >
> > > Sdm-msg.c:
> > >
> > > 64: remove
> >
> >            Fine but it was a comment!
> > >
> > > Sdm-verify.c:
> > >
> > > 48: include
> >
> >            the external definition of panic()
> >            is in include/linux/kernel.h for
> >            the kernel:
> >
> > kernel.h:extern struct atomic_notifier_head panic_notifier_list;
> > kernel.h:extern long (*panic_blink)(long time);
> > kernel.h:NORET_TYPE void panic(const char * fmt, ...)
> > kernel.h:extern int oops_in_progress;           /* If set, an oops,
> > panic(), BUG() or die() is in progress */
> > kernel.h:extern int panic_timeout;
> > kernel.h:extern int panic_on_oops;
> > kernel.h:extern int panic_on_unrecovered_nmi;
> >
> >
> > However this file is user level code with the following includes:
> >
> > #include <unistd.h>
> > #include <stdio.h>
> > #include <stdlib.h>
> > #include <string.h>
> > #include <sys/types.h>
> > #include <sys/ipc.h>
> > #include <sys/msg.h>
> > #include <sys/stat.h>
> > #include <fcntl.h>
> > #include <signal.h>
> >
> >
> > Looking at the cross compilation header files:
> >
> >
> > bfisher-linux: 19773>cd ..
> > bfisher-linux: 19774>grep panic */*.h
> > include/db.h:#define    DB_NOPANIC            0x0020000 /* Set panic
> > state per DB_ENV. */
> > include/db.h:#define    DB_PANIC_ENVIRONMENT  0x0080000 /* Set panic
> > state per environment. */
> > include/db.h:#define    DB_NOSERVER             (-30993)/* Server
> > panic return. */
> > include/db.h:   int  (*set_paniccall) __P((DB *, void (*)(DB_ENV *,
> > int))); include/db.h:   void (*db_paniccall) __P((DB_ENV *, int));
> > include/db.h:   int  (*set_paniccall) __P((DB_ENV *, void (*)(DB_ENV
> > *, int)));
> > include/db.h:#define    DB_ENV_NOPANIC          0x0001000 /* Okay if
> > panic set. */
> > bfisher-linux: 19775>pwd
> > /usr/mipsel-linux-gnu
> >
> >            Hence I don't know if this is resolved by anybody but
> > stdlib.h and that still produces a warning.
> >
> > >
> > > Sdm.h:
> > >
> > > 33: include
> > >
> >            fixed.
> >
> > > Spm-msg.c:
> > >
> > > 30: useless comment
> >
> >            Not unless you have to find strlcpy It is
> >            NOT in string and this is a EEE libc.h feature.
> > >
> > > Spm.h:
> > >
> > > 53: useless comment
> > >
> >            same as above.
> >
> > > Kpi-lib.c:
> > >
> > > 538: unnecessary change
> >
> >            Not the compiler complained about a
> >            use of a potentailly unitialized
> >            variable.
> > >
> > > Kpi.h:
> > >
> > > 666: useless comment
> >
> >            It's true so what not state the obvious
> >            since REQ_TIMES_ON is always defined.
> > >
> > > 691 and so on: comment format changes
> >
> >            That is a blank line, nothing
> >            was changed that I am aware of.
> > >
> > > Stats-client.c:
> > >
> > > 236: does not need cache align, remove comment
> >
> >            Fine, but As rendell about that
> >            since these are his changes.
> >            I removed the comment.
> >
> >            SLAW_HWCACHE_ALIGN, // 64 * 1024
> >
> >            I subsituted ZERO for the flags 'SLAW_HWCACHE_ALIGN'
> >
> > struct kmem_cache *
> > kmem_cache_create (const char *name, size_t size, size_t align,
> >             unsigned long flags,
> >             void (*ctor)(void*, struct kmem_cache *, unsigned long),
> >             void (*dtor)(void*, struct kmem_cache *, unsigned long))
> > {
> >
> > >
> > > 755: wrong
> > >
> >            fixed
> > > 945: wrong
> > >
> >            fixed.
> >
> > > Stats-dbg.c:
> > >
> > > 15: useless comment
> >
> >            Maybe so but that is the
> >            only reason for the <linux/kernel.h> include
> >            requirement. Arenm't we a little too picky
> >            here about comments such as // printk ??
> > >
> > > Stats.c:
> > >
> > > 57: include
> >
> >            Doesn't seem to appear in any header file:
> >
> > bfisher-linux: 19817>pwd
> > /homes/bfisher/work/fisher-tuxstor-new/nfx-tree/code
> >
> > bfisher-linux: 19818>grep req_stats_cmd_rcv */*.c
> > sm-stats/kpi-api.c:req_stats_cmd_rcv(char *msgBuf, uint32 msgLen,
> > uint32 srcPort,
> > sm-stats/stats.c:req_stats_cmd_rcv(char *msgBuf, uint32 msgLen,
> > uint32 srcPort,
> > sm-stats/stats.c:        req_stats_cmd_rcv(msgBuf, msgLen, srcPort,
> > dstPort);
> >
> > bfisher-linux: 19819>grep req_stats_cmd_rcv */*.h
> >
> >
> >
> > >
> > > Stats.h:
> > >
> > > 19: useless comment
> >
> >            //printk ?
> > >
> > > Cmd-utils.c:
> > >
> > > 61, 80: redefines nfx-defs.h definition
> >
> >            Are you suggesting moving it to
> >            nfx-defs.h? It isn't there in the
> >            dev tree, it must be in your version
> >            or in typalooza.h?
> >
> >            We will will do this change
> >            along with the others using
> >            Larry's version to
> >            resolve the 32-bit versus
> >            64-bit compilation.
> >
> >            Right now it compiles just fine.
> > >
> > > 5115: unnecessary change
> >
> >            What that is a blank line. Converting
> >            to use a macro rather than hard
> >            coded printf versus printk?
> > >
> > > cmd-utils.h:
> > >
> > > 70: redundant return
> >
> >            Fine, but it doesn't hurt having
> >            a return; statement in a void
> >            procedure return.
> > >
> > > Fs-rpc-api.c:
> > >
> > > 58: include
> > >
> > > 82: undo formatting changes
> > >
> > > 582: useless assignment, but whatever, this file needs to be
> > > changed anyway.
> > >
> >
> >            Your right, this procedure needs reworking since the
> >            comment, there isn't a need to inform
> >            the TxRx where shared memory resides.
> > void
> > fs_rpc_init(void)
> > {
> > #if defined(NFP_FP)
> >
> >         /* Tell TxRx where the shared memory is located.
> >          */
> >         int32 rc =3D eee_fwd_packet((void *)fs_rpc_my_buffers,
> > EEE_FS_RPC_QUEUE_INDEX);
> >
> >         int rc =3D eee_registerPollingFunc(EEE_HIGH_PRIORITY,
> >                                          eee_process_TxRx_FP_queue,
> >                                    &eee.rcv_queue[EEE_FS_RPC_QUEUE_INDE=
X],
> >                                          NULL);
> > .........
> >
> > > Vscan-api.c:
> > >
> > > 2236, 5565: this should be unnecessary once you fix rpc.h.
> > >
> >
> > Line 2236:
> >
> > vscan_rpc_conn_closed(void *tplBind,
> >                           struct rpc_client *rpc_client)
> > {
> > #ifdef REF_TRACKING                                 <-- line 2236
> >         struct _tpl_bindCb *bind =3D (struct _tpl_bindCb *)tplBind;
> > #endif // REF_TRACKING
> >         struct vscan_scanner *scanner =3D
> > vscan_rpc_client_to_scanner(rpc_client);
> >         vs_t *vs =3D scanner->vs;
> >
> >         if (vs->vs_unbindAllBCBWaiter !=3D NULL) {
> >             vs_decPendingVScanUnbinds(vs->vs_unbindAllBCBWaiter);
> >             vs_checkAndWakeupUnInitRequest(vs);
> >         }
> >
> > #ifdef REF_TRACKING
> >         ref_del_holder(bind, scanner);
> > #endif // REF_TRACKING
> >         vscanner_rele(scanner);
> >         return;
> > }
> >
> >
> > Line 5565:
> >
> > void
> > vscan_scanner_closeconn(req_hdr_t *reqHdr,
> >                             struct vscan_scanner *scanner)
> > {
> >         tpl_bindCb_t *bind_p;
> >
> >         /* Get the connection and close it
> >          */
> >         if (scanner->rpc_client.conn_state =3D=3D RPC_CONN_ESTABLISHED)
> > {
> >
> >             tpl_delConnReq(scanner->rpc_client.conn);
> >
> >             if (reqHdr !=3D NULL) {
> >                 vs_incPendingVScanUnbinds(reqHdr);
> >             }
> >         } else if (scanner->rpc_client.bcb !=3D NULL) {
> >       -->      bind_p =3D (tpl_bindCb_t *)(scanner->rpc_client.bcb);
> >
> >             if (bind_p->acpuState =3D=3D TPL_IPC_CONN_ADDED) {
> >                 tpl_unbindReq(bind_p);
> >             }
> >             if (reqHdr) {
> >                 vs_incPendingVScanUnbinds(reqHdr);
> >             }
> >         }
> > }
> >
> > bfisher-linux: 19833>pwd
> > /homes/bfisher/work/fisher-tuxstor-new/nfx-tree/code
> > bfisher-linux: 19834>grep REF_TRACKING */*.c
> > sm-esm/esm.c:#ifdef REF_TRACKING
> > sm-esm/esm.c:#ifdef REF_TRACKING
> > sm-esm/esm.c:#ifdef REF_TRACKING
> > sm-esm/esm.c:#ifdef REF_TRACKING
> > sm-evm-srvr/evm-io.c:#ifdef REF_TRACKING
> > sm-evm-srvr/evm-queue.c:#ifdef REF_TRACKING
> > sm-fs/fs-rdwr.c:#ifdef REF_TRACKING
> > sm-malloc-slab/malloc.c:#if defined(NFP_FP) && defined(REF_TRACKING)
> > sm-malloc-slab/malloc.c:#ifdef REF_TRACKING
> > sm-ref/ref-api.c:#ifdef REF_TRACKING
> > sm-req-queue/req-queue-api.c:#ifdef REF_TRACKING
> > sm-sb1250/smp.c:#ifdef REF_TRACKING
> > sm-ui/cmdtable.c:#ifdef REF_TRACKING
> > sm-vscan/vscan-api.c:#ifdef REF_TRACKING
> > sm-vscan/vscan-api.c:#endif // REF_TRACKING
> > sm-vscan/vscan-api.c:#ifdef REF_TRACKING
> > sm-vscan/vscan-api.c:#endif // REF_TRACKING
> > sm-vscan/vscan-api.c:#ifdef REF_TRACKING
> > sm-vscan/vscan-api.c:#endif // REF_TRACKING
> > sm-vscan/vscan-api.c:#ifdef REF_TRACKING
> > sm-vscan/vscan-api.c:#endif // REF_TRACKING
> > sm-vsvr/vs-api.c:#ifdef REF_TRACKING
> >
> >
> > What do either of these have to do with rpc.h?
> >
> > This is the original code with the bcb call
> > back scheme which is ONLY used by this
> > vscan code. Nobody else even uses this.
> >
> > Who ever added the REF_TRACKING scheme
> > was trying to solve something
> > like the socket/bind block going away.
> >
> > The socket is not going away, nor the
> > structure hung off it until the last
> > close. The things hung off the CIFS/NFS
> > structures need there own reference
> > counts which were maintained.
> >
> > > Vscan.h:
> > >
> > > 9: undo, Includes/eee is in the path.
> >
> >            No, not explictly, this is
> >            required to get the proper
> >            one versus the user land
> >            version. Rendell and I
> >            have already gone down
> >            that path.
> > >
> > > Vs-api.c:
> > >
> > > 2740: Don't comment out code
> >
> >            This was Rendell's fix:
> >
> > /*
> >
> > *----------------------------------------------------------------------=
--------
> >      * Name         : vs_registerPorts
> >      *
> >      * Description  : register all well known ports to the IP
> > address of
> >      *                this VS.
> >      *
> >      * Return       : NFX_ERR/NFX_OK
> >      *
> >
> > *----------------------------------------------------------------------=
--------
> >      */
> > static int32
> > vs_registerPorts(vs_t *vs)
> > {
> >         int32 rc =3D NFX_OK;
> >         vs_if_t *vif;
> >         vs_ip_t *ip;
> >
> >         ASSERT(vs !=3D NULL);
> >         ASSERT(!(vs->vs_flags & VS_UPDATE_IN_PROGRESS));
> >         ASSERT(!(vs->vs_flags & VS_UNINIT_IN_PROGRESS));
> >
> >         /* first do all the INADDR_ANY binds
> >          */
> > //  rc =3D vs_bindIp(vs, NULL, NULL, 0); /* bind INADDR_ANY */
> > //  if (rc !=3D NFX_OK)
> > //    return rc;
> >
> >         /* Register all applications that need to bind on a
> >          * specific IP address;
> >          */
> >         TAILQ_FOREACH(vif, &vs->vs_ifList, if_next) {
> >             TAILQ_FOREACH(ip, &vif->if_ipList, ip_next) {
> >                 rc =3D vs_bindIp(vs, vif, ip,
> > vif->if_info.if_disabledProto); if (rc !=3D NFX_OK)
> >                     return rc;
> >             }
> >         }
> >
> >         return rc;
> > }
> >
> >            Since his change list will addres this,
> >            I am mleaving it as it was.
> > >
> > > 2872: Don't change the code if you doing #ifdef
> > >
> > > 4836, 4882: don't comment out code
> >
> >            /*
> >
> > *----------------------------------------------------------------------=
--------
> >      * Name         : vs_bindIp
> >      *
> >      * Description  : bind the BCB's for the given IP based on the
> > disabled
> >      *                protocol flags.
> >      *
> >      * Arguments    : vs - virtual server
> >      *                vif - The interface structure
> >      *                ip - The IP structure
> >      *                disabledProto - If a bit is not set, bind the
> > BCB's with
> >      *                                the IP for the corresponding
> > protocol. *
> >      * Return       : NFX_OK/NFX_ERR
> >      *
> >
> > *----------------------------------------------------------------------=
--------
> >      */
> > static int32
> > vs_bindIp(vs_t *vs, vs_if_t *vif, vs_ip_t *ip, uint16 disabledProto)
> > {
> > #ifdef VIRTUAL_SERVER_IMPLEMENTED
> >
> >
> > This ifdef was added so Rendell can easily find the
> > code that gets replaced by his chagelist.
> > >
> > > Vs-struct.h:
> > >
> > > 705: is this pointer holding a reference? If yes needs to be
> > > mentioned in the comment.
> >
> >            I can add a comment, the socket is always reference
> > counted the issue here is the reference counting for the Virtual
> >            server vs_conn_s state block management.
> >
> >            This is is Rendell's problem. I added a comment.
> > >
> > > 907: don't comment out code
> >
> >                /* The bind control blocks for binds with INADDR_ANY.
> >          * A reference is held on this structure for every lock
> > owner in this
> >          * list.
> >          */
> >       //     vs_bcb_table_t *vs_inaddrany_bind_cb;
> >
> >
> >
> >            Talk with Rendell about inaddrany bind. These
> >            were his changes. Since his change list
> >            reworks all this code, I'm leaving it.
> > >
> > > 1102: struct something. This does not require pulling any headers
> > >
> >
> >            The comment is correcct:
> >
> >         /* The bind control block to use for outbound RPC(s) - used
> > by nfs.
> >          * (tpl_bindCb_t *) Void start here to avoid pulling in tpl
> > headers */
> > //  tpl_bindCb_t *vs_nfs_out_bound_bindCB;
> >         void  *vs_nfs_out_bound_bindCB;
> >
> >
> >            You have to pull all the tpl.h, tpl-api.h to get the
> >            definitions. Rendell can address, I have left pretty
> >            much the entire VS code alone and taken only the
> >            minimum number of changes from him to get this
> >            code compiled without his changes.
> >
> > > 1136: should not be done in this change. Let Rendell do that.
> > >
> >
> >            These were given to me by Rendell. He can fix them
> >            in his change list.
> >
> > > Bsd-dorf.c:
> > >
> > > File not merged correctly
> >
> > bfisher-linux: 19843>p4 fstat bsd-dorf.c
> > ... depotFile //depot/tuxrx/nfx-tree/code/smoo-linux/bsd-dorf.c
> > ... clientFile
> > /homes/bfisher/work/fisher-tuxstor-new/nfx-tree/code/smoo-linux/bsd-dor=
f.c
> > ... isMapped
> > ... headAction edit
> > ... headType text
> > ... headTime 1266449691
> > ... headRev 4
> > ... headChange 34618
> > ... headModTime 1266435838
> > ... haveRev 4
> > ... action edit
> > ... change 34077
> > ... type text
> > ... actionOwner bfisher
> > ... resolved
> > ... ... otherOpen0 rendellf@rendellf-test
> > ... ... otherAction0 edit
> > ... ... otherChange0 34052
> > ... ... otherOpen 1
> >
> > Fixed, you guys have since deleted whole pieces of
> > it.
> > >
> > > Linux-stubs.c:
> > >
> > > 38: useless returns, code formatting changes
> >
> >            Re3vert, the code is a mess, the
> >            formatting and returns are the
> >            least of the problem. Things like:
> >
> > size_t eee_ramTotalHeapSize(void)
> > {
> >         return 4L * 1024 * 1024 * 1024;
> > }
> >
> > size_t eee_getAvailableNbrOfBufs(int type)
> > {
> >         return 48;
> > }
> >
> > size_t eee_getTotalNbrOfBufs(int type)
> > {
> >         return 22;
> > }
> >
> > Are nearly coompletely bogus, since unless
> > the 4GB for the total heap size is going
> > to be used by the FP code, Linux will
> > totally ignore. The other arbituary
> > return values are something Andy made up.
> >
> >
> > Also most of the rmc_XXX()
> > procedures should be moved
> > to your RMC code and removed
> > from here, now that the
> > RMC code is it's own module.
> >
> >
> > The following is rather strange:
> >
> > do_stack_trace(uint64 sp, uint64 fp, uint64 *buf_p, int num_frames);
> >
> > void
> > do_stack_trace(uint64 sp, uint64 fp, uint64 *buf_p, int num_frames)
> > {
> > }
> >
> > Since there are no other references to do_stack_trace besides
> > this definition.
> > >
> > > Clusdb-export-common.c:
> > >
> > > 35: remove
> > >
> >            fine, another helpful comment from
> >            Rendell for his merge.
> >
> > > Cluster-cifssrvr-api.c:
> > >
> > > 268: undo
> > >
> >            What, this as the original. The changes
> >            only center on the includes. If his
> >            is wrong, that is something else
> >            as it was not changed.
> >
> > > Ndmp-data.c:
> > >
> > > 2404: wrong, changes meaning
> >
> >            fixed.
> > >
> > > Ndmp-linux.c:
> > >
> > > 18: useless comment
> > >
> > > Ndmp_xdr.h:
> > >
> > > 9: this should not be necessary, correct include is in the path.
> >
> >            Not so with the kernel includes coming first.
> >            This works for both cases, Rendell and I
> >            have been there and wasted lots of time
> >            sorting that out.
> > >
> > > Ldaptest.c:
> > >
> > > 168: include..
> >
> >            The extern's:
> >
> >            extern void *malloc(size_t);
> >            extern void free(void *);
> >            extern void *realloc(void *, size_t);
> >
> >            Are a user level program include problem
> >            which are NOT defined in stdlib.h
> >
> >            Looking around we find:
> >
> >
> > /usr/mipsel-linux-gnu/include/malloc.h:/* Prototypes and definition
> > for malloc implementation.
> > /usr/mipsel-linux-gnu/include/malloc.h:  $Id: malloc.h,v 1.26.4.1
> > 2005/02/16 10:16:11 roland Exp $
> > /usr/mipsel-linux-gnu/include/malloc.h:  `ptmalloc2', a malloc
> > implementation for multiple threads without
> > /usr/mipsel-linux-gnu/include/malloc.h:  lock contention, by Wolfram
> > Gloger <wg@malloc.de>.
> > /usr/mipsel-linux-gnu/include/malloc.h:  This work is mainly derived
> > from malloc-2.7.0 by Doug Lea
> > /usr/mipsel-linux-gnu/include/malloc.h:
> > ftp://gee.cs.oswego.edu/pub/misc/malloc.c
> > /usr/mipsel-linux-gnu/include/malloc.h:  `malloc.c'.
> > /usr/mipsel-linux-gnu/include/malloc.h:# define __malloc_ptr_t
> > void * /usr/mipsel-linux-gnu/include/malloc.h:# define
> > __malloc_ptr_t  char * /usr/mipsel-linux-gnu/include/malloc.h:#
> > define __malloc_size_t
> > size_t /usr/mipsel-linux-gnu/include/malloc.h:# define
> > __malloc_ptrdiff_t
> > ptrdiff_t /usr/mipsel-linux-gnu/include/malloc.h:#elif !defined
> > __attribute_malloc__ /usr/mipsel-linux-gnu/include/malloc.h:#
> > define
> > __attribute_malloc__ /usr/mipsel-linux-gnu/include/malloc.h:#
> > define NULL   ((__malloc_ptr_t)
> > 0) /usr/mipsel-linux-gnu/include/malloc.h:extern __malloc_ptr_t
> > malloc __MALLOC_P ((size_t __size))
> > __attribute_malloc__; /usr/mipsel-linux-gnu/include/malloc.h:extern
> > __malloc_ptr_t calloc __MALLOC_P ((size_t __nmemb, size_t
> > __size))/usr/mipsel-linux-gnu/include/malloc.h:
> > __attribute_malloc__; /usr/mipsel-linux-gnu/include/malloc.h:extern
> > __malloc_ptr_t realloc __MALLOC_P ((__malloc_ptr_t
> > __ptr, /usr/mipsel-linux-gnu/include/malloc.h:
> > __attribute_malloc__; /usr/mipsel-linux-gnu/include/malloc.h:/*
> > Free a block allocated by `malloc', `realloc' or `calloc'.
> > */ /usr/mipsel-linux-gnu/include/malloc.h:extern void free
> > __MALLOC_P ((__malloc_ptr_t
> > __ptr)); /usr/mipsel-linux-gnu/include/malloc.h:extern void cfree
> > __MALLOC_P ((__malloc_ptr_t
> > __ptr)); /usr/mipsel-linux-gnu/include/malloc.h:extern
> > __malloc_ptr_t memalign __MALLOC_P ((size_t __alignment, size_t
> > __size)); /usr/mipsel-linux-gnu/include/malloc.h:extern
> > __malloc_ptr_t valloc __MALLOC_P ((size_t __size))
> > __attribute_malloc__;
> >
> >
> >            This is the lack of the test writer fixing this.
> >            These were added to get away of the warnings.
> >
> >
> > >
> > > Cmd_ndmp.c:
> > >
> > > 16: useless comment
> > >
> > > Cmd_vscan.c:
> > >
> > > 25: useless comment
> > >
> > > Nfxsh.h:
> > >
> > > 25: Useless comment. If authen-lib-api.h needs SLIST_ENTRY, it
> > > should include bqueue.h itself
> > >
> > > Rconlib.c:
> > >
> > > 333: useless comment.
> > >
> >
> >            Fine.
> >
> > > Rmc.c:
> > >
> > > 34: huh?
> >
> >            ./ssc-rmc/rmc.c
> >
> >            Blowing up via using it's own version of VERIFY is
> >            not the way to handle this;
> >
> > #undef VERIFY
> > // define VERIFY(e) ((void) ((e) ? 0 : (*(volatile int *)0 =3D 0)))
> > #define VERIFY(e)
> >
> > The code should use the standard verify and not roll it's
> > own. I made it use the standard version.
> >
> > >
> > > Rmc_api.c:
> > >
> > > 2734: huh?
> >
> >            ./ssc-rmc/rmc_api.c
> >
> >            the code:
> >
> >            // ASSERT(msg->ihdr);
> >
> > The definition is for a msg is:
> >
> > typedef struct rmc_msg_s {
> >         rmc_msg_hdr_t   ihdr;               /* internal header -
> > users don't
> >                                              * manipulate this
> > directly */
> >         int             sg_cnt;
> >         rmc_sg_t        sg_list[RMC_SG_MAX];
> >         int             memtyp;         /* apps owns > 0....rmc owns
> > < 0 */ struct  timeval tos;                /* hold time for send */
> >         struct  timeval nrtd;               /* next retry time */
> >         int             retry;              /* 0 on first send */
> >         char            *exhdr;             /* for extended headers
> > */ int             exhdr_sz;           /* size of extended
> > header */ ............
> >
> > The definition os a rmc_msg_hdr_t is from
> > sm-rmc/rmc_common.h
> >
> > /* RMC msg header used for rmc-to-rmc transfers.
> >      */
> > typedef struct rmc_msg_hdr_s {
> >         int16       magic;          // id for rmc packets
> >         int16       flags;          // identifies type of msg
> >         int16       status;         // status code when flags |=3D
> > DONE int16       dest_appid;     // carries actual destinate for
> > NFX int16       sess_id;        // session id
> >         uint16      msg_seq;
> >         int16       msg_id;         // internal use - set on ALL
> > sends int16       rpc_id;         // internal use - only valid for
> > RPCs uint32      msg_len;        // sizeof data payload ONLY
> >         int16       offset;         // index of 64k chunks
> >         int16       genno;          // cluster generation no
> >         uint64      msg_tag;
> > } rmc_msg_hdr_t;
> >
> >
> > Hence this is a structure and NOT a pointer to be checked.
> > Then only reason this wasn't an error in the past
> > was that ASSERT's wer No-op's and now they check.
> >
> >
> >            The compiler was complaining about this
> >            use of the ihdr is a structure
> >            with a constructor like:
> >
> >
> >            It must have been a pointer in
> >            the past, now it'san error.
> >
> >            I'll delete it;  The only error
> >            check would be if you were sent a
> >            NULL msg pointer.
> >
> > >
> > > Rmc_pm.c:
> > >
> > > 18: useless comment. Rmc_internal.h should include sys/types.h if
> > > it needs something from there.
> > >
> >
> >            It doesn't. It needs it for the in_addr_t definition.
> >
> > > Rmc_rpc_api.c:
> > >
> > > Changes must be unnecessary, This file was compiling just fine
> > > without them.
> > >
> > ./ssc-rmc/rmc_rpc_api.c
> >
> >
> >            rmc_internal.h does not cover all the bases,
> >            since it does not include sys/types.h nor
> >            linux/spinlock.h
> >
> >            The changes are:
> >
> > #ifdef SSC
> > #include <sys/types.h>  // Need definition for in_addr_t
> > #include <linux/spinlock.h>
> >
> > #include "rmc_internal.h"
> > #include "../sm-anpssc/anpssc-api.h"
> >
> > #else
> > #include <linux/spinlock.h>
> > #include "../sm-rmc/rmc_internal.h"
> > #endif // SSC
> >
> >
> >
> > > Esm-nfx.c:
> > >
> > > 54: nonsense comment. What pragma? The definition you are looking
> > > for is __cacheline_aligned.
> > >
> >
> >            Not so. The POSIX C standard defines the pragma
> >
> > // cache align the global spin lock avoiding aliasing, 2 ** 6 here,
> > maybe SMP_CACHE_BYTES
> > // pragma 6 but the gcc compiler barks on that directive
> >
> >            pragma 6 defines the power of 2 alignment.
> >            The compiler does NOT support these pragma
> >            and complains.
> >
> >            yes you can use the __cacheline_aligned option
> >            however the compiler should also support
> >            this option.
> >
> >            The dev tree has:
> >
> >            nfx_global_spinlock_t           esm_yieldQueueSpin;
> >
> >            and:
> >
> > /* This is a data used for spin locks that are also global
> > variables.
> >      * This will ensure that a spin lock does not share a cache line
> > with
> >      * other spin locks.
> >      */
> > typedef union {
> >
> >         nfx_spinlock_t
> > #if defined(NFX_MOD_SSC) || defined(__OpenBSD__) ||
> > defined(SSC_MGMT) || defined(TUXRX)
> >
> >             /* This is needed because the SSC compiler cannot handle
> > anonymous
> >              * unions.
> >              */
> >             spin
> > #endif
> >             ;
> >
> >         uint64 align[CACHELINE_SIZE / sizeof(uint64)];
> > } nfx_global_spinlock_t;
> >
> >
> >            A pretty ugly hack to get alighment and not
> >            exactly portable. I presume this was due
> >            to the ancient compiler being used.
> > :
> >
> >
> > > Esm.c:
> > >
> > > 22: useless comment
> > >
> > > 71: useless comment
> > >
> >
> >            fine.
> >
> > > 80: include
> >
> >            Added eee-poll.h
> > >
> > > 128: unnecessary change
> > >
> > > 1012: remove comment
> > >
> > >
> > > Evm-io.c:
> > >
> > > 34: useless comment
> > >
> > > 49: include
> >
> >            These were added and there is NO cod-api.h header file
> > >
> > > Evm-lv.h:
> > >
> > > 19: remove
> > >
> >            What evm-debug.h ? Why? It used in lots of the
> >            other files:
> >
> > bfisher-linux: 19931>pwd
> > /homes/bfisher/work/fisher-tuxstor-new/nfx-tree/code
> > bfisher-linux: 19932>grep evm-debug.h ./sm-evm-srvr/*.c
> > ./sm-evm-srvr/evm-api.c:#include "evm-debug.h"
> > ./sm-evm-srvr/evm-debug.c:#include "evm-debug.h"
> > ./sm-evm-srvr/evm-io.c:#include "evm-debug.h"
> > ./sm-evm-srvr/evm-io.c:/* See evm-debug.h for lock definitions and
> > locking hierarchy.
> > ./sm-evm-srvr/evm-lv.c:#include "evm-debug.h"
> > ./sm-evm-srvr/evm-lv.c:/* See evm-debug.h for lock definitions and
> > locking hierarchy.
> > ./sm-evm-srvr/evm-msg.c:#include "evm-debug.h"
> > ./sm-evm-srvr/evm-prof.c:#include "evm-debug.h"
> > ./sm-evm-srvr/evm-queue.c:#include "evm-debug.h"
> >
> > > Evm-com-defs.h:
> > >
> > > 21: remove useless comment
> > >
> > > 23: useless comment
> > >
> > > 27: use eee_printf
> > >
> >            Will convert to Larry's scheme. It compiles
> >            now just fine.
> >
> > > 570...: undo
> > >
> >
> >            When the generic scheme is done, then
> >            all the user's will be converted.
> >
> > > File-buf-struct.h:
> > >
> > > 30: useless comment. If vcb_s needs sfr_t, it should include
> > > sfr-struct.h
> >
> >            Rendell's changes
> > >
> > > 31: useless comment.
> > >
> > > File-lib.c:
> > >
> > > 42: useless comment
> > >
> > > 4527: NFP_FP is always defined. At least it was in the original
> > > Makefile. Did you break that by any chance?
> > >
> >            From the Makefile:
> >
> >            EXTRA_CFLAGS +=3D -fms-extensions -DNFP_FP -DSBM_REV_2
> > -DCOUGAR \ -DDUMP_USE_SWAP_API -I include \
> >            -I include/linux/onstor -I $(NFX_TREE)/Includes \
> >            -I $(NFX_TREE)/code -Werror
> >
> >
> >            The procedure
> >            file_get_security() is ONLY defined for the FP case.
> >            It complains for the SSC: From the make:
> >
> > make[2]: Leaving directory
> > `/homes/bfisher/work/fisher-tuxstor-new/nfx-tree/code/samba'
> > for module in sm-anpssc sm-utils sm-gns sm-dcache ssc-libelog
> > ssc-rmc ssc-pm ssc-ncm-lib ssc-openafs-util ssc-o\penafs-lwp
> > ssc-openafs-rx ssc-openafs-ubik ssc-cluster ssc-ncm sm-icu-data
> > sm-icu-common ssc-elog ssc-elog-shel\l ssc-nfxnis ssc-timekeeper
> > sm-appids sm-ipmd-lib sm-crypt ssc-authen-lib ssc-evm-lib ssc-fs-lib
> > ssc-initial-co\nfig ssc-nfxsh sm-fs sm-sdm sm-tape sm-evm sm-spm
> > sm-ea ssc-authentication sm-file ssc-ndmp sm-nfs sm-ipmd
> > sm-b\sd-snmpd sm-chassis sm-event ssc-prom-upgrade ssc-volread
> > ssc-sys-dvt ssc-modify-ro ssc-crashsave ssc-hostid ss\c-stdio
> > ssc-rconlib ssc-sanm sm-sct ssc-sshd-kb5 ssc-vsd samba ssc-vtm
> > ssc-support ssc-webui ssc-modify-cron sm\-trace ssc-file-proxy
> > ssc-tests ../../linux/tools; do \ make   -C ./code/$module
> > TARGET=3DSSC PROD=3Dtx \
> >
> >            Hence I did NOT break anything. This is required!
> >
> > > File-msg.h:
> > >
> > > 780: undo
> > >
> >
> >            When we convert to Larry's general scheme.
> >
> > > File-server.c:
> > >
> > > 177: remove useless comment
> >
> >            Hardly, that took some time to determine
> >            since the E_LOG() macro's are broken and
> >            do NOT add an _ prefix to the internal
> >            names. This is a very VALID warning
> >            about why that variable name
> >            had to change.
> > >
> > > 1990: undo connection need to have refcnt.
> > >
> >
> >            This code was there before.
> >
> > >        // already deallocated by csn_disconnect
> > >         // csn_rele(file_sessions[sessionIdIndex].cifs_session);
> > >         //
> > > NFX_ASSERT(file_sessions[sessionIdIndex].cifs_session->csn_refCnt
> > > =3D=3D 0); // if
> > > (file_sessions[sessionIdIndex].cifs_session->csn_refCnt =3D=3D 0) //
> > > { //     file_sessions[sessionIdIndex].cifs_conn->cc_flags |=3D
> > > CIFS_CONN_DISCONNECTING; //
> > > csn_uninit(file_sessions[sessionIdIndex].cifs_session); //
> > > file_sessions[sessionIdIndex].cifs_conn =3D NULL; // }
> >
> >            hence I did not make this change. You'll have to look
> >            at the log to find the person.
> >
> > > Fs-am-api.h:
> > >
> > > 776: undo
> > >
> >
> >            this sis required for the SSC compilation.
> >            Will covert to Larry's scheme with another
> >            change list just covering this.
> >
> > > Fs-api.c:
> > >
> > > 39: remove if this is defined elsewhere
> > >
> > //@@@
> > // void QUEUE_PTR_INC(address_t *, void *, address_t *);
> >
> > Yes in:
> >
> >            bfisher-linux: 19964>grep QUEUE_PTR_INC onstor/*/*.h
> >
> > onstor/sm-eee/eee-queue.h:#define QUEUE_PTR_INC(_ptr, _end, _start)
> > {
> >
> >
> > > Fs-buf.c:
> > >
> > > 32: include
> > >
> >            Left over and should be removed since that
> >            is not really a valid scheme to hard wire
> >            in 1,2,4GB memory configurations. Only
> >            pertains to Cougar.
> >
> > > Fs-context.c:
> > >
> > > 2361: don't comment out asserts
> > >
> >            fixed
> > > Fs-dump-restore-rmc.c:
> > >
> > > 168: undo
> > >
> > > Fs-dump-restore-rmc.h:
> > >
> > > 90: undo
> > >
> >
> >            If you need atomic for this counter
> >            something must be wrong with your
> >            state block locking.
> >
> >            There were lots of issues here since
> >            you have to change other places
> >            to fix the ASSEST's since they
> >            cannot simply get the value.
> >            You have to do atomic_read_return
> >            type equivalent's.
> >
> >            I can add it back however, explain
> >            to me why this need to be atomic
> >            when other things in the structure
> >            are not equally protected?
> >
> >            The flags, etc. For example the
> >            the rmcMsgsSent is not atomic
> >            and that is what you are compariing
> >            to all over.
> >
> >            What is the difference here, you can
> >            get interrupted and the count will
> >            be off? You aren't doing preemption,
> >            nor interrupts, please explain?
> >
> > > Fs-dump.c:
> > >
> > > 35: include
> > >
> > > Fs-includes.h:
> > >
> > > 321: This definition was in nfx-defs.h
> >
> >          What are you referring to:
> > #define ASSERT_LOCK_OWNED(x) ASSERT(spin_is_locked(x))
> >
> > That is NOT in nfx-defs.h. I added this to avoid
> > editing huge amounts of code which used the
> > ASSERT_LOCK_OWNED() macro.
> >
> > >
> > > 410: You should not need that, use __builtin_return_address(0).
> > >
> >          standalone is not being built.
> > #ifdef FS_STANDALONE
> > extern address_t get_ra(void);
> >
> > #ifndef FS_FSDB
> > // Implement an equivalent function for standalone whenever
> > convenient #define uint32_checksum(data, size, len)  0xFEADFACE
> > #endif // FS_FSDB
> > #endif // FS_STANDALONE
> >
> >
> > > Fs-primitive.h:
> > >
> > > 464: undo
> >
> > #ifdef __KERNEL__
> > #define FS_PRIM_PRINT printk
> > #else
> > #define FS_PRIM_PRINT printf
> > void panic(char *fmt, ...);
> > #endif // __KERNEL__
> >
> >
> > Will convert to LArry's scheme, until
> > then this compiles and links just fine.
> >
> > >
> > > Fs-rdwr.c:
> > >
> > > 26: include
> >
> > The is no header file for this, it was deleted.
> >
> > extern eee_desc_t *sbm_getDescFromCOD(nfx_cod_t cod);
> >
> >          This compiles and links just fine.
> >
> > > Fs-rdwr.h:
> > >
> > > 1206: why change it
> > >
> >       ASSERT(spin_is_locked(&queue->spin));
> >
> >          As opposed to
> >
> >          #define ASSERT_LOCK_OWNED(x) ASSERT(spin_is_locked(x))
> >
> >          Aren't they equivalent?
> >
> > > Fs-snap.c:
> > >
> > > 29: include
> >
> >          extern struct tm *
> > localtime(time_t *tt, int32 no_adjust);
> >
> >          You're right it's in sm-timer/eee-timer-api.h
> >          however since that does NOT define it to
> >          be external, just the definition, that is
> >          not sufficient;
> >
> > struct tm
> > *localtime(const time_t *val, int32 no_adjust);
> >
> >
> >
> >
> >
> > > 3192: undo.
> > >
> >
> >          The old scheme with % gets compiler errors;
> >
> >           uint64 snapbitsPage =3D refPage / BITS_PER_BYTE;
> >     --> unsigned char index =3D (refPage & 0x7);  // uint64 index =3D
> > refPage % BITS_PER_BYTE;
> >           unsigned char refmask =3D (1 << index);
> >
> > I talked with Jobi over this change and he approved it.
> > I left the comment to leave a history.
> >
> > > Fs-vol-exer.c:
> > >
> > > 19: include
> > >
> >
> >          There is no api header file for the cod procedures
> >          as it was deleted. This compiles and links fine.
> > extern uint32 random32(void);
> > extern nfx_cod_t sbm_getCODFromDesc(eee_desc_t *desc);
> > extern eee_desc_t *sbm_getDescFromCOD(nfx_cod_t cod);
> >
> >          There is no header file for random32().
> >
> >
> > > Tape.c:
> > >
> > > 53: include
> > >
> > extern nfx_cod_t sbm_getCODFromDesc(eee_desc_t *desc);
> > extern eee_desc_t *sbm_getDescFromCOD(nfx_cod_t cod);
> >
> > There is NO header file api.
> >
> > > Icu_wrappers.h:
> > >
> > > 19: remove
> >
> >          I agree, it was left there for historical
> >          reasons.
> > >
> > > Ispfc_aen_handler.c:
> > >
> > > 34: COUGAR is always defined so just remove that block.
> > >
> >
> >          I agree the whole "sysdvt_qlogic_t" is rather
> >          bogus and caused lots of compiler issues.
> >          I remove the other reference to qdvt->
> >          below which was also !COUGAR
> >
> > > Ispfc_link.c:
> > >
> > > 30: remove useless comment.
> > >
> > #include <sm-eee/eee-api.h> /* for getappid */
> >
> >          The comment is the only reason this
> >          header file needs to be included.
> >
> > > Ispfc_misc.c:
> > >
> > > 35: include
> > >
> >          This procedure really ought to be
> >          removed and the code reworked.
> >          having the MTU size being
> >          interrogated this way is wrong.
> >
> > #ifdef COUGAR
> >       eee_getMtuAndBufType(remain, sd->rspDest, &mtu, &bufType,
> > &memPool); #else
> >       /* There are so many more ULTRA buffers than other types that
> > we just pass
> >        * in a large size to skew the choice algorithm.  Note that
> > this does not
> >        * guarantee the use of ultra buffers if the destination is
> > the SSC. */
> >       eee_getMtuAndBufType(EEE_BUFSIZE_ULTRA, sd->rspDest, &mtu,
> > &bufType, &memPool);
> > #endif
> >
> >
> >          This procedure is defined as a smoo-linux/linux-stubs.c
> >          file which does NOT have an associated foobar-api.h
> >          header file;
> >
> > smoo-linux/linux-stubs.c:eee_getMtuAndBufType(uint32 num_bytes,
> > smoo-linux/linux-stubs.c:EXPORT_SYMBOL(eee_getMtuAndBufType);
> > sm-scsi/scsi_mod.mod.c: { 0x3700a9b1, "eee_getMtuAndBufType" },
> >
> >
> > > Ispfc_private.h:
> > >
> > > 54: should be in nfx-defs.h
> > >
> >
> >          SAme comment as above; It is not in nfx-deffs.h
> >          and I added this to avoid editing lots of
> >          places in the file. There are only a
> >          handful of these legacy user's and this
> >          is a good solution;
> >
> > #define ASSERT_LOCK_OWNED(x) ASSERT(spin_is_locked(x))
> >
> > > Sanm-dm-main.c:
> > >
> > > 25: remove useless comment. Fs-rdwr.h should include esm-api.h.
> > >
> >
> >          The line in question is:
> >
> > // Description:     Initializes the SanMirror data mover module.
> >
> >
> >          Is that not true?
> >
> >          The file sm-fs/fs-rdwr.h has NO includes in it.
> >
> >          grep'ing the code we find:
> >
> > bfisher-linux: 20628>pwd
> > /homes/bfisher/work/fisher-tuxstor-new/nfx-tree/code
> > bfisher-linux: 20629>grep esm-api.h */*.c
> > sm-esm/esm.c:#include "../sm-esm/esm-api.h"
> > sm-esm/esm-linux.c:#include "../sm-esm/esm-api.h"
> > sm-esm/esm-nfx.c:#include "../sm-esm/esm-api.h"
> > sm-esm/esm-stack.c:#include "../sm-esm/esm-api.h"
> > sm-esm/esm-stack.c:#include "../sm-esm/esm-api.h"
> > sm-except/crashdump-api.c:#include "../sm-esm/esm-api.h"
> > sm-except/debug.c:#include "../sm-esm/esm-api.h"
> > sm-except/exc-exception.c:#include "../sm-esm/esm-api.h"
> > sm-file/file-buf.c:#include <sm-esm/esm-api.h>
> > sm-file/file-lib.c:#include "../sm-esm/esm-api.h"
> > sm-fs/fs-ioexer.c:#include <sm-esm/esm-api.h>
> > sm-fs/fs-memexer.c:#include <sm-esm/esm-api.h>
> > sm-fs/fs-vl.c:#include <sm-esm/esm-api.h>
> > sm-fs/fs-volexer.c:#include <sm-esm/esm-api.h>
> > sm-fs/fs-wb.c:#include <sm-esm/esm-api.h>
> > sm-gcov/ssc-stdio.c:#include "../sm-esm/esm-api.h"
> > sm-ispfc/ispfc_td_state.c:#include <sm-esm/esm-api.h>
> > sm-malloc-slab/malloc.c:#include "../sm-esm/esm-api.h"
> > sm-ndmp/ndmp-data-sm.c:#include <sm-esm/esm-api.h>
> > sm-ndmp/ndmp-mover-sm.c:#include <sm-esm/esm-api.h>
> > sm-prof/prof.c:#include "../sm-esm/esm-api.h"
> > sm-ref/ref-api.c://#include "../sm-esm/esm-api.h"
> > sm-sanm-agent/sanm-agent-main.c:#include "../sm-esm/esm-api.h"  //
> > esm_handle_t req in fs-rdwr.h header file
> > sm-sanm-agent/sanm-agent-sm.c:#include <sm-esm/esm-api.h>
> > sm-sanm-agent/sanm-dmip-funcs.c:#include "../sm-esm/esm-api.h"
> > sm-sanm-agent/sanm-dmip-sm.c:#include <sm-esm/esm-api.h>
> > sm-sanm-dm/sanm-dm-sm.c:#include <sm-esm/esm-api.h>
> > sm-sb1250-prof/sbprof-ui.c:#include "../sm-esm/esm-api.h"
> > sm-sb1250/pte.c:#include "../sm-esm/esm-api.h"
> > sm-scsi/devO_sm.c:#include <sm-esm/esm-api.h>
> > sm-scsi/scsi_sm.c:#include <sm-esm/esm-api.h>
> > sm-scsit-fp/scsit.c:#include "../sm-esm/esm-api.h"
> > sm-scsit-fp/scsit-ui.c:#include "../sm-esm/esm-api.h"
> > sm-sdm-agent/sdm-agent.c:#include "../sm-esm/esm-api.h"
> > sm-serio/serio-api.c:#include "../sm-esm/esm-api.h"
> > sm-spinlock/spinlock-api.c:#include "../sm-esm/esm-api.h"
> > sm-testdump/testdump-api.c:#include "../sm-esm/esm-api.h"
> > sm-testdump/testdump-dump.c:#include "../sm-esm/esm-api.h"
> > sm-testdump/testdump-restore.c:#include "../sm-esm/esm-api.h"
> > sm-test/myesm.c:#include "../sm-esm/esm-api.h"
> > sm-tests/sm-test.c:#include <sm-esm/esm-api.h>
> > sm-test/test.c:#include "../sm-esm/esm-api.h"
> > sm-test/threadtest-act.c:#include "../sm-esm/esm-api.h"
> > sm-thread/thread-api.c:#include "../sm-esm/esm-api.h"
> > sm-thread/thread.c:#include <sm-esm/esm-api.h>
> > sm-timer/timer-tic.c:#include "../sm-esm/esm-api.h"
> > sm-ui/commands.c:#include "../sm-esm/esm-api.h"
> >
> >
> >          Hence you can make this change later, it
> >          is not required to get this patch done.
> >   >
> > > Sanm-dmip-funcs.c:
> > >
> > > 86: include
> > >
> >
> >          The lines in question are:
> >
> > extern void rmc_msg_unlink_last_buf(rmc_msg_t *msg);
> > extern int sanm_ag_rmc_recover(sanm_agContext_t *agc,
> >                                  rmc_session_t *sess,
> >                                  rmc_msg_t *msg);
> > /*++
> > bfisher-linux: 20634>grep rmc_msg_unlink_last_buf */*.h
> > sm-rmc/rmc_eee_api.h:rmc_msg_unlink_last_buf(rmc_msg_t *msg);
> >
> > I will add it. It sure isn't strategic.
> >
> >
> >          There is no header file for sanm_ag_rmc_recover()
> >
> > bfisher-linux: 20643>grep sanm_ag_rmc_recover */*.c
> > sm-sanm-agent/sanm-dmip-funcs.c:extern int
> > sanm_ag_rmc_recover(sanm_agContext_t *agc,
> > bfisher-linux: 20644>grep sanm_ag_rmc_recover */*.h
> >
> >
> >          Adding the include line:
> >
> > #include "../sm-rmc/rmc_eee_api.h"
> >
> > does not solve the problem;
> >
> > The declaration is:
> > API int32
> > rmc_msg_unlink_last_buf(rmc_msg_t *msg);
> >
> >
> > The warning is:
> >
> > cc1: warnings being treated as errors
> > /homes/bfisher/work/fisher-tuxstor-new/nfx-tree/code/sm-sanm-agent/sanm=
-dmip-funcs.c:
> > In function =E2=80=98sanm_dmip_da\taRcvHandler=E2=80=99:
> > /homes/bfisher/work/fisher-tuxstor-new/nfx-tree/code/sm-sanm-agent/sanm=
-dmip-funcs.c:2760:
> > warning: implicit de\claration of function =E2=80=98rmc_msg_unlink_last=
_buf=E2=80=99
> > make[2]: ***
> > [/homes/bfisher/work/fisher-tuxstor-new/nfx-tree/code/sm-sanm-agent/san=
m-dmip-funcs.o]
> > Error 1
> > make[1]: ***
> > [_module_/homes/bfisher/work/fisher-tuxstor-new/nfx-tree/code/sm-sanm-a=
gent]
> > Error 2
> > make[1]: Leaving directory
> > `/homes/bfisher/work/fisher-tuxstor-new/linux/kernel/linux-mips-2.6'
> > make: *** [all] Error 2
> >
> >
> >          Hence it stays, as I do not want to edit the rmc header
> > file.
> >
> > > 2701: undo
> > >
> >
> >          That is a blank line.
> >
> > > Sanm-dm-log.c:
> > >
> > > 25: include
> > >
> > extern int32
> > eee_forwardPacket(eee_descPtr_t edesc);
> >
> > The declaration is in eee-app.h however
> >
> > > 186: useless assignment
> > >
> >
> >          eee_forwardPacket() returns an
> >          error code; I prefer to save
> >          it rather than cast it to
> >          a (void) return to discard.
> >          It doesn't hurt.
> >
> > > Sanm-dm-msg.c:
> > >
> > > 25: include
> > >
> >
> >          Same as above the extern is required
> >          since the eee-app.h in included in
> >          sanm-dm-private.h as a prototype
> >          and not an explicit extern declaration.
> > > Sbm-test.c:
> > >
> > > 21: eee.h should include linux/wait.h
> > >
> >
> >          you could say that about <linux/spinlock.h>
> >          since that is required in nfx-defs.h.
> >
> >          eee.h never has included that in the past
> >          why start by adding that now.
> >
> > > Scsi-api.h:
> > >
> > > 23: remove useless comment
> > >
> >
> >          The comment is:
> >
> >          #include <bqueue.h> // TAILQ_ENTRY definition required
> >
> > > Scsi-msg.c:
> > >
> > > 33: include
> >          rmc_wrap_nonrmc_out() is a prototype only
> >          declaration in rmc_eee_api.h
> >
> > > Scsi.c:
> > >
> > > 171: unnecessary and wrong change.
> > >
> >
> >          Fixed; Here is the
> >
> >          static void
> > scsi_process_queued_responses(void *queue, uint32 timer_ref)
> > {
> >
> > > 1325, 1334, 1457: #ifdef DEBUG should not be necessary, ASSERT is
> > > noop if DEBUG is not defined.
> > >
> >
> >          I did not add those. You can remove them, legacy code.
> > > Scsi.h:
> > >
> > > 52: include
> > >
> >
> >          Legacy, I did not add that. You can change that,
> >          I'm leaving it as it was.
> > >
> > > Scsiio-cg.c:
> > >
> > > 40: duplicate definition was in nfx-defs.h
> > >
> >
> >          Not defined in nfx-defs.h.
> >
> > > 42: include
> > >
> >
> >          Protoypes
> > > Scsiio.c:
> > >
> > > 19, 23: useless comment.
> > >
> > > 40: duplicate definition
> > >
> >          Not in nfx-defs.h as it shouldn't be.
> >          This was to avoid eding the scsi
> >          code that use's this private macro.
> > > Storage.c:
> > >
> > > 32: remove
> > >
> >
> >          fine, it was a commented out header file include.
> > > Swapfile-api.h:
> > >
> > > 32: undo
> > >
> > int
> > swapfile_init(void);
> >
> > As you saying that is now included in the module.
> > ./sm-swapfile/swapfile.c:swapfile_init(void)
> > ./sm-swapfile/swapfile.c:module_init(swapfile_init);
> > ./sm-swapfile/swapfile-standalone.c:    swapfile_init();
> >
> >
> >          Yes, I'll remove it but why now?
> >
> >
> > > Swapfile.c:
> > >
> > > 186: undo
> > >
> > >
> >          I presume you are voting for the
> >          standard panic() definition rather
> >          than:
> >
> > > #if defined(SSC)
> > > void panic(char *format, ...)
> > > {
> > >     va_list ap;
> > >     char string[128];
> > >
> > >     va_start(ap, format);
> > >     vsnprintf(string, sizeof(string) - 1, format, ap);
> > >     va_end(ap);
> > >
> > >     printf("%s", string);
> > >     ASSERT(0);
> > > }
> > > #endif
> >
> >          I will remove it and would have had i
> >          see the duplicate definition of panic().
