UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 22508

9.1i EDK - NFS file reads fail when the NFS cache size is larger than the amount of user data in an single Ethernet packet (1372 bytes)

Description

NFS file reads fail when the NFS cache size is larger than the amount of user data in an single Ethernet packet (1372 bytes). It seems that the read error occurs because the M_EOR (end of record flag) is set by the function FifoRecvInt in the file "xemac_end_adapter.c", which is part of the BSP. This results in a MSG_EOR flag being set during the Wind River socket receive routine (soreceive). When the length of data available to be read from the network memory buffers is being computed, encountering this flag will cause the flow of execution to break out of a while loop that cycles through the memory buffers containing user data, adding up their lengths until it gets to the length of the NFS cache. This computation is done to ensure that the buffers contain at least as much data as the reader is attempting to read. Because this flag will cause the computation to stop at the end of the first packet's data, if the NFS cache size is greater than that data size, it will exit too soon. Then, when a comparison is done later between the computed size and the desired size to be read, it seems as if there is not enough data (because the computed length is too short). This causes the read to fail.

Solution

This issue can be resolved by making a change to revision 1.00f of the "xemac_end_adpater.c" file. By changing the line in FifoRecvInt which sets the flags from "MblkPtr->mBlkHdr.mFlags |= (M_EXT | M_PKTHDR | M_EOR);" to "MblkPtr->mBlkHdr.mFlags |= (M_EXT | M_PKTHDR);"), the issue will be resolved.

AR# 22508
Date Created 09/04/2007
Last Updated 05/19/2014
Status Archive
Type General Article