From owner-freebsd-hackers Thu Sep 23 8:55:23 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from bingnet2.cc.binghamton.edu (bingnet2.cc.binghamton.edu [128.226.1.18]) by hub.freebsd.org (Postfix) with ESMTP id EB22F15EBF for ; Thu, 23 Sep 1999 08:55:18 -0700 (PDT) (envelope-from zzhang@cs.binghamton.edu) Received: from sol.cs.binghamton.edu (cs1-gw.cs.binghamton.edu [128.226.171.72]) by bingnet2.cc.binghamton.edu (8.9.3/8.9.3) with SMTP id LAA10555 for ; Thu, 23 Sep 1999 11:55:06 -0400 (EDT) Date: Thu, 23 Sep 1999 11:40:53 -0400 (EDT) From: Zhihui Zhang Reply-To: Zhihui Zhang To: freebsd-hackers@freebsd.org Subject: NFS and RPC Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG NFS is said to be built on RPC. However, NFS daemons seldom uses RPC library calls before they enter into the kernel forever (The nfsd daemon only calls pmap_set(). The nfsiod daemon invokes no RPC call at all! The mountd daemon uses a lot of RPC calls, but it does not enter the kernel forever and it is not used during normal reads/writes). Once inside the kernel, the NFS daemons can not use RPC library any more, they must create/interprete RPC format messages themselves. My guess this is for performance reason and because there is no kernel-to-kernel RPC. Since the kernel part of NFS code does not use RPC library routines, why FreeBSD still conforms to the RPC format for NFS requests/replies? Is this for compatibily with other NFS servers/clients that are implemented entirely as user-level code and with RPC library routines? One more question is about how to assembly a RPC request from several mbufs? I notice that there is a check for 0x80000000 in the routine nfsrv_getstream() for the last fragment. But I assume that all mbufs linked together via their m_next field should consist of one RPC request. I also assume that the protocol layer has ripped off any TCP/IP headers from the mbufs before it pass the mbufs up to the socket layer. Any help is appreciated. -------------------------------------------------- Zhihui Zhang. Please visit http://www.freebsd.org -------------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message