Hi Farooq,
> On Nov 29, 2025, at 2:50 AM, farooq basha via lists.fd.io > <[email protected]> wrote: > > Hi, > > I am planning to use the VPP Host stack for the SSL Proxy solution. > Currently doing a few prototypes to understand internal details of Host > Stack.I have written 2 simple Apps (Server) with POSIX APIs (Please find the > attached files). Sounds good but are you on purpose trying to keep the app compatible with both linux and vcl/vpp stacks or is there any other reason why it is not vcl native (directly calls vcl apis)? > one is with single threaded and another is with Multi threaded. > > Client connects the APP and downloads the test.html file.(curl -v > http://10.10.10.10:8080/test.html). > > With a single threaded app able to download the file multiple times without > any issue. With a Multithreaded app , able to connect only once and download > the file, if I try to connect again > it is stuck at TCP-ESTABLISHED state.Not getting HTTP/1.1 GET payload to the > application. > > vpp# show event-logger > 5 of 131072 events in buffer, logger running > 14991.353354343: lcl: 10.10.10.10:8080 <http://10.10.10.10:8080/> > 14991.353354689: rmt: 192.168.10.1:42272 <http://192.168.10.1:42272/> > 14991.353354769: syn-rx: cidx 1 sidx 0 irs 4130977040 > 14991.353354795: state: syn-rcvd > 14991.353558089: state: established I see you found the session debug infrastructure, but a lighter way to debug sessions would be to just use “sh session verbose [2]” cli. The highest level of verbosity will give information about transport and session state, including fifos state, i.e., bytes sent/received and events pending. For instance, if there’s data in the tx fifo, the has_event flag is set and data hasn’t been sent by tcp, that might indicate issue in event propagation. > > vcl { > heapsize 64M > segment-size 4000000000 > add-segment-size 4000000000 > rx-fifo-size 4000000 > tx-fifo-size 4000000 > max-workers 25 > app-scope-local > app-scope-global > app-socket-api /var/run/vpp/app_ns_sockets/default > use-mq-eventfd > } Looks good. > > session { > use-app-socket-api enable > evt_qs_memfd_seg > } No need for evt_qs_memfd_seg, it’s default now. > Am I missing any configuration for Multithreaded App ? Most probable the issue is related to sharing of sessions between threads. VCL wants to pin sessions to threads, for situations when that doesn’t hold because of app usage patterns, the vls layer consumed by ldp handles the detection of threads and the locking. Maybe the fact that main exits potentially before handle_client does any network interaction for vls to properly initiate state is the source of the problem. Does it work if main waits for the worker thread? Should note that if you plan to write a multi-threaded app, most probably you’ll want to add multi-thread-workers to vcl.conf. For vcl native applications, each thread should call vppcom_worker_register. > Is there any document where I can find which POSIX calls are supported ? Not explicitly, but you’ll find that we have ci tests that use nginx/envoy/iperf that should be more complex than the ones lower. > > VPP Main thread and APPlication are running on 2 different CPUs. > I am using the VPP Latest Version. > > vpp# show threads > ID Name Type LWP Sched Policy (Priority) lcore > Core Socket State > 0 vpp_main 163832 other (0) 2 > 0 0 > 1 vpp_wk_0 workers 163834 other (0) 3 > 0 0 > vpp# show version > vpp v26.02-rc0~246-gc9d32e020 built by root on ubuntu at 2025-11-29T04:05:56 > > How to enable the debugging logs for VCL? with VPP_VCL_ELOG enabled, did not > see the logs. VCL_DEBUG (=level) environment variable. For elogs, it may be possible to do "make build VPP_EXTRA_CMAKE_ARGS=-DVPP_VCL_ELOG=ON” Hope this helps. Regards, Florin > > Thanks > Farooq. > <single_thread_app.c><multi_thread_app.c> > >
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#26586): https://lists.fd.io/g/vpp-dev/message/26586 Mute This Topic: https://lists.fd.io/mt/116524534/21656 Group Owner: [email protected] Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/14379924/21656/631435203/xyzzy [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
