I am trying to tune the UDP receive and transmit buffer size. According to my real time application needs, I need to configure the Tx buffer as 6 bytes and Rx buffer as 22 bytes. I am running Angstrom on a ARM A9 processor. (Altera cyclone v soc). The client and server are communicating over WiFi in adhoc mode.

root@cyclone5:/proc/sys/net/core# cat rmem_max
root@cyclone5:/proc/sys/net/core# sysctl -w rmem_max=22
sysctl: cannot stat /proc/sys/rmem_max: No such file or directory

The file is located at the path /proc/sys/net/core , however the stat is looking for the file at path /proc/sys/

I have also tried the following :

root@cyclone5:/proc/sys/net/core# sysctl -w net.core.rmem_max=22
sysctl: setting key "net.core.rmem_max": Invalid argument
net.core.rmem_max = 22

Does anyone have a hand on this problem?

The purpose of tuning the buffer sizes is because, I do not want to queue up the packets in the buffers. It is ok to overwrite the old packet with new packets, every time the call to recvfrom and sendto is made.


A little more debugging to this issue, I found out that the minimum bytes I can set to this buffer is 2240 bytes.

root@cyclone5:/proc/sys/net/core# echo 2238 > rmem_max
-sh: echo: write error: Invalid argument
root@cyclone5:/proc/sys/net/core# echo 2239 > rmem_max
-sh: echo: write error: Invalid argument
root@cyclone5:/proc/sys/net/core# echo 2240 > rmem_max
root@cyclone5:/proc/sys/net/core# cat rmem_max

Is there anyway to reduce this number, to as low as 22 bytes ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.