liujinhui-job
111816e292
add __recv_chk/__read_chk/__recvfrom_chk
2025-05-12 15:25:23 +00:00
liujinhui-job
753fdb9f37
Update ff_hook_syscall.c
2025-04-01 11:04:26 +08:00
liujinhui-job
e3766b423e
add accept4 support, and LINUX_SOCK_CLOEXEC/LINUX_SOCK_NONBLOCK support for ff_socket
2025-03-31 09:48:27 +00:00
johnjiang
63196ac70d
Merge pull request #872 from liujinhui-job/fix-ff_hook_recvfrom-sh_fromlen-not-init-error
...
ff_hook_recvfrom sh_fromlen not init by *fromlen
2025-03-27 12:26:57 +08:00
liujinhui-job
ca3551d954
Update ff_socket_ops.c
...
not sould reset sem_flag
2025-03-26 17:12:50 +08:00
liujinhui-job
3c21f22533
ff_hook_recvfrom sh_fromlen not init, ff_sys_recvfrom will return -1
2025-03-24 10:59:14 +00:00
liujinhu_llpt
269d38074a
Update ff_socket_ops.c
...
chaneg sem_flag condition
2025-03-24 16:26:50 +08:00
liujinhu_llpt
b36406e556
Update ff_hook_syscall.c
...
change compile error
2025-03-24 16:19:32 +08:00
liujinhui-job
5de6ec6d25
add epoll polling mode, improve latency performance in RTT mode
2025-03-19 15:47:32 +00:00
liujinhui-job
676ed04695
fix compile syscall directory compile issue
2025-03-12 11:04:56 +00:00
zhaozihanzzh
8d5557ef7d
Close kernel epoll fd in ff_hook_close when using FF_KERNEL_EVENT
...
This commit fixes kernel fd leakage when using epoll in FF_KERNEL_EVENT.
2024-07-16 21:45:54 +08:00
zhaozihanzzh
d0c4ca97ea
Fix cplen calculation errors in ff_hook_syscall.c
...
This commit also modifies the style of the previous fix to be in tune with the original ff_hook_accept.
2024-04-18 22:58:58 +08:00
zhaozihanzzh
99065f0781
Fix cplen calculation
2024-04-10 21:50:34 +08:00
fengbojiang
0ba3e0f107
Fiexd some build errors of micro_thread on ubuntu 22.04 (kernel:5.19.0-1025, gcc:11.4.0),
...
Ref #777 .
2023-08-14 21:01:56 +08:00
fengbojiang
0ee517ed0a
Fiexd some build errors ubuntu 22.04 (kernel:5.19.0-1025, gcc:11.4.0),
...
Ref #777 .
2023-08-14 20:42:34 +08:00
fengbojiang
8471eecb32
Fixed an issue that before C99 mode.
2023-08-14 20:21:29 +08:00
fengbojiang
cbcadd4435
update doc of syscall.
2023-05-18 11:19:40 +08:00
fengbojiang
d5d872badf
Update syscall's REAMDME.
2023-05-12 16:26:57 +08:00
fengbojiang
52c04c6c7f
Update url of LD_PRELOAD.
2023-05-04 16:19:04 +08:00
johnjiang
4c623d4a5f
Update README.md
...
Modify url.
2023-05-03 23:51:30 +08:00
fengbojiang
3e1a3d8082
Add README.md。
2023-05-03 23:23:09 +08:00
fengbojiang
6c13a60c87
Add adapter/README.md.
2023-05-03 17:16:01 +08:00
fengbojiang
8d38554a6f
Add LICENSE.
2023-05-03 17:09:29 +08:00
fengbojiang
f52469fde1
move /app/micro_thread to adapter/micro_thread.
2023-05-03 17:06:40 +08:00
fengbojiang
8f5f1dfbb0
Move adapter diretcory's all file to adapter/syscall.
2023-05-03 17:04:14 +08:00
fengbojiang
b64f360ebc
1. Add main_stack_epoll_kernel.c for helloworld_stack_epoll_kernel that support f-stack and kernel stack at the same time.
...
2. move all main_stack*.c to adapter directory.
2023-05-03 16:59:40 +08:00
fengbojiang
94d26c8a13
modify IOV_MAX to 16.
2023-05-03 12:02:19 +08:00
fengbojiang
edeb90e0b5
fix an issue that close sockfd while Nginx exiting.
2023-04-28 14:48:18 +08:00
fengbojiang
3d3266071c
Use ff_global_cfg.dpdk.pkt_tx_delay to delay ff_handle_each_context to
...
improve the performance of nginx.
2023-04-28 12:26:11 +08:00
fengbojiang
1b25a84cc6
Fix waring.
2023-04-27 20:47:43 +08:00
fengbojiang
85173ced83
try reduce the number of call ff_linux_epoll_wait().
2023-04-27 20:41:54 +08:00
fengbojiang
8ae79cd438
support mutli ff_so_zones.
2023-04-27 18:34:44 +08:00
fengbojiang
3240dd0dad
Add FF_MULTI_SC macro definition to support some special application scenarios, let the child process worker inherit the specified sc.
...
Like Nginx with reuseport.
Parent process socket/bind/listen multi sockets, and use them in different child process worker.
All child process workers must be forked by the same process, scilicet:
support master fork child1, [child1 fork child2], chilid2 fork worker1/worker2/worker3...
But not support master fork worker1, worker fork worker2, worker2 fork worker3...
2. modify some log.
2023-04-27 17:24:32 +08:00
fengbojiang
f98fd1a615
Don't free the memory malloc with rte_malloc in more socket API to
...
improve proformance, such as ff_hook_writev(), ff_hook_ioctl(), ff_hook_setsockopt(), etc.
But there are some others socket API not support this now, such as
ff_hook_recvmsg(), ff_hook_readv(), ff_hook_sendmsg, because it not be
used now, and do it is relatively troublesome, So If you need call them
very frequently, maybe you should support it, and can see
ff_hook_writev().
Now it will cause memory lead, need to fix it later.
2023-04-26 15:29:15 +08:00
fengbojiang
a791578c8a
Fix the issue that memory leak in ff_hook_ioctl and ff_hook_getsockopt.
2023-04-25 15:01:22 +08:00
fengbojiang
77d7051991
Nginx can basic work with libff_syscall.so without any code modify now.
...
1. Add FF_KERNEL_EVENT argument, default disable. If enable FF_KERNEL_EVENT, epoll_create/epoll_clt/epoll_wait always call f-stack and system API at the same time. Use for some scenarios similar to Nginx. And F-Stack's kern.maxfiles value shoudn't > 65536.
2. Fix the issue that abs_timeout possibly is negative numbers.
3. If timeout < 0, such as -1, ff_hook_epoll_wait will run loop always until return some events.
3. Add some log.
2023-04-25 11:59:10 +08:00
fengbojiang
ac0321e70e
Add refcoount in sc for fork and detach.
2023-04-23 11:32:33 +08:00
fengbojiang
dd7dc378ef
opt code.
2023-04-23 10:51:56 +08:00
fengbojiang
3cd0ab86b6
1. Reduce the number of locks with dirty read first, and then try to lock sc and real read. QPS:360k -> 380k.
...
2. memory alignment. QPS:380k -> 400k.
2023-04-14 14:37:15 +08:00
fengbojiang
4af5a643fb
1. Fixed some issue that sem_timewait and sem_post.
...
2. Modify timeout of epoll_wait/kevent from 100us to 100ms by default.
3. set cpu affinity in main_stack_epoll_thread socket.
2023-04-13 19:27:57 +08:00
fengbojiang
d3fabc9cef
some opt.
2023-04-13 19:05:46 +08:00
fengbojiang
e45925dd79
Don't free the memory malloc with rte_malloc in most commonly used socket API, to improve proformance.
...
The performance of single instance from 200,000 QPS improve to 260,000QPS.
NOTE:May cause memory leak.
2023-04-12 18:57:59 +08:00
fengbojiang
dfb462caa7
Save the event num kevent or epoll_wait returned, Use for burst process event in one F-Stack loop to improve performance.
...
The performance of single instance improve from 4500 QPS to 200, 000
QPS.
2023-04-12 18:55:27 +08:00
fengbojiang
2471d2560c
Modify some log.
2023-04-12 17:48:39 +08:00
fengbojiang
03b606ff9b
Support timeout is NULL or 0 in libffsyscall.so.
...
And support it in main_stack.c.
2023-04-12 12:00:53 +08:00
fengbojiang
e58d683b24
burst copy in ff_hook_epoll_wait.
2023-04-12 10:15:22 +08:00
fengbojiang
1d09ad5003
Fixed some issue that check the return value of sem_timedwait.
2023-04-11 17:51:34 +08:00
fengbojiang
8766cedde1
Add timeout in kevent.
2023-04-08 09:29:50 +08:00
fengbojiang
f27d862f85
1. Add kevent demo, need link libff_syscall.so, not LD_PRELOAD.
...
2. Fix some issues.
2023-04-07 20:39:31 +08:00
fengbojiang
e8ed03b521
Modify FF_SOCKET_THREAD disable by default.
2023-04-07 13:44:41 +08:00