[PATCH] networking: Increase _SYS_MBUF_LEGACY_MSIZE to 256 to match FreeBSD

Chris Johns chrisj at rtems.org
Fri May 8 04:12:24 UTC 2020


Hi Hesham,

I do not understand the reason here. I thought the TCP header was a 
fixed size?

Chris

On 8/5/20 6:12 am, heshamelmatary at gmail.com wrote:
> From: Hesham Almatary <Hesham.Almatary at cl.cam.ac.uk>
> 
> This commit fixes some run-time errors on 64-bit architectures (e.g., riscv64)
> in which the tcp header size would overflow 128 bytes.
> 
> ---
>   cpukit/libnetworking/sys/mbuf.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/cpukit/libnetworking/sys/mbuf.h b/cpukit/libnetworking/sys/mbuf.h
> index c54b760b3..ef1641a91 100644
> --- a/cpukit/libnetworking/sys/mbuf.h
> +++ b/cpukit/libnetworking/sys/mbuf.h
> @@ -46,7 +46,7 @@
>    * at least MINCLSIZE of data must be stored.
>    */
>   
> -#define	_SYS_MBUF_LEGACY_MSIZE 128
> +#define	_SYS_MBUF_LEGACY_MSIZE 256
>   #define	MLEN		(_SYS_MBUF_LEGACY_MSIZE - sizeof(struct m_hdr))	/* normal data len */
>   #define	MHLEN		(MLEN - sizeof(struct pkthdr))	/* data len w/pkthdr */
>   #define	MINCLSIZE	(MHLEN + MLEN)	/* smallest amount to put in cluster */
> 


More information about the devel mailing list