From owner-freebsd-current Fri Jan 10 6:44:44 2003 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 447C837B401; Fri, 10 Jan 2003 06:44:42 -0800 (PST) Received: from mailsrv.otenet.gr (mailsrv.otenet.gr [195.170.0.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9AA1D43ED8; Fri, 10 Jan 2003 06:44:39 -0800 (PST) (envelope-from keramida@ceid.upatras.gr) Received: from gothmog.gr (patr530-a133.otenet.gr [212.205.215.133]) by mailsrv.otenet.gr (8.12.6/8.12.6) with ESMTP id h0AEiaMZ022046; Fri, 10 Jan 2003 16:44:36 +0200 (EET) Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.12.6/8.12.6) with ESMTP id h0AEiZGv001284; Fri, 10 Jan 2003 16:44:35 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.gr (8.12.6/8.12.6/Submit) id h0AEiZL4001283; Fri, 10 Jan 2003 16:44:35 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Fri, 10 Jan 2003 16:44:35 +0200 From: Giorgos Keramidas To: Tim Robbins Cc: Juli Mallett , current@FreeBSD.ORG, re@FreeBSD.ORG Subject: Re: Serious issues with kqueue on sockets on CURRENT. Message-ID: <20030110144435.GF586@gothmog.gr> References: <20030110013015.A23399@FreeBSD.org> <20030110215736.A31727@dilbert.robbins.dropbear.id.au> <20030111004226.A36261@dilbert.robbins.dropbear.id.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030111004226.A36261@dilbert.robbins.dropbear.id.au> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 2003-01-11 00:42, Tim Robbins wrote: > >From what I can tell, mbufs with m_type == MT_HEADER can store data > as well as those with m_type == MT_DATA. This patch corrects the > tests in sbcompress(), sbdrop(), sballoc() and sbfree() so that data > stored in MT_HEADER mbufs is not included in sb_ctl. I'd appreciate > comments from people who have a good understanding of this code. > > Index: sys/kern/uipc_socket2.c > =================================================================== > RCS file: /x/freebsd/src/sys/kern/uipc_socket2.c,v > retrieving revision 1.106 > diff -u -r1.106 uipc_socket2.c > --- sys/kern/uipc_socket2.c 5 Nov 2002 18:52:25 -0000 1.106 > +++ sys/kern/uipc_socket2.c 10 Jan 2003 13:33:11 -0000 > @@ -705,7 +705,8 @@ > (unsigned)m->m_len); > n->m_len += m->m_len; > sb->sb_cc += m->m_len; > - if (m->m_type != MT_DATA) /* XXX: Probably don't need.*/ > + if (m->m_type != MT_DATA && m->m_type != MT_HEADER) > + /* XXX: Probably don't need.*/ > sb->sb_ctl += m->m_len; Hmmm, what if the mbuf has m_type == MT_HEADER but also includes data that should be counted in sb_ctl? Or is that impossible? - Giorgos To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message