From owner-freebsd-current@FreeBSD.ORG Thu May 21 10:36:50 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9C7EB106564A; Thu, 21 May 2009 10:36:50 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 77AD88FC19; Thu, 21 May 2009 10:36:50 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 04F0846B17; Thu, 21 May 2009 06:36:50 -0400 (EDT) Date: Thu, 21 May 2009 11:36:49 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Andre Oppermann In-Reply-To: Message-ID: References: <4A1460A3.2010202@freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: rmacklem@uoguelph.ca, freebsd-current@freebsd.org Subject: Re: Socket related code duplication in NFS X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2009 10:36:50 -0000 On Wed, 20 May 2009, Robert Watson wrote: > On Wed, 20 May 2009, Andre Oppermann wrote: > >> While working on an optimized soreceive_stream() function [1] and checking >> the code how it is used I've come across quite a bit of code duplication in >> the various NFS directories. >> >> Socket (read) operations are handled multiple times in a very similar >> manner in these places: > > My recommendation would be to do this analysis against the new NFS client > and server found in sys/{kgssapi,nlm,fs/{nfs,nfsclient,nfsserver}}, which is > the NFSv234 implementation. Note in particular that in the new world order > there's a centralize RPC implementation. > > The code you're looking at is a blend of the old NFSv23 client/server > (nfsclient/nfsserver) and the old NFSv4 client (rpc/nfs4client), all if > which are on a gradual de-orbit burn. After re-reading this e-mail, I realize that I'd mislabeled src/sys/rpc as being only used by the old code -- this is in fact not the case, it's also used by the new code. Robert N M Watson Computer Laboratory University of Cambridge