"cp" files from NFS server ( mounted by UDP) alway failed on Imx6 sabre Lite.

cancel
Showing results for 
Search instead for 
Did you mean: 

"cp" files from NFS server ( mounted by UDP) alway failed on Imx6 sabre Lite.

206 Views
Contributor I

I build the image from the (https://boundarydevices.com/pyro-yocto-release/) and run it on my Imx6 sabre Lite.

 

When I mount the NFS server by tcp, (mount -t nfs -o nolock,nfsvers=3 192.168.0.2:/home/aaa/nfs mynfs)

root@nitrogen6x:~# cp /mnt/file1M.bin ./     --- could completed.

 

But when I mount the NFS server by udp, (mount -t nfs -o proto=udp,nolock,nfsvers=3 192.168.0.2:/home/aaa/nfs mynfs)

root@nitrogen6x:~# cp /mnt/file1M.bin ./     ---- hung.

nfs: server 192.168.0.2 not responding, still trying

nfs: server 192.168.0.2 not responding, still trying

 

 

When I run tcpdump to catch the packet, I see there are re-transmit packets both TCP and UDP.

Some packets are lost.

Because of the fast retransmit in TCP, the cp operation could finish quickly.

However, for UDP, if the packet(one of segment) is lost, it will hang for a long time.

 

I don’t think the problem is related to the ERR004512 ENET: 1 Gb Ethernet MAC (ENET) system limitation.

The ERR004512 says “1 Gbps ENET is limited to 470 Mbps” but my file is only 1M bytes.

My analysis is the receive FIFO is always almost_full quickly, it sends the PAUSE frame and causes the packets lost.

I tried to changes the FIFO wartmark, but it seems not work.

 

Do you have any comment or suggestion?

 

Thanks

Labels (1)
0 Kudos
11 Replies

9 Views
Contributor I

Thanks for your reply.

I checked it. It's not related to the firewall.

I have mounted the NFS server successfully. I saw the re-transmit  NFS reply from the NFS server in the capture file ( by the tcpdump tool).

I think some packets are lost, that causes the re-transmit  NFS reply.

When I "cp" file from NFS server (mounted by tcp protocol), I saw the fast re-transmit in the capture file.

Some packets should be lost, which cause the  fast re-transmit.

My question is the file is not big (just 1M bytes), why "cp" it causes packets lost?

"cp" file from NFS server (mounted by udp protocol) takes too much time, it even hangs.

 .

Do I have any way to avoid this?

0 Kudos

9 Views
NXP TechSupport
NXP TechSupport

are you using a router to connect your host and the board?

0 Kudos

9 Views
Contributor I

No, my board and the host are connected directly (back to back).

0 Kudos

9 Views
NXP TechSupport
NXP TechSupport

You can try to connect your board and PC to the same router.

0 Kudos

9 Views
Contributor I

Thanks for your reply.

I have tested (connect the board and PC to the same router), the result is worse.

I think the router gets the pause frame from the board, however the PC does not, which continues to transmit data to client, if the buffer in the router is full, the packets will be lost.

what else can I do now?

Thanks.

0 Kudos

9 Views
NXP TechSupport
NXP TechSupport

I always debug the dev. boards using the router without any networking issue.

I setup the bootargs in u-boot to boot up the board using NFS.

For details, please read the attached user's guide 4.7.5 Running the Linux image from NFS.

0 Kudos

9 Views
Contributor I

HI Jimmychan,

Any comments?

thanks.

0 Kudos

9 Views
NXP TechSupport
NXP TechSupport

I had a project to setup NFS for debugging the board before. I setup the bootargs in u-boot to boot up the board using NFS. After the board was up, the file transfer (over 2M) was ok.

0 Kudos

9 Views
Contributor I

Thanks for the reply quickly.

As I know, after the board brings up, and mount the NFS by default parameter (such as "mount -t nfs  192.168.0.2:/home/aaa/nfs mynfs"), it will use the TCP protocol, and the NFS driver version is 4.

Would you please have a try with the parameter ( "mount -t nfs -o proto=udp,nolock,nfsvers=3")?

On my side,  the file transfer (over 2M) always failed.

Thanks.

0 Kudos

9 Views
Contributor I

Thanks for your reply.

I tried as what you said, and yes, it quickly completed.

But I think the transfer data is small, here  it load/copy file one by one, after all, the size of the individual file is not large.

Would you please have a try to load/copy a file (2M bytes size), after the image brings  up?

FYI: use  -o proto=udp,nolock,nfsvers=3 please.

On my side, every time the "cp" failed.

Thanks.

0 Kudos

9 Views
NXP TechSupport
NXP TechSupport

It may block by the firewall

Please double check it. 

0 Kudos