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	861DA0537719934884B3D30A2666FECC010E4AC3E1@cosmail02.lsi.com
X-Sylpheed-End-Special-Headers: 1
Date: Thu, 1 Apr 2010 11:37:24 -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: <20100401113724.70d536af@ripper.onstor.net>
In-Reply-To: <861DA0537719934884B3D30A2666FECC010E4AC3E1@cosmail02.lsi.com>
References: <4BAC1931.9060304@lsi.com>
	<861DA0537719934884B3D30A2666FECC010E4AC3E1@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

Is this another April Fool's joke?

On Thu, 1 Apr 2010 11:56:43 -0600 "Kozlovsky, Maxim"
<Maxim.Kozlovsky@lsi.com> wrote:

> Looks good Bill. Go ahead and check in.
>=20
> -----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
>=20
> Folks:
>=20
> 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.
>=20
> Below are my responses to Max's code review.
>=20
> There are a few things that can be done later;
>=20
> 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.
>=20
> 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".
>=20
>     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.
>=20
> 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.
>=20
> 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.
>=20
>     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.
>=20
> 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.
>=20
>     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.
>=20
> 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.
>=20
>     I have NOT deleted all of this code
>     and these are needed to avoid adding
>     all the virtual server code to this
>     change list.
>=20
>     Rendell and I modified
>     a few header files in the BSD
>     tree to get things completely compiled.
>=20
> 7) I have included both Rendell's and Larry's
>     code review comments into this change
>     list set.
>=20
> 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.
>=20
> Hence we need to
> submit this as soon as possible.
>=20
> -- Bill
>=20
> -----------------------------------
> 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
>=20
>             Fine.
> >
> > 134: cache_create() definition is wrong.
>=20
>           The kernel definition in slab.h is:
>=20
> 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));
>=20
> The version from code/sm-malloc/malloc.h was:
>=20
> struct mm_cache *
> cache_create(uint32 flags,
>                 uint32 objsize,
>                 uint32 align,
>                 uint32 slabsize,
>                 void (*ctor)(void *obj, uint32 obj_size),
>                 void (*dtor)(void *obj));
>=20
> The version in nfx-types-extra.h that Andy defined is:
>=20
> #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)
>=20
> Hence the mapping from ctor and dtor to the kernel
> procedures is not correct;
>=20
> 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,
>=20
> =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
>=20
> Hence nobody is passing anything except NULL pointers
> for the ctor and dtor procedures, which is the reason
> we are not getting compiler errors.
>=20
> With no users of the ctor and dtor procedures in the
> nfx-tree, this is a non-issue until they are used.
>=20
> >
> > Nfx-types.h:
> >
> > 12: useless comment
> > 17,18: remove
>=20
>             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.
>=20
>             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.
>=20
>             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.
>=20
>          This works fine and the whole system is now compiled
>          and linked with this.
>=20
> >
> > 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.
>=20
>             Done. I have put back 0ULL, below are your previoous
> comments:
>=20
>             >Nfx-types.h
>=20
>      >> 71: why this is LL?
>      >>
>=20
>             Ask Rendell.
> >
> > 79: Why you are changing this from 0ULL?
>=20
>             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.
>=20
> > eee-poll.h:
> >
> > Unrelated and unnecessary changes.
>=20
>             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
>=20
>           "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.
>=20
>             It was never timespec. This is as per the
>             definition in the dev tree for eeeGMT_t:
>=20
>             timer-api.h
>=20
> // How to tell time in the embedded environment
>=20
> typedef struct {
>              int32 sec;
>              int32 usec;
> } eeeGMT_t;
>=20
> 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.
>=20
> > Eee-timer.h:
> >
> > 71: Unrelated unnecessary change.
> >
>             Fine.
>=20
> > Tpl_internal.h:
> > Copyright lsi
> > Lines > 80 characters
> >
>             Fixed.
>=20
> > 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.
>=20
>             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.
>=20
>            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.
>=20
>            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.
>=20
>             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.
>=20
>             The convention of having:
>             foo-api.h
>             foo.h
>             foo-struct.h
>=20
>             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.
>=20
>             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.
>=20
> > Eee-fwd.c:
> >
> > Unnecessary unrelated changes
> >
>             What specifically? Since I wrote this code,
>=20
> > 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.
>=20
> > tpl-rcv.c:
> >
> > 66: function prototypes should be in a header file
> >
> > Tpl.c:
> >
> > 69: useless comment
> >
>             fine.
>=20
> > 141: function prototypes should be in a header file
> >
> > 153: useless comment
> >
> > 168: This is gross and needs to be fixed.
>=20
>             What specifically is "gross"?
> >
> > Smp-api.h:
> >
> > 21: just remove the code and the comment, stop commenting the code
> > that was there before.
> >
>=20
>             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:
>=20
> 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
>=20
> bfisher-linux: 19074>ls -l ./Includes/smp-api.h
> -r--r--r--  1 bfisher software 3095 Aug 25  2009 ./Includes/smp-api.h
>=20
>             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.
>=20
>             done.
> >
> > 115: NFP_FP is defined for all the code, so this #ifdef is
> > pointless along with the comment
>=20
>             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.
>=20
>             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.
>=20
>             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.
>=20
>             I left the following in, but doubt it will be used.
>=20
>          /* The list of requests which are waiting for GETPORT result
>           */
>          req_wait_queue_t get_port_waiters;
>=20
>=20
> >
> > 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
>=20
>             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:
>=20
>             new: typedef struct _xdr XDR;
>=20
>             old: typedef XDR XDR;
>=20
> >
> > Defs.mk:
> >
> > File was not resolved correctly
>             resolved.
> >
> > 211: Why would you remove -DNETEEE_FRAGMENT? It was supposed to be
> > defined
>=20
>             Fixed.
>=20
>             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.
>=20
>             Who ever did this in the first place was missing the boat
>             and ignorant of networking protocols.
>=20
>             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
>=20
>             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.
>=20
>             I didn't add that, so blame somebody else, I removed them.
> >
> > Author-api.h:
> >
> > 28: prototypes should be in header files
> >
>=20
>             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.
>=20
>             This is another instance where some of the
>             code uses "author-includes.h" and other
>             code in the same directory does not.
>=20
> > Author-cmd.c:
> >
> > 2523: this is not how you keep compiler happy. Use correct format
> > character.
>=20
>             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.
>=20
>             The definition of:
>=20
> extern void
> cifs_access_token_free(sec_cifsAccessTokenFrag *tok, vs_t *p_vs);
>=20
> extern int32
> cifs_access_token_sort_groups(sec_cifsAccessTokenFrag *destAccessTok);
>=20
> are in: sm-cifs/cifs-smb-common.h
>=20
> which Andy commented out. I restored it. Fixed.
>=20
> >
> > 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:
>=20
> #if defined(EEE_DEBUG)
> #define EEE_PRINTF(x) printf x
> #else
> #define EEE_PRINTF(x)
> #endif
>=20
>             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.
>=20
> 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)",
>=20
>=20
> 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.
>=20
> In the meantime, things compile correctly for both cases.
>=20
> We can convert it when Larry proposes something more general.
>=20
> > 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.
>     >
>=20
>             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.
>=20
>             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.
>=20
>            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.
>=20
>             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.
>=20
> > Cifs-rpc-srvsvc.c:
> >
> > 995: redundant return
> >
> > 2285: unnecessary changes
> >
>             No, these fixed the infamous ISO C90 warnings.
>=20
>             "warning: ISO C90 forbids mixed declarations and code"
>=20
>             I have no preference but since -Wall is defined I have
>             fixed lots of these. The scoping was not being
>             used.
>=20
>             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.
>=20
>             The state machine code could have been smarter
>             than the simple switch template it follows.
>=20
> > 2989: should not need changing this
> >
>             reverted to the old symbol ACPU_CONN_PSEUDO
>=20
> > Cifs-rpc-utils.c:
> >
> > Use eee_printf()
>=20
>             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.
>=20
> > Cifs-rpc-wkssvc.c:
> >
> > 182: unnecessary changes.
>=20
>             Fixes a warning that the compiler issued
>             on potentially uninitialized variable.
>             Since it doesn't hurt.
> >
> > Cifs-rpc.c:
> >
> > 73: Use eee_printf()
>=20
>             See above solution description. We'll convert
>            when Larry describes the general solution.
>            It compiles correcctly for all cases now.
> >
> > Uchar8 changes
>=20
>             resolved.
> >
> > Cifs-brlock.c:
> >
> > 57: function prototypes must be in include files.
> >
>            fixed.
>=20
>             Warnings like these persist, due to the fact
>            that the macro definitions are not clean.
>=20
>             code/sm-cifs/cifs-brlock.c:679:
>             "warning: ISO C90 forbids mixed declarations and code"
>=20
> > Cifs-conn-api.h:
> >
> > 34, 373: function prototypes must be in include files.
> >
>           fixed.
>=20
> > 752: redundant return
>=20
>           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.
>=20
> > 741: useless comment
> > 742: cast is redundant
> > 747: useless comment
> >
>           removed just for you.
>=20
> > 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.
>=20
> > 1065: don't just comment out code
>=20
>           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.
>=20
>           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.
>=20
> >
> > 1521: huh? Refcnt should be maintained here, session has a pointer
> > to connection, should have a reference.
> >
>=20
>           The ref count on the "ctx->ccdc_conn" ?
>=20
>           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.
>=20
>           Hence the code:
>=20
>           //
>            // 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);
>=20
>           I put it back, however Rendell can fix this and remove the
>           vs list from the connection block.
>=20
>           He has already done this in his version.
>=20
> > 1547, 1548: undo formatting changes
> >
> > 1576: The return value is unused
>=20
>             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.
>=20
>             The callers include:
>=20
> 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);
>=20
>=20
>             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.
>=20
> > Cifs-csn.c:
> >
> > 58: function prototypes must be in include files.
> >
>             fixed.
>=20
> > Cifs-kerb.c:
> >
> > 58: function prototypes must be in include files.
> >
>             Added sm-eee/eee-app.h
>=20
> > Cifs-negotiate.c:
> >
> > 56: function prototypes must be in include files.
> >
>             fixed.
>=20
> > Cifs-ntlmv2.c:
> >
> > 82: unnecessary change
>=20
>             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.
>=20
>             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
>=20
>             removed, but the comments added clarity.
> >
> > Cifs-req-api.h:
> >
> > 43: function prototypes must be in include files.
> >
>             fixed.
>=20
> > 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.
>=20
>           The globals:
>=20
>           extern uint32 nfxMyCPUId;
>           extern uint32 nfxMySlotId;
>=20
>           should be converted to constants since
>           this is the txrx case only. What did
>           you convert them to on the FP side?
>=20
> > 1621: unnecessary change
>=20
>          I added:
>          #endif /* CIFS_DONT_FREE_REQUESTS */
>=20
>          versus
>          #endif
>=20
>          This definitely adds clarity since this
>          code has lots of ifdef's
>=20
> > 2077: useless comment
>       /* If command is an ANDX command, then we set a flag
>        * indicating the same
>        */
>=20
>          I didn't add nor remove that. I left it unchanged.
>=20
> > 2085: code commented out
> >
>          What a blank line was removed?
>=20
> > 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.
>=20
>          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.
>=20
>          We are at a happy medium these days. If we
>          were to start over, we could rework them.
>=20
>          Having fs-include.h include over 50+ other header
>          files, so that is has everything it needs is
>          overkill in the other direction.
>=20
>          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.
>=20
>          Finding the exact disk file format is another hidden
>          question, since it isn't immediately obvious.
>=20
>          We are all working toward the same goal, it just
>          might take lots of steps to get there.
>=20
> > 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.
>=20
> > 4208: useless comment
>=20
>=20
> /* Validate the inputs.
>         */
>=20
> >    what ?
>=20
>=20
> > Cifs-smb-linkrename.c:
> >
> > 338: unnecessary change
> >
>           equivalent.
>=20
> > cifs-tcon.c:
> >
> > 823: unnecessary change
> >
>           Equivalent, put it back to make you happy.
>=20
> > 1011: unnecessary change
> >
>           cifs_tree_connect_verify_server_name
> > Cifs-trans-common.c:
> >
> > 55: function prototypes must be in include files.
> >
>           fixed.
>=20
> > Cs-api.c:
> >
> > 55: function prototypes must be in include files.
>=20
>           added
>           #include <sm-vsvr/vs-api.h>
>=20
> >
> > Dcache-display.c:
> >
> > 57, 286, 355: function prototypes must be in include files
> >
>=20
>           added dcache-stats.h as somebody deleted it.
>           They both are in-lines.
>=20
>           extern uint32 eee_getAvailableNbrOfBufs(uint32 buf_size);
>=20
>           This is defined in:
>=20
> smoo-linux/linux-stubs.c:size_t eee_getAvailableNbrOfBufs(int type)
> smoo-linux/linux-stubs.c:EXPORT_SYMBOL(eee_getAvailableNbrOfBufs);
>=20
>           and there is NOT and smoo-linux/liux-stubs-api.h header
> file.
>=20
> > Dcache-hash.c:
> >
> > 65: GFP_ATOMIC means __GFP_HIGH
>=20
>              /* 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;
>=20
>=20
>           Yes, this can be reduced to a single flag.
>=20
>               /* Create global hash table for file data (not
> directory data) */
>        dcacheHash =3D kzalloc(DCACHE_HASH_NUM_BUCKETS *
> sizeof(dcacheHash_t), GFP_ATOMIC);
>=20
> >
> > 66: redundant return
>=20
>           nit.
> >
> > 707: do not remove asserts
> >
>=20
>           This ASSERT fails co compile, since ASSERT's are now
>           turned on and the field no longer exists.
>=20
>                 // ASSERT(dcp =3D=3D
> dcp->dc_fcb->fcb_dcache.dcachePtr.lh_first);
>=20
>           The fdb_dache.dcachePtr no longer exists:
>=20
>=20
> typedef struct dcache_s {
>=20
>        /* 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;
>=20
>           from the definition of fcb_s we find:
>=20
>       /* 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;
>=20
>           The ASSERT is WRONG/BROKEN as there is no dcachePtr field
>           in the BSD_LIST_HEADER macro defined in bqueue.h
>=20
>           I will try and convert it to:
>=20
>           ASSERT(dcp =3D=3D dcp->dc_fcb->fcb_dcache.lh_first);
>=20
> > Dcache-rx.c:
> >
> > 61: function prototypes must be in include files
> >
>=20
>           I don't know about MUST. I added
>           #include <sm-eee/eee-app.h>
>=20
> > Dcache-struct.h:
> >
> > 215: comment format
> >
>=20
>           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.
>     */
>=20
>=20
> > Dcache-tune.c:
> >
> > 54: function prototypes must be in include files
> >
>=20
>           The following are defined in smoo-linux/linux-stub.c
>           and have NO equivalent header file.
>=20
> extern uint64 eee_getAvailableNbrOfBufs(int32 buf_size);
> extern uint64 eee_getTotalNbrOfBufs(int32 buf_size);
> extern uint64 eee_getAvailableNbrOfDescs(void);
>=20
>=20
> > 216: redundant return
>=20
>           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
>=20
>            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.
> >
>=20
>           fixed, via adding #include "../sm-libc/libc.h"
>=20
> > Evm-cfgd.c:
> >
> > 30: include something
> >
>=20
>           same as above.
>=20
> > Evm-db.c:
> >
> > 27: include
> >
>=20
>           same as above.
>=20
> > Evm-diag.c:
> >
> > 27: include
> >
>           same as above.
> > Evm-event.c:
> >
> > 33: include
> >
>           same as above.
> > Evm-sdm.c:
> >
> > 19: include
>=20
>           same as above.
> >
> > Evm-spm.c:
> >
> > 27: include
>=20
>           same as above.
> >
> > Evm-util.c:
> >
> > 57: include
>=20
>           same as above.
> >
> > Fs-dnlc.c:
> >
> > 21: include
>=20
>           memsize_const() was defined in:
>=20
>           sm-sb1250/mem-api.h:memsize_const(uint64 c_1gb,
>=20
>           which no longer exists and was NOT ported over.
>=20
> >
> > Cstring.c:
> >
> > 23: useless comment
>=20
>           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.
>=20
>           See long back comment on eee_print()
>           which does NOT do the proper thing.
>=20
>           Can be converted with Larry's new scheme;
>=20
> #ifdef __KERNEL__
> #define ICU_PRINT(_fmt, ...) printk(_fmt, ##__VA_ARGS__)
> #else
> #define ICU_PRINT(_fmt, ...) printf(_fmt, ##__VA_ARGS__)
> #endif // __KERNEL__
>=20
>=20
> > Lock.c:
> >
> > 61: include
> >
>=20
>           See previous comment on no equivalent.
>=20
> > Nb-ss.c:
> >
> > 65: include
> >
>           fixed.
>=20
> > 285: undo formatting changes
> >
>           very minor nit:
>=20
>        } else { /* Remember client name */
>=20
> versus:
>=20
>       } else {
>            /* Remember client name.
>             */
>=20
>           You are now arguing CR
>           versus blank!
>=20
> > 295: redundant return
> >
>=20
>           Removed just to please you.
>=20
> > Nb-tpl.c:
> >
> > 56: include
> >
>=20
>           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];
>        }
> }
>=20
>=20
> have no linux equivalent and this code needs
> to be reworked for finding the raddr from the
> skb.
>=20
> Adding an include is not solving the problem here
> since these need to interrogate the
> skb to get the header location, etc.
>=20
> In fact Rendell and I are reworking the
> aclling api sinc the follwing is not valid
> under linux.
>=20
> 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;
>=20
>        nb_globalCfg.dbgCounters.nb_tplRcvPktInd++;
>           .............
>=20
>=20
>=20
> > 98: unnecessary change
> >
> > 178: unnecessary change which changes the logic
> >
> The previous version was:
>=20
>        /* 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.
>                 */
>=20
>                goto nb_tplNsRcvPktInd_done;
>=20
>=20
>           The reworked version is:
>=20
>        if ((pkt->flags & PKT_BROADCAST) && (conn->bindCb.laddr)) {
>               /* Rcv bcast pkt on unicast port, drop it */
>                goto nb_tplNsRcvPktInd_done;
>        }
>=20
>=20
>           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.
>=20
>           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.
>=20
>           Are saying that the laddr in the bind
>           block is not the same as the previous one
>           in the connection block?
>=20
>           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.
>=20
> > Nb-util.c:
> >
> > 57: include
> >
>           removed.
>=20
> > Ncp-api.c:
> >
> > 60: include
> >
>           removed.
> > 1310, 1672: don't comment out code
> >
>           // atomic_inc(&txrx_requests_pending);
>           in both cases.
>=20
>           This is NOT an atomic variable any more
>           and has been moved into the VS code;
>=20
> bfisher-linux: 20338>grep txrx_requests_pending */*.h
> sm-vsvr/vs-struct.h:    uint32 txrx_requests_pending;
>=20
> 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);
>=20
> 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);
>=20
> This is an OPEN issue in the VS code as per the comment
> in vs-api.c. This is Rendell's problem to solve.
>=20
> static void
> vs_proc_get_stats_summary_req(rmc_msg_t *req_msg, rmc_msg_t *rsp_msg)
> {
>=20
> ---------------
>=20
> 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.
>=20
> In face it is only put into the rsp->req_stats structure
> and printed out in the ssc-nfxsh/cmd-stats.c code.
>=20
> Also this is simply and kpi type statistic:
>=20
> 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);
>=20
>                req->rh_state =3D NCP_VOLUME_EVENT_0;
>                req->nr_volId =3D ev->volId;
>                req_add_to_active_queue(req, REQ_PRIORITY_WAKEUP);
>            }
>        }
> }
>=20
>=20
> > Nfs-conn-api.h:
> >
> > 196: unnecessary change
> >
>=20
>           Line is: "Routine Description:"
>=20
> > 224: need refcnt on the connection structure
> >
> > 290, 484: include
> >
> > 490: should not need to change this
> >
>=20
>           This is an open issue;
>=20
>           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.
>=20
> 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 */
> }
>=20
>           The nfs_conn_t structure with the ac_pending_request
>           list was maintained until a solution is determined.
>=20
>           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
>=20
>           These data structures are not going to work.
>=20
>           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.
>=20
>           We will have to work out a solution.
>=20
> > Nfs-conn-struct.h:
> >
> > There should not be any changes in this file.
>=20
>           I added the new includes and a compilation
>           legth check.
> >
> > Nfs-conn-init.c:
>=20
>           The file is nfs-conn.c: nfs_conn_init() is the procedure;
>=20
>           Also the code does not zero out the rpc_client space
>           since that is required;
>=20
>           The old code was:
>=20
> 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));
>=20
>        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;
>=20
>        LIST_INIT(&conn.v->ac_pending_requests);
>=20
>        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:
>           .............
> }
>=20
> >
> > 215: acpu_conn_init(). Should not need to change any of this code
> > really
> >
> > Undo comment format changes
> >
>=20
>           The ac_pending_request is broken since that
>           needs to be moved somewhere else rather
>           than the socket sk_user_data area.
>=20
>           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.
>=20
>           A new set of global structures for this
>           type of operations need to be created.
>=20
>           We need a discussion about this.
>=20
> > 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
>=20
>             fixed
> >
> > 355, 429, 597: don't comment out code
> >
>             fixed.
>=20
> > 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.
>=20
> > 217: undo formatting changes
> >
>             fine.
>=20
> > Req-utils-api.c:
> >
> > 124: undo
> >
>            That is a blank line, undo what, nothing changed
>=20
> > Smb-mgmt.c:
> >
> > 353, 411, 627,724: Don't comment out asserts.
>=20
>            The assert:
>               // ASSERT(!CM_IS_TXRX_NCPU); has no meaning
>=20
>            Line 411: is NOT commented out:
>=20
>               VERIFY(!sbm_verifyIsCODInSac(dest_cod, 0));
>=20
>            Line 627:
>        VERIFY(sbm_verifyIsCODInSac(src_cod, 1));
>            is NOT commented out.
>=20
>            Line 724 is NOT commented out:
>        VERIFY(sbm_verifyIsCODInSac(dest_cod, 1));
>=20
>=20
> > Sbm-txrx.c:
> >
> > 130, 156: don't comment out asserts.
>=20
>=20
> // ASSERT(!CM_IS_TXRX_NCPU); This has not meaning
>=20
>            Line 156 is not an assert NOR Verify.
>=20
>=20
> >
> > Sbm-db.c:
>=20
>            You must mean /sm-sdm/sdm-db.c
> >
> > 69: undo
>=20
>            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().
>=20
> >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);
>=20
>=20
> 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");
>=20
>=20
> No panic has been removed that I can see
>=20
>=20
>=20
> > Sdm-init.c:
> >
> > 55: include
> >
> > Sdm-main.c:
> >
> > 1987: don't comment out asserts
>=20
>            The code in question:
>=20
>            // ASSERT(sizeof(sdm_msgTab) =3D=3D
>             //   ((SDM_MID_LAST - SDM_MSG_BASE) *
> sizeof(sdm_msgTab_t)));
>=20
>            Causes compilation errors now that ASSERT is not a nop-op
>            like in Andy's version.
>=20
>            The code in sdm.h defines the SDM Message Processing Table
> to be:
>=20
> /* SDM Message Processing Table
>      */
> extern sdm_msgTab_t sdm_msgTab[];
>=20
>            However the size is set at code initialization time in the
>            file sdm-msg.c:
>=20
>=20
> /* 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  },
>=20
>=20
>            In the header file sdm-api.h we find:
>        /* Insert all new messages before this entry.
>          */
>         SDM_MID_LAST
>=20
> } sdm_msgTypes_t;
>=20
>=20
> typedef enum {
>         SDM_MID_DEV_LIST_REQ =3D SDM_MSG_BASE,
>=20
>=20
>            That is all well and good but the compiler barfs with the
>            following err:
>=20
>=20
>=20
> >
> > Sdm-msg.c:
> >
> > 64: remove
>=20
>            Fine but it was a comment!
> >
> > Sdm-verify.c:
> >
> > 48: include
>=20
>            the external definition of panic()
>            is in include/linux/kernel.h for
>            the kernel:
>=20
> 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;
>=20
>=20
> However this file is user level code with the following includes:
>=20
> #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>
>=20
>=20
> Looking at the cross compilation header files:
>=20
>=20
> 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
>=20
>            Hence I don't know if this is resolved by anybody but
> stdlib.h and that still produces a warning.
>=20
> >
> > Sdm.h:
> >
> > 33: include
> >
>            fixed.
>=20
> > Spm-msg.c:
> >
> > 30: useless comment
>=20
>            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.
>=20
> > Kpi-lib.c:
> >
> > 538: unnecessary change
>=20
>            Not the compiler complained about a
>            use of a potentailly unitialized
>            variable.
> >
> > Kpi.h:
> >
> > 666: useless comment
>=20
>            It's true so what not state the obvious
>            since REQ_TIMES_ON is always defined.
> >
> > 691 and so on: comment format changes
>=20
>            That is a blank line, nothing
>            was changed that I am aware of.
> >
> > Stats-client.c:
> >
> > 236: does not need cache align, remove comment
>=20
>            Fine, but As rendell about that
>            since these are his changes.
>            I removed the comment.
>=20
>            SLAW_HWCACHE_ALIGN, // 64 * 1024
>=20
>            I subsituted ZERO for the flags 'SLAW_HWCACHE_ALIGN'
>=20
> 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))
> {
>=20
> >
> > 755: wrong
> >
>            fixed
> > 945: wrong
> >
>            fixed.
>=20
> > Stats-dbg.c:
> >
> > 15: useless comment
>=20
>            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
>=20
>            Doesn't seem to appear in any header file:
>=20
> bfisher-linux: 19817>pwd
> /homes/bfisher/work/fisher-tuxstor-new/nfx-tree/code
>=20
> 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);
>=20
> bfisher-linux: 19819>grep req_stats_cmd_rcv */*.h
>=20
>=20
>=20
> >
> > Stats.h:
> >
> > 19: useless comment
>=20
>            //printk ?
> >
> > Cmd-utils.c:
> >
> > 61, 80: redefines nfx-defs.h definition
>=20
>            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?
>=20
>            We will will do this change
>            along with the others using
>            Larry's version to
>            resolve the 32-bit versus
>            64-bit compilation.
>=20
>            Right now it compiles just fine.
> >
> > 5115: unnecessary change
>=20
>            What that is a blank line. Converting
>            to use a macro rather than hard
>            coded printf versus printk?
> >
> > cmd-utils.h:
> >
> > 70: redundant return
>=20
>            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.
> >
>=20
>            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)
>=20
>         /* Tell TxRx where the shared memory is located.
>          */
>         int32 rc =3D eee_fwd_packet((void *)fs_rpc_my_buffers,
> EEE_FS_RPC_QUEUE_INDEX);
>=20
>         int rc =3D eee_registerPollingFunc(EEE_HIGH_PRIORITY,
>                                          eee_process_TxRx_FP_queue,
>                                    &eee.rcv_queue[EEE_FS_RPC_QUEUE_INDEX],
>                                          NULL);
> .........
>=20
> > Vscan-api.c:
> >
> > 2236, 5565: this should be unnecessary once you fix rpc.h.
> >
>=20
> Line 2236:
>=20
> 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;
>=20
>         if (vs->vs_unbindAllBCBWaiter !=3D NULL) {
>             vs_decPendingVScanUnbinds(vs->vs_unbindAllBCBWaiter);
>             vs_checkAndWakeupUnInitRequest(vs);
>         }
>=20
> #ifdef REF_TRACKING
>         ref_del_holder(bind, scanner);
> #endif // REF_TRACKING
>         vscanner_rele(scanner);
>         return;
> }
>=20
>=20
> Line 5565:
>=20
> void
> vscan_scanner_closeconn(req_hdr_t *reqHdr,
>                             struct vscan_scanner *scanner)
> {
>         tpl_bindCb_t *bind_p;
>=20
>         /* Get the connection and close it
>          */
>         if (scanner->rpc_client.conn_state =3D=3D RPC_CONN_ESTABLISHED) {
>=20
>             tpl_delConnReq(scanner->rpc_client.conn);
>=20
>             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);
>=20
>             if (bind_p->acpuState =3D=3D TPL_IPC_CONN_ADDED) {
>                 tpl_unbindReq(bind_p);
>             }
>             if (reqHdr) {
>                 vs_incPendingVScanUnbinds(reqHdr);
>             }
>         }
> }
>=20
> 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
>=20
>=20
> What do either of these have to do with rpc.h?
>=20
> This is the original code with the bcb call
> back scheme which is ONLY used by this
> vscan code. Nobody else even uses this.
>=20
> Who ever added the REF_TRACKING scheme
> was trying to solve something
> like the socket/bind block going away.
>=20
> 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.
>=20
> > Vscan.h:
> >
> > 9: undo, Includes/eee is in the path.
>=20
>            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
>=20
>            This was Rendell's fix:
>=20
> /*
>=20
> *------------------------------------------------------------------------=
------
>      * Name         : vs_registerPorts
>      *
>      * Description  : register all well known ports to the IP address
> of
>      *                this VS.
>      *
>      * Return       : NFX_ERR/NFX_OK
>      *
>=20
> *------------------------------------------------------------------------=
------
>      */
> static int32
> vs_registerPorts(vs_t *vs)
> {
>         int32 rc =3D NFX_OK;
>         vs_if_t *vif;
>         vs_ip_t *ip;
>=20
>         ASSERT(vs !=3D NULL);
>         ASSERT(!(vs->vs_flags & VS_UPDATE_IN_PROGRESS));
>         ASSERT(!(vs->vs_flags & VS_UNINIT_IN_PROGRESS));
>=20
>         /* 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;
>=20
>         /* 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;
>             }
>         }
>=20
>         return rc;
> }
>=20
>            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
>=20
>            /*
>=20
> *------------------------------------------------------------------------=
------
>      * 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
>      *
>=20
> *------------------------------------------------------------------------=
------
>      */
> static int32
> vs_bindIp(vs_t *vs, vs_if_t *vif, vs_ip_t *ip, uint16 disabledProto)
> {
> #ifdef VIRTUAL_SERVER_IMPLEMENTED
>=20
>=20
> 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.
>=20
>            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.
>=20
>            This is is Rendell's problem. I added a comment.
> >
> > 907: don't comment out code
>=20
>                /* 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;
>=20
>=20
>=20
>            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
> >
>=20
>            The comment is correcct:
>=20
>         /* 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;
>=20
>=20
>            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.
>=20
> > 1136: should not be done in this change. Let Rendell do that.
> >
>=20
>            These were given to me by Rendell. He can fix them
>            in his change list.
>=20
> > Bsd-dorf.c:
> >
> > File not merged correctly
>=20
> 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-dorf.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
>=20
> Fixed, you guys have since deleted whole pieces of
> it.
> >
> > Linux-stubs.c:
> >
> > 38: useless returns, code formatting changes
>=20
>            Re3vert, the code is a mess, the
>            formatting and returns are the
>            least of the problem. Things like:
>=20
> size_t eee_ramTotalHeapSize(void)
> {
>         return 4L * 1024 * 1024 * 1024;
> }
>=20
> size_t eee_getAvailableNbrOfBufs(int type)
> {
>         return 48;
> }
>=20
> size_t eee_getTotalNbrOfBufs(int type)
> {
>         return 22;
> }
>=20
> 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.
>=20
>=20
> 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.
>=20
>=20
> The following is rather strange:
>=20
> do_stack_trace(uint64 sp, uint64 fp, uint64 *buf_p, int num_frames);
>=20
> void
> do_stack_trace(uint64 sp, uint64 fp, uint64 *buf_p, int num_frames)
> {
> }
>=20
> 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.
>=20
> > 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.
>=20
> > Ndmp-data.c:
> >
> > 2404: wrong, changes meaning
>=20
>            fixed.
> >
> > Ndmp-linux.c:
> >
> > 18: useless comment
> >
> > Ndmp_xdr.h:
> >
> > 9: this should not be necessary, correct include is in the path.
>=20
>            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..
>=20
>            The extern's:
>=20
>            extern void *malloc(size_t);
>            extern void free(void *);
>            extern void *realloc(void *, size_t);
>=20
>            Are a user level program include problem
>            which are NOT defined in stdlib.h
>=20
>            Looking around we find:
>=20
>=20
> /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__;
>=20
>=20
>            This is the lack of the test writer fixing this.
>            These were added to get away of the warnings.
>=20
>=20
> >
> > 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.
> >
>=20
>            Fine.
>=20
> > Rmc.c:
> >
> > 34: huh?
>=20
>            ./ssc-rmc/rmc.c
>=20
>            Blowing up via using it's own version of VERIFY is
>            not the way to handle this;
>=20
> #undef VERIFY
> // define VERIFY(e) ((void) ((e) ? 0 : (*(volatile int *)0 =3D 0)))
> #define VERIFY(e)
>=20
> The code should use the standard verify and not roll it's
> own. I made it use the standard version.
>=20
> >
> > Rmc_api.c:
> >
> > 2734: huh?
>=20
>            ./ssc-rmc/rmc_api.c
>=20
>            the code:
>=20
>            // ASSERT(msg->ihdr);
>=20
> The definition is for a msg is:
>=20
> 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 */ ............
>=20
> The definition os a rmc_msg_hdr_t is from
> sm-rmc/rmc_common.h
>=20
> /* 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;
>=20
>=20
> 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.
>=20
>=20
>            The compiler was complaining about this
>            use of the ihdr is a structure
>            with a constructor like:
>=20
>=20
>            It must have been a pointer in
>            the past, now it'san error.
>=20
>            I'll delete it;  The only error
>            check would be if you were sent a
>            NULL msg pointer.
>=20
> >
> > Rmc_pm.c:
> >
> > 18: useless comment. Rmc_internal.h should include sys/types.h if
> > it needs something from there.
> >
>=20
>            It doesn't. It needs it for the in_addr_t definition.
>=20
> > Rmc_rpc_api.c:
> >
> > Changes must be unnecessary, This file was compiling just fine
> > without them.
> >
> ./ssc-rmc/rmc_rpc_api.c
>=20
>=20
>            rmc_internal.h does not cover all the bases,
>            since it does not include sys/types.h nor
>            linux/spinlock.h
>=20
>            The changes are:
>=20
> #ifdef SSC
> #include <sys/types.h>  // Need definition for in_addr_t
> #include <linux/spinlock.h>
>=20
> #include "rmc_internal.h"
> #include "../sm-anpssc/anpssc-api.h"
>=20
> #else
> #include <linux/spinlock.h>
> #include "../sm-rmc/rmc_internal.h"
> #endif // SSC
>=20
>=20
>=20
> > Esm-nfx.c:
> >
> > 54: nonsense comment. What pragma? The definition you are looking
> > for is __cacheline_aligned.
> >
>=20
>            Not so. The POSIX C standard defines the pragma
>=20
> // 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
>=20
>            pragma 6 defines the power of 2 alignment.
>            The compiler does NOT support these pragma
>            and complains.
>=20
>            yes you can use the __cacheline_aligned option
>            however the compiler should also support
>            this option.
>=20
>            The dev tree has:
>=20
>            nfx_global_spinlock_t           esm_yieldQueueSpin;
>=20
>            and:
>=20
> /* 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 {
>=20
>         nfx_spinlock_t
> #if defined(NFX_MOD_SSC) || defined(__OpenBSD__) || defined(SSC_MGMT)
> || defined(TUXRX)
>=20
>             /* This is needed because the SSC compiler cannot handle
> anonymous
>              * unions.
>              */
>             spin
> #endif
>             ;
>=20
>         uint64 align[CACHELINE_SIZE / sizeof(uint64)];
> } nfx_global_spinlock_t;
>=20
>=20
>            A pretty ugly hack to get alighment and not
>            exactly portable. I presume this was due
>            to the ancient compiler being used.
> :
>=20
>=20
> > Esm.c:
> >
> > 22: useless comment
> >
> > 71: useless comment
> >
>=20
>            fine.
>=20
> > 80: include
>=20
>            Added eee-poll.h
> >
> > 128: unnecessary change
> >
> > 1012: remove comment
> >
> >
> > Evm-io.c:
> >
> > 34: useless comment
> >
> > 49: include
>=20
>            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:
>=20
> 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"
>=20
> > 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.
>=20
> > 570...: undo
> >
>=20
>            When the generic scheme is done, then
>            all the user's will be converted.
>=20
> > File-buf-struct.h:
> >
> > 30: useless comment. If vcb_s needs sfr_t, it should include
> > sfr-struct.h
>=20
>            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:
>=20
>            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
>=20
>=20
>            The procedure
>            file_get_security() is ONLY defined for the FP case.
>            It complains for the SSC: From the make:
>=20
> 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 \
>=20
>            Hence I did NOT break anything. This is required!
>=20
> > File-msg.h:
> >
> > 780: undo
> >
>=20
>            When we convert to Larry's general scheme.
>=20
> > File-server.c:
> >
> > 177: remove useless comment
>=20
>            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.
> >
>=20
>            This code was there before.
>=20
> >        // 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; // }
>=20
>            hence I did not make this change. You'll have to look
>            at the log to find the person.
>=20
> > Fs-am-api.h:
> >
> > 776: undo
> >
>=20
>            this sis required for the SSC compilation.
>            Will covert to Larry's scheme with another
>            change list just covering this.
>=20
> > Fs-api.c:
> >
> > 39: remove if this is defined elsewhere
> >
> //@@@
> // void QUEUE_PTR_INC(address_t *, void *, address_t *);
>=20
> Yes in:
>=20
>            bfisher-linux: 19964>grep QUEUE_PTR_INC onstor/*/*.h
>=20
> onstor/sm-eee/eee-queue.h:#define QUEUE_PTR_INC(_ptr, _end, _start) {
>=20
>=20
> > 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.
>=20
> > Fs-context.c:
> >
> > 2361: don't comment out asserts
> >
>            fixed
> > Fs-dump-restore-rmc.c:
> >
> > 168: undo
> >
> > Fs-dump-restore-rmc.h:
> >
> > 90: undo
> >
>=20
>            If you need atomic for this counter
>            something must be wrong with your
>            state block locking.
>=20
>            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.
>=20
>            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?
>=20
>            The flags, etc. For example the
>            the rmcMsgsSent is not atomic
>            and that is what you are compariing
>            to all over.
>=20
>            What is the difference here, you can
>            get interrupted and the count will
>            be off? You aren't doing preemption,
>            nor interrupts, please explain?
>=20
> > Fs-dump.c:
> >
> > 35: include
> >
> > Fs-includes.h:
> >
> > 321: This definition was in nfx-defs.h
>=20
>          What are you referring to:
> #define ASSERT_LOCK_OWNED(x) ASSERT(spin_is_locked(x))
>=20
> That is NOT in nfx-defs.h. I added this to avoid
> editing huge amounts of code which used the
> ASSERT_LOCK_OWNED() macro.
>=20
> >
> > 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);
>=20
> #ifndef FS_FSDB
> // Implement an equivalent function for standalone whenever convenient
> #define uint32_checksum(data, size, len)  0xFEADFACE
> #endif // FS_FSDB
> #endif // FS_STANDALONE
>=20
>=20
> > Fs-primitive.h:
> >
> > 464: undo
>=20
> #ifdef __KERNEL__
> #define FS_PRIM_PRINT printk
> #else
> #define FS_PRIM_PRINT printf
> void panic(char *fmt, ...);
> #endif // __KERNEL__
>=20
>=20
> Will convert to LArry's scheme, until
> then this compiles and links just fine.
>=20
> >
> > Fs-rdwr.c:
> >
> > 26: include
>=20
> The is no header file for this, it was deleted.
>=20
> extern eee_desc_t *sbm_getDescFromCOD(nfx_cod_t cod);
>=20
>          This compiles and links just fine.
>=20
> > Fs-rdwr.h:
> >
> > 1206: why change it
> >
>       ASSERT(spin_is_locked(&queue->spin));
>=20
>          As opposed to
>=20
>          #define ASSERT_LOCK_OWNED(x) ASSERT(spin_is_locked(x))
>=20
>          Aren't they equivalent?
>=20
> > Fs-snap.c:
> >
> > 29: include
>=20
>          extern struct tm *
> localtime(time_t *tt, int32 no_adjust);
>=20
>          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;
>=20
> struct tm
> *localtime(const time_t *val, int32 no_adjust);
>=20
>=20
>=20
>=20
>=20
> > 3192: undo.
> >
>=20
>          The old scheme with % gets compiler errors;
>=20
>           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);
>=20
> I talked with Jobi over this change and he approved it.
> I left the comment to leave a history.
>=20
> > Fs-vol-exer.c:
> >
> > 19: include
> >
>=20
>          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);
>=20
>          There is no header file for random32().
>=20
>=20
> > Tape.c:
> >
> > 53: include
> >
> extern nfx_cod_t sbm_getCODFromDesc(eee_desc_t *desc);
> extern eee_desc_t *sbm_getDescFromCOD(nfx_cod_t cod);
>=20
> There is NO header file api.
>=20
> > Icu_wrappers.h:
> >
> > 19: remove
>=20
>          I agree, it was left there for historical
>          reasons.
> >
> > Ispfc_aen_handler.c:
> >
> > 34: COUGAR is always defined so just remove that block.
> >
>=20
>          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
>=20
> > Ispfc_link.c:
> >
> > 30: remove useless comment.
> >
> #include <sm-eee/eee-api.h> /* for getappid */
>=20
>          The comment is the only reason this
>          header file needs to be included.
>=20
> > 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.
>=20
> #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
>=20
>=20
>          This procedure is defined as a smoo-linux/linux-stubs.c
>          file which does NOT have an associated foobar-api.h
>          header file;
>=20
> 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" },
>=20
>=20
> > Ispfc_private.h:
> >
> > 54: should be in nfx-defs.h
> >
>=20
>          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;
>=20
> #define ASSERT_LOCK_OWNED(x) ASSERT(spin_is_locked(x))
>=20
> > Sanm-dm-main.c:
> >
> > 25: remove useless comment. Fs-rdwr.h should include esm-api.h.
> >
>=20
>          The line in question is:
>=20
> // Description:     Initializes the SanMirror data mover module.
>=20
>=20
>          Is that not true?
>=20
>          The file sm-fs/fs-rdwr.h has NO includes in it.
>=20
>          grep'ing the code we find:
>=20
> 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"
>=20
>=20
>          Hence you can make this change later, it
>          is not required to get this patch done.
>   >
> > Sanm-dmip-funcs.c:
> >
> > 86: include
> >
>=20
>          The lines in question are:
>=20
> 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);
>=20
> I will add it. It sure isn't strategic.
>=20
>=20
>          There is no header file for sanm_ag_rmc_recover()
>=20
> 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
>=20
>=20
>          Adding the include line:
>=20
> #include "../sm-rmc/rmc_eee_api.h"
>=20
> does not solve the problem;
>=20
> The declaration is:
> API int32
> rmc_msg_unlink_last_buf(rmc_msg_t *msg);
>=20
>=20
> The warning is:
>=20
> cc1: warnings being treated as errors
> /homes/bfisher/work/fisher-tuxstor-new/nfx-tree/code/sm-sanm-agent/sanm-d=
mip-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-d=
mip-funcs.c:2760:
> warning: implicit de\claration of function =E2=80=98rmc_msg_unlink_last_b=
uf=E2=80=99
> make[2]: ***
> [/homes/bfisher/work/fisher-tuxstor-new/nfx-tree/code/sm-sanm-agent/sanm-=
dmip-funcs.o]
> Error 1
> make[1]: ***
> [_module_/homes/bfisher/work/fisher-tuxstor-new/nfx-tree/code/sm-sanm-age=
nt]
> Error 2
> make[1]: Leaving directory
> `/homes/bfisher/work/fisher-tuxstor-new/linux/kernel/linux-mips-2.6'
> make: *** [all] Error 2
>=20
>=20
>          Hence it stays, as I do not want to edit the rmc header file.
>=20
> > 2701: undo
> >
>=20
>          That is a blank line.
>=20
> > Sanm-dm-log.c:
> >
> > 25: include
> >
> extern int32
> eee_forwardPacket(eee_descPtr_t edesc);
>=20
> The declaration is in eee-app.h however
>=20
> > 186: useless assignment
> >
>=20
>          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.
>=20
> > Sanm-dm-msg.c:
> >
> > 25: include
> >
>=20
>          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
> >
>=20
>          you could say that about <linux/spinlock.h>
>          since that is required in nfx-defs.h.
>=20
>          eee.h never has included that in the past
>          why start by adding that now.
>=20
> > Scsi-api.h:
> >
> > 23: remove useless comment
> >
>=20
>          The comment is:
>=20
>          #include <bqueue.h> // TAILQ_ENTRY definition required
>=20
> > Scsi-msg.c:
> >
> > 33: include
>          rmc_wrap_nonrmc_out() is a prototype only
>          declaration in rmc_eee_api.h
>=20
> > Scsi.c:
> >
> > 171: unnecessary and wrong change.
> >
>=20
>          Fixed; Here is the
>=20
>          static void
> scsi_process_queued_responses(void *queue, uint32 timer_ref)
> {
>=20
> > 1325, 1334, 1457: #ifdef DEBUG should not be necessary, ASSERT is
> > noop if DEBUG is not defined.
> >
>=20
>          I did not add those. You can remove them, legacy code.
> > Scsi.h:
> >
> > 52: include
> >
>=20
>          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
> >
>=20
>          Not defined in nfx-defs.h.
>=20
> > 42: include
> >
>=20
>          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
> >
>=20
>          fine, it was a commented out header file include.
> > Swapfile-api.h:
> >
> > 32: undo
> >
> int
> swapfile_init(void);
>=20
> 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();
>=20
>=20
>          Yes, I'll remove it but why now?
>=20
>=20
> > Swapfile.c:
> >
> > 186: undo
> >
> >
>          I presume you are voting for the
>          standard panic() definition rather
>          than:
>=20
> > #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
>=20
>          I will remove it and would have had i
>          see the duplicate definition of panic().
