[ELDK] Jumbo Frames, sil24 SATA driver, and kswapd0 page allocation failures

Wolfgang Denk wd at denx.de
Wed Aug 12 22:40:12 CEST 2009


Dear Jonathan Haws,

In message <BB99A6BA28709744BF22A68E6D7EB51F01FE471904 at midas.usurf.usu.edu> you wrote:
...
> By the way, here is the loop that is causing me the grief.  Am I doing something wrong here?  There are
> 
> for(;;)
> {
> 	if( datalength + 9000 > 16*1024*1024 )
> 	{
> 		write(fd, (char*)rxBuf, dataLength);
> 		fsync(fd);
> 		wrBytes += dataLength;
> 		dataLength = 0;
> 
> 		count = (count+1)%RXCNT;
> 	}
> 
> 	bytes = recvfrom(sock.socket,(char*)&rxBuf[count][dataLength],
> 		MTUSIZE, (int)NULL, NULL, NULL);

Well, one obvious problem you have here is that you don't check any
return codes so you don't even notice when or where your program goes
haywire.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The only way to get rid of a temptation is to yield to it.
                                                        - Oscar Wilde


More information about the eldk mailing list