[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #49976] Some performance issue
From: |
Wen Xichang |
Subject: |
[lwip-devel] [bug #49976] Some performance issue |
Date: |
Tue, 3 Jan 2017 04:44:07 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36 |
URL:
<http://savannah.nongnu.org/bugs/?49976>
Summary: Some performance issue
Project: lwIP - A Lightweight TCP/IP stack
Submitted by: wenxichang
Submitted on: Tue Jan 3 04:44:06 2017
Category: TCP
Severity: 3 - Normal
Item Group: Feature Request
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Planned Release: None
lwIP version: 2.0.0
_______________________________________________________
Details:
1. find a free socket seem not efficient (sockets.c: alloc_socket)
why not add a free list like:
int free_socks[NUM_SOCKETS];
int num_free_socks;
alloc_socket:
if (num_free_socks <= 0)
return EMFILE;
num_free_socks--;
s = free_socks[num_free_socks]
this improvement take only (NUM_SOCKETS + 1) int ram.
2. tcp_active_pcbs, why not use hash, a 64-slots-hash will greatly improve
perf, only extra 63 pointers taken.
3. socket_event should expose some API so that developer can easily impl their
own poll/epoll/kqueue, like:
typedef void (*lwip_sock_event_cb)(int sock, int readable, int writeable,
int exception, void *userdata);
int lwip_sock_reg_event_cb(lwip_sock_event_cb cb, void *userdata);
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?49976>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [lwip-devel] [bug #49976] Some performance issue,
Wen Xichang <=