Re: RPC UDP message size limit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> On Jun 1, 2018, at 8:07 AM, Robbert Eggermont <R.Eggermont@xxxxxxxxxx> wrote:
> 
> Recently we started hitting the libtirpc RPC UDP message size limit (tirpc/rpc/rpc.h: #define UDPMSGSIZE 8800) for 'showmount -e' from a NetApp filer (with around 25kB worth of exports). Only 8800 bytes are read, resulting in an abort with a "rpc mount export: RPC: Can't decode result" error.

8KB seems to be a documented limit for UDP. From "man clnt_create":

     CLIENT *
     clnt_create(char *host, u_long prog, u_long vers, char *proto)

             Generic client creation routine.  The host argument identifies the name of the remote host where the server is located.  The
             proto argument indicates which kind of transport protocol to use.  The currently supported values for this field are "udp" and
             "tcp".  Default timeouts are set, but can be modified using clnt_control().

             Warning: Using UDP has its shortcomings.  Since UDP-based RPC messages can only hold up to 8 Kbytes of encoded data, this
             transport cannot be used for procedures that take large arguments or return huge results.

A larger message size limit would not be safe for all RPC protocols
that use UDP.


> Since it seems filers are already using a higher limit, should this limit be increased (at least for receiving, which should be safe)?

>From utils/showmount/showmount.c

107         client = clnt_create(hostname, program, vers, "tcp");
108         if (client)
109                 return client;
110         client = clnt_create(hostname, program, vers, "udp");
111         if (client)
112                 return client;

IIUC showmount could use the clnt_{vc,dg}_create(3) APIs instead of
the generic clnt_create(3) API to specify a larger message size limit.

However, using TCP would immediately work around the UDP message size
limit. But perhaps the filer is not allowing a TCP connection for the
MNT service?


--
Chuck Lever
chucklever@xxxxxxxxx



--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux