svn commit: r351691 - in stable/12: include/rpcsvc lib/libc/net lib/libc/rpc usr.sbin/rpc.yppasswdd usr.sbin/rpc.ypupdated usr.sbin/ypldap usr.sbin/yppush usr.sbin/ypserv

Konstantin Belousov kostikbel at gmail.com
Tue Sep 3 06:37:53 UTC 2019


On Tue, Sep 03, 2019 at 01:42:58AM +0000, Rick Macklem wrote:
> Oh, and RPC_MAXDATASIZE seems to be set at 9000.
> (This is probably only a limit for UDP, but may be wired into all RPCs?)
> 
> rick
> 
> ________________________________________
> From: owner-src-committers at freebsd.org <owner-src-committers at freebsd.org> on behalf of Rick Macklem <rmacklem at uoguelph.ca>
> Sent: Monday, September 2, 2019 9:30:45 PM
> To: Konstantin Belousov; src-committers at freebsd.org; svn-src-all at freebsd.org; svn-src-stable at freebsd.org; svn-src-stable-12 at freebsd.org
> Subject: Re: svn commit: r351691 - in stable/12: include/rpcsvc lib/libc/net lib/libc/rpc usr.sbin/rpc.yppasswdd usr.sbin/rpc.ypupdated usr.sbin/ypldap usr.sbin/yppush usr.sbin/ypserv
> 
> Konstantin Belousov wrote:
> >
> >Author: kib
> >Date: Mon Sep  2 08:20:02 2019
> >New Revision: 351691
> >URL: https://svnweb.freebsd.org/changeset/base/351691
> >
> >Log:
> >  MFC r350957:
> >  Increase YPMAXRECORD to 16M to be compatible with Linux.
> 
> I am not familiar with the userland RPC libraries, but for the krpc, the size of an
> RPC message is limited by the maximum sockbuf size allowed, as set by
> soreserve() and limited by kern.maxsockbuf.
> 
> You might want to look to see if the userland RPC library does the setsockopt()
> { or whatever it is? } that does the soreserve()/sbreserve() for the socket in the
> kernel, to see how large it gets set.

My understanding is that socket buffers in fact limit the size of the
single read in userspace, but userspace RPC must do and does collection
of the partial reads into stream to xdr encode/decode the messages.

The patch was tested in the practical settings where 1K limit was exceeded,
I did not tried to determine a breaking point above it.

> 
> I think you can get to about 2M by default?
> 
> To be honest, I'm surprised (but maybe not amazed) that people still use
> NIS/YP.
Yes, they are, in quite large setups.

> Just in case it matters, rick
> 


More information about the svn-src-all mailing list