From owner-svn-src-all@freebsd.org Tue Jul 7 00:42:24 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2CF4434DD03; Tue, 7 Jul 2020 00:42:24 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B13YX0RFhz3X1h; Tue, 7 Jul 2020 00:42:24 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E650026B5D; Tue, 7 Jul 2020 00:42:23 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0670gNYG090085; Tue, 7 Jul 2020 00:42:23 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0670gNpp090084; Tue, 7 Jul 2020 00:42:23 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <202007070042.0670gNpp090084@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Tue, 7 Jul 2020 00:42:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362980 - head/sys/fs/nfs X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: head/sys/fs/nfs X-SVN-Commit-Revision: 362980 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2020 00:42:24 -0000 Author: rmacklem Date: Tue Jul 7 00:42:23 2020 New Revision: 362980 URL: https://svnweb.freebsd.org/changeset/base/362980 Log: Add support for ext_pgs mbufs to nfsrvd_rephead(). This is another in the series of commits that add support to the NFS client and server for building RPC messages in ext_pgs mbufs with anonymous pages. This is useful so that the entire mbuf list does not need to be copied before calling sosend() when NFS over TLS is enabled. Since ND_EXTPG is never set yet, there is no semantic change at this time. Modified: head/sys/fs/nfs/nfs_commonsubs.c Modified: head/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- head/sys/fs/nfs/nfs_commonsubs.c Mon Jul 6 22:39:42 2020 (r362979) +++ head/sys/fs/nfs/nfs_commonsubs.c Tue Jul 7 00:42:23 2020 (r362980) @@ -4443,21 +4443,30 @@ nfsrvd_rephead(struct nfsrv_descript *nd) { struct mbuf *mreq; - /* - * If this is a big reply, use a cluster. - */ - if ((nd->nd_flag & ND_GSSINITREPLY) == 0 && - nfs_bigreply[nd->nd_procnum]) { - NFSMCLGET(mreq, M_WAITOK); - nd->nd_mreq = mreq; - nd->nd_mb = mreq; + if ((nd->nd_flag & ND_EXTPG) != 0) { + mreq = mb_alloc_ext_plus_pages(PAGE_SIZE, M_WAITOK); + nd->nd_mreq = nd->nd_mb = mreq; + nd->nd_bpos = (char *)(void *) + PHYS_TO_DMAP(mreq->m_epg_pa[0]); + nd->nd_bextpg = 0; + nd->nd_bextpgsiz = PAGE_SIZE; } else { - NFSMGET(mreq); - nd->nd_mreq = mreq; - nd->nd_mb = mreq; + /* + * If this is a big reply, use a cluster. + */ + if ((nd->nd_flag & ND_GSSINITREPLY) == 0 && + nfs_bigreply[nd->nd_procnum]) { + NFSMCLGET(mreq, M_WAITOK); + nd->nd_mreq = mreq; + nd->nd_mb = mreq; + } else { + NFSMGET(mreq); + nd->nd_mreq = mreq; + nd->nd_mb = mreq; + } + nd->nd_bpos = mtod(mreq, char *); + mreq->m_len = 0; } - nd->nd_bpos = mtod(mreq, caddr_t); - mreq->m_len = 0; if ((nd->nd_flag & ND_GSSINITREPLY) == 0) NFSM_BUILD(nd->nd_errp, int *, NFSX_UNSIGNED);