Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Jan 2003 16:44:35 +0200
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        Tim Robbins <tjr@FreeBSD.ORG>
Cc:        Juli Mallett <jmallett@FreeBSD.ORG>, current@FreeBSD.ORG, re@FreeBSD.ORG
Subject:   Re: Serious issues with kqueue on sockets on CURRENT.
Message-ID:  <20030110144435.GF586@gothmog.gr>
In-Reply-To: <20030111004226.A36261@dilbert.robbins.dropbear.id.au>
References:  <20030110013015.A23399@FreeBSD.org> <20030110215736.A31727@dilbert.robbins.dropbear.id.au> <20030111004226.A36261@dilbert.robbins.dropbear.id.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2003-01-11 00:42, Tim Robbins <tjr@FreeBSD.ORG> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030110144435.GF586>