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:<bfisher@lsi.com>,<Rendell.Fong@lsi.com>
MAID:2
X-Sylpheed-Privacy-System:
X-Sylpheed-Sign:0
SCF:#mh/Mailbox/sent
RMID:#imap/LSI/INBOX	0	4A932E77.4020106@lsi.com
X-Sylpheed-End-Special-Headers: 1
Date: Mon, 24 Aug 2009 17:36:40 -0700
From: Andrew Sharp <andy.sharp@lsi.com>
To: William Fisher <bfisher@lsi.com>
Cc: "Fong, Rendell" <Rendell.Fong@lsi.com>
Subject: Re: Virtual Server Dependencies in NETBIOS/CIFS/NFS Code
Message-ID: <20090824173640.492dfc60@ripper.onstor.net>
In-Reply-To: <4A932E77.4020106@lsi.com>
References: <4A932E77.4020106@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=US-ASCII
Content-Transfer-Encoding: 7bit

It doesn't sound to me like there are any dependencies here at this
phase.  Leave the function calls as they are, that will be handled in
the virtual server implementation phase.

Leave the structures as-is as well.  In fact, feel free to assume that
something will work the way that you would _want_ to work in order to
make your life easiest.  It will probably be quite possible to do so.


On Mon, 24 Aug 2009 18:21:11 -0600 William Fisher <bfisher@lsi.com>
wrote:

> Guys:
> 
> I have been wading through the NETBIOS/CIFS/NFS code
> in the effort to convert the tpl_XX() interfaces
> to standard sockets, and the virtual server
> dependencies need to be addressed.
> 
> I really need to know what you guys are planning
> in this area, since there are a number of structures
> which are tied together and hold VS information.
> 
> A brief list of this are:
> 
> 1) NETBIOS
> 
>     a) The PktDesc structure, now embedded in the skb,
>        contains a number of fields use the VS code.
> 
>        This include pTplConn->usrInfo which points
>        to the VS_t structure.
> 
>        The IFIndex field is "loosely" similar to the
>        if_index in the skb, that being the index
>        of the virtual server.
> 
> 
>     b) The bindCB_t->usrInfo points to the VS Control Block
>        aka the NB_SRVCB_t structure.
> 
> 
>     c) The structures used in the transport layer
>        of the NETBIOS code use:
> 
>        vs_t, vs_if_t, NB_SRVCB_t
> 
>     d) The major VS interfaces used are:
> 
>        vs_AddBCB()/vs_RemBCB(),
>        vs_hold()/vs_rele(),
>        vs_findIpInVs/vs_findIpinVSByIndex()
>        vs_FindIfInVsByIndex(), etc.
> 
> 
> 2) CIFS
> 
>     a) The vs_t structure is used quite frequently
> 
>     b)The following VS interfaces are used in
>        quite a few CIFS related files:
> 
>        vs_AddGracePeriod()
>        vs_addBCB()/vs_remBCB()
>        vs_Relocatable_Init(),
>        vs_Relocatable_Alloc(),
>        vs_Relocatable_Free()
> 
>    c) There are a number of global VS specific
>       data structures which are searched, including:
>       vs_Share_list_t, VS_Global_list
> 
>     d) The ReqHdr->rh_vs->vs_AutoCreatePath and
>            ReqHdr->rh_vs->vs_AutoCreateVolId and
>        other fields in the rh_vs structure are used
>        frequently.
> 
>     e) There are 16 files in the sm-cifs directory using
>        VS specific interfaces and data structures. The
>        heavyest use is in cs-api.c
> 
> 3) NFS
> 
>     a) There are 12 files in the sm-nfs directory that
>        have dependencies. The heavyest use resides in the
>        following files, ncp_api.c, nfs_conn.c, nfs-monitor-api.c
>        nfs_proc.c, ns-api.c
> 
>     b) The structures used include vs_t, vs_ip_t, vs_if_t
>        along with the VS globals such as:
>        vs_GlobalList
> 
>     c) The interfaces most heavily used include
>        vs_hold(). vs_rele(),
>        vs_AddBCB(),vs_remBCB(),
>        vs_findCifsSrvrInVsByName(),
>        vs_relocatable_{alloc,free,init},
>        vs_getVsvrById(),
>        vs_sendVolReqSSC(),
>        vs_add_to_active_queue(),
>        etc.
> 
>     d) The req_hdr for NFS is obviously heavyly used.
> 
> Questions:
> 
> 1) Are you guys planning to support ALL these vs_XXX()
>     interfaces and the EEE data structures? I am presuming
>     the anser is yes, unless something requires changes.
> 
> 2) What is the thinking for the the pktDesc, in that
>     who will set the interface index field, the tpl_
>     equivalent state pointer, and the like and when?
> 
>     I set most of the pkt_desc fields when we switch
>     from an skb to a pkt_desc when the hand-off happens
>     in the transport code, however it's not clear how
>     I set some of these other fields, since we probably
>     won't be in the right context to get the parameters.
> 
> 3) I presume your new implementation will set all of
>     the vs_t fields, since the NETBIOS/CIFS/NFS code
>     uses a number of these fields like ncp-api.c:
>     vs->vs_ncp[j].vni_fcb, vs->vs_ncp[j].vni_fcb->fcb_vcb
>     etc. Is that a valid assumption?
> 
> 4) Do we need a brief design document on the required
>     hooks to implenent the VS in the various kernel
>     data structures? I think we need some discussion
>     amongst ourselves on this topic, yes, no?
> 
> Thanks,
> 
> -- Bill
> 
