i wanna to write a tcp server with ofp netwrap socket api include socket(),bind(),select() e.g based on odp-dpdk
i modify netwrap_crt and netwrap_proc:
1、delete __attribute contructor and destructor before ofp_netwrap_main_ctor() , ofp_netwrap_main_dtor(), and setup_wrappers();
2、i use devbuild_ofp_odp_dpdk.sh to compile all need *.so with slow patch disabled;
3、i link netrwap_ctr.so and netwrap_proc.so to my tcp server exeutable file;
4、i use ofp_netwrap_main_ctor() and setup_wrappers() in my tcp server main() function;
5、in my tcp server project, i use odph_odpthreads_create() to create a thread which running a server function who use select();
6、i modify the ofp_select() who can also handle writefds with below :
int
6、modify ofp.cli with replacing eth0 with 0;
7、it can run and default_event_dispatcher thread is also running;
Now tcp server can get the connction from the tcp client and also get the tcp request, then process request and add to select writefds asynchronouslly , and writefd handler use writev to send response, however client don't get the response.
i guess i use writev()(ofp_send() actually) to write, but not really send to client, do you have any idea where is the problem
i wanna to write a tcp server with ofp netwrap socket api include socket(),bind(),select() e.g based on odp-dpdk
i modify netwrap_crt and netwrap_proc:
1、delete
__attribute contructor
anddestructor
beforeofp_netwrap_main_ctor()
,ofp_netwrap_main_dtor()
, andsetup_wrappers()
;2、i use devbuild_ofp_odp_dpdk.sh to compile all need *.so with slow patch disabled;
3、i link netrwap_ctr.so and netwrap_proc.so to my tcp server exeutable file;
4、i use
ofp_netwrap_main_ctor()
andsetup_wrappers()
in my tcp servermain()
function; 5、in my tcp server project, i use odph_odpthreads_create() to create a thread which running a server function who useselect();
6、i modify the ofp_select() who can also handle writefds with below : int6、modify ofp.cli with replacing eth0 with 0;
7、it can run and default_event_dispatcher thread is also running;
Now tcp server can get the connction from the tcp client and also get the tcp request, then process request and add to select writefds asynchronouslly , and writefd handler use writev to send response, however client don't get the response.
i guess i use writev()(ofp_send() actually) to write, but not really send to client, do you have any idea where is the problem