Subject: Re: Wart in tcp_output(), IPv6-related?
To: None <>
From: None <>
List: tech-net
Date: 04/27/2002 09:07:30
>Can someone (itojun?) explain to me why the MCLGET() was added to
>tcp_output() in the first place?

	because when I checked MHLEN can be smaller than 100 bytes on some arch,
	and we may not be able to fit IPv4/v6 and TCP header/option into a
	single M_PKTHDR mbuf.  they need to fit into a single mbuf due to
	the assumption made near line 830.

	so, we at least preserve the following "max_linkhdr + hdrlen > MHLEN"

	i am happy to remove "max_linkhdr + hdrlen + len <= MCLBYTES" line.
	if the line gets removed the "always-copy" behavior will go away.

	thanks for analysis.


>-	if (m != NULL &&
>-	    (max_linkhdr + hdrlen > MHLEN ||		<--- needed
>-	     max_linkhdr + hdrlen + len <= MCLBYTES)) {	<--- can be removed