> From: "Ted Unangst" <[email protected]>
> Date: Sun, 07 May 2017 21:29:16 -0400
> 
> Ted Unangst wrote:
> > Mike Belopuhov wrote:
> > > > So there is something in the tree that doesn't like the mbuf packet
> > > > header growth and decides to color outside the lines.
> > > > 
> > > 
> > > After looking into this with Mark, he has found out that the size of
> > > an mbuf structure on armv7 and hppa has exceeded MSIZE (256 bytes).
> > 
> > woah, there's no assert to check that? here's a quickie compile time diff.
> 
> ah, there is a CTASSERT macro. thought we had one, but didn't see it.

That really should CTASSERT(MSIZE == sizeof(struct mbuf)) though.

> Index: uipc_mbuf.c
> ===================================================================
> RCS file: /cvs/src/sys/kern/uipc_mbuf.c,v
> retrieving revision 1.245
> diff -u -p -r1.245 uipc_mbuf.c
> --- uipc_mbuf.c       7 Feb 2017 07:00:21 -0000       1.245
> +++ uipc_mbuf.c       8 May 2017 01:28:00 -0000
> @@ -161,6 +161,8 @@ mbinit(void)
>       int i;
>       unsigned int lowbits;
>  
> +     CTASSERT(MSIZE >= sizeof(struct mbuf));
> +
>       m_pool_allocator.pa_pagesz = pool_allocator_multi.pa_pagesz;
>  
>       nmbclust_update();
> 
> 

Reply via email to