On 2003-01-11 00:42, Tim Robbins <[EMAIL PROTECTED]> 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 [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to