I am using Lwip 1.1.1 on top of tun/tap in Linux platform. To test the throughput of lwip, I made lwip as a server sending as many packets as possible to a client and client measured the data rate. I found the throughput was only 10M and wanted to raise the throughput. So I increased the value of parameter TCP_SND_BUF in
lwipopts.h to 4096 and the throughput increased up to 20Mbps. Then I further increased this parameter to larger value expecting to have higher throughput. However, when lwip receive request from the client and sent packets, lwip stopped suddenly.
In debugging, when sys_sem_signal() is executed in sent_tcp(), lwip stops. I suspect that the problem is related to pthread_cond_broadcast() which wakes up all other threads and is deadlock. Function sys_sem_signal() is in file sys_arch.c.
The code of sys_sem_signal():
void
sys_sem_signal(struct sys_sem *sem)
{
pthread_mutex_lock(&(sem->mutex));
sys_sem_signal(struct sys_sem *sem)
{
pthread_mutex_lock(&(sem->mutex));
sem->c++;
if (sem->c > 1) {
sem->c = 1;
}
pthread_cond_broadcast(&(sem->cond));
pthread_mutex_unlock(&(sem->mutex));
}
Can anybody solve this probelm?
By the way, how can I debug lwip with gdb to find where the program stopped?
Thank you very much!
_______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
