SUNRPC: Lack of RPC record fragments
Subsystems (2)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
I'm communicating with the linux NFS kernel server via RPC using the sunrpc implementation in glibc. On certain RPC record sizes, glibc starts to use record fragmentation (whereas the sunrpc kernel client doesn't) and the sunrpc linux kernel server implementation lacks the RPC record "defragmentation" functionality as can be seen in net/sunrpc/svcsock.c:
svsk->sk_reclen =3D ntohl(svsk->sk_reclen); if (!(svsk->sk_reclen & 0x80000000)) {
/* FIXME: technically, a record can be fragmented,
* and non-terminal fragments will not have the top
* bit set in the fragment length header.
* But apparently no known nfs clients send fragmented
* records. */
printk(KERN_NOTICE "RPC: bad TCP reclen 0x%08lx (non-terminal)\n",
(unsigned long) svsk->sk_reclen); goto err_delete;
}
Unfortunately, I didn't find a way to disable the use of fragmentation in glibc. Is there an existing patch for the kernel to support fragmented records?
Best regards,
Andr=E9
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFE/F92LKwmE5jzZmkRAtfUAJwPyFRgfav/y9RhW4/6Z8jzSbyz8QCfX7t4 UNcN9tSfjWlJPjiVVFEelHM=3D
=3DqnID
-----END PGP SIGNATURE-----
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easi= er
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D1=
21642
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
Quoted 22 lines · On Monday September 4, [email protected] wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1Hi,
I'm communicating with the linux NFS kernel server via RPC using the sunrpc implementation in glibc. On certain RPC record sizes, glibc starts to use record fragmentation (whereas the sunrpc kernel client doesn't) and the sunrpc linux kernel server implementation lacks the RPC record "defragmentation" functionality as can be seen in
net/sunrpc/svcsock.c:
svsk->sk_reclen=ntohl(svsk->sk_reclen);
if (!(svsk->sk_reclen &0x80000000)) {
/* FIXME: technically, a record can be fragmented,* and non-terminal fragments will not have the top * bit set in the fragment length header. * But apparently no known nfs clients send fragmented * records. */ printk(KERN_NOTICE "RPC: bad TCP reclen 0x%08lx (non-terminal)\n", (unsigned long) svsk->sk_reclen);
Quoted 6 lines
goto
err_delete;
}Unfortunately, I didn't find a way to disable the use of fragmentation in glibc. Is there an existing patch for the kernel to support fragmented records?
Not that I am aware of, and it would be fairly non-trivial to implement, for relatively little gain.
You should be able to avoid fragmentation with glibc by setting 'sendsz' large enough.
When you call clnttcp_create, pass a big number for the 5th arg.
NeilBrown
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
Re: [NFS] SUNRPC: Lack of RPC record fragments / Pynfs test WRT5 - st_write.testLargeData
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 1 line · Neil Brown
On Monday September 4, [email protected] wrot=
e:
Quoted 10 lines
Quoted 10 lines
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1Hi,
I'm communicating with the linux NFS kernel server via RPC using the sunrpc implementation in glibc. On certain RPC record sizes, glibc starts to use record fragmentation (whereas the sunrpc kernel client doesn't) and the sunrpc linux kernel server implementation lacks the R=
PC
Quoted 18 lines
Quoted 12 lines
record "defragmentation" functionality as can be seen in
net/sunrpc/svcsock.c:
svsk->sk_reclen=3Dntohl(svsk->sk_reclen); if (!(svsk->sk_reclen &0x80000000)) {
/* FIXME: technically, a record can be fragmented,* and non-terminal fragments will not have the top * bit set in the fragment length header. * But apparently no known nfs clients send fragmented * records. */ printk(KERN_NOTICE "RPC: bad TCP reclen 0x%08lx (non-terminal)\n", (unsigned long) svsk->sk_reclen);Quoted 6 lines
goto
err_delete;
}Unfortunately, I didn't find a way to disable the use of fragmentation in glibc. Is there an existing patch for the kernel to support fragmented records?
Quoted 10 lines
=20
Not that I am aware of, and it would be fairly non-trivial to implement, for relatively little gain.
=20
You should be able to avoid fragmentation with glibc by setting 'sendsz' large enough.
When you callclnttcp_create, pass a big number for the 5th arg. =20
NeilBrown
=20
Thanks, calling clnttcp_create with sendsz=3D65724 avoids the fragmentation by the glibc and NFS "splits" the packets instead.
I recognized (I don't know if I am the first one but I just read
http://linux-nfs.org/pipermail/nfsv4/2005-October/002760.html) the RPC fragmentation problem (here in the python rpc lib instead of glibc) could also be the reason why Pynfs test "WRT5 - st_write.testLargeData" fails -- if this is still the case.
Executing this test on my system, the nfs server (respectively sunrpc) dumps the message "RPC: bad TCP reclen 0x00000800 (non-terminal)".
Andr=E9
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFE/SvTLKwmE5jzZmkRAr+bAJ4hguBP13iU3VKg2glLkZ4pR4rOugCg3QTe 9Wz2dLaOEPMHYBsyh48nKsk=3D
=3DIkcs
-----END PGP SIGNATURE-----