Date: Fri, 7 Feb 1997 05:28:25 +0700 From: Eka Kelana <eka@werty.wasantara.net.id> To: freebsd-hackers@FreeBSD.org Cc: freebsd-bugs@FreeBSD.org, dg@root.com Subject: Need quick answer Message-ID: <1522A71DB9@bandung.wasantara.net.id>
next in thread | raw e-mail | index | archive | help
Hi.. I need a good explanation about this code in in_rmx.c: ... if (!rt->rt_rmx.rmx_sendpipe && !(rt->rt_rmx.rmx_locks & RTV_SPIPE)) rt->rt_rmx.rmx_sendpipe = tcp_sendspace; if (!rt->rt_rmx.rmx_recvpipe && !(rt->rt_rmx.rmx_locks & RTV_RPIPE)) rt->rt_rmx.rmx_recvpipe = tcp_recvspace; ... because this code affect the socket buffer size (sb_hiwat) in tcp_mss() function. I experienced that it wouldn't allow user program to set the socket buffer size. The code in tcp_mss() function is: ... #ifdef RTV_RPIPE if ((bufsize = rt->rt_rmx.rmx_recvpipe) == 0) #endif bufsize = so->so_rcv.sb_hiwat; ... (void)sbreserve(&so->so_rcv, bufsize); ... Since rt->rt_rmx.rmx_recvpipe is never zeroed (by default, it equals tcp_sendspace), the line bufsize = so->so_rcv.sb_hiwat is always jumped over, and tcp_mss() will set the sb_hiwat value to bufsize. And further, I've done a performance test. Before I commented out the four lines in in_rmx.c above, the TCP/IP implementations showed a throughput around 8.56 Mbps, and after I commented them out and rebuilt the kernel, it showed a throughput around 8.61 Mbps. Well, not a significant degradation, but the reason is still not clear to me... -Eka Kelana- STTTelkom
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1522A71DB9>