From owner-freebsd-current@FreeBSD.ORG Wed Oct 27 03:29:22 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 482ED16A4CE for ; Wed, 27 Oct 2004 03:29:22 +0000 (GMT) Received: from shuttle.wide.toshiba.co.jp (shuttle.wide.toshiba.co.jp [202.249.10.124]) by mx1.FreeBSD.org (Postfix) with ESMTP id D4D3843D46 for ; Wed, 27 Oct 2004 03:29:21 +0000 (GMT) (envelope-from jinmei@isl.rdc.toshiba.co.jp) Received: from ocean.jinmei.org (unknown [2001:4f8:3:bb:200:39ff:fed7:e2e4]) by shuttle.wide.toshiba.co.jp (Postfix) with ESMTP id A3BD815210 for ; Wed, 27 Oct 2004 12:29:19 +0900 (JST) Date: Wed, 27 Oct 2004 12:29:19 +0900 Message-ID: From: JINMEI Tatuya / =?ISO-2022-JP?B?GyRCP0BMQEMjOkgbKEI=?= To: freebsd-current@freebsd.org User-Agent: Wanderlust/2.10.1 (Watching The Wheels) Emacs/21.3 Mule/5.0 (SAKAKI) Organization: Research & Development Center, Toshiba Corp., Kawasaki, Japan. MIME-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: text/plain; charset=US-ASCII Subject: minor typo in sys/kern/uipc_socket2.c X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Oct 2004 03:29:22 -0000 FreeBSD current (and the 5.3 branch) needs the following patch. Otherwise, it always consumes mbuf cluster for cmsg items even when unnecessary. (I should probably file a PR for this, but I currently do not have a good access to the PR system. So please forgive me to send this to the list.) JINMEI, Tatuya Communication Platform Lab. Corporate R&D Center, Toshiba Corp. jinmei@isl.rdc.toshiba.co.jp Index: uipc_socket2.c =================================================================== RCS file: /home/ncvs/src/sys/kern/uipc_socket2.c,v retrieving revision 1.137 diff -u -r1.137 uipc_socket2.c --- uipc_socket2.c 15 Aug 2004 06:24:41 -0000 1.137 +++ uipc_socket2.c 27 Oct 2004 03:26:48 -0000 @@ -1253,7 +1253,7 @@ if (CMSG_SPACE((u_int)size) > MCLBYTES) return ((struct mbuf *) NULL); - if (CMSG_SPACE((u_int)size > MLEN)) + if (CMSG_SPACE((u_int)size) > MLEN) m = m_getcl(M_DONTWAIT, MT_CONTROL, 0); else m = m_get(M_DONTWAIT, MT_CONTROL);