Commit Graph

43 Commits

Author SHA1 Message Date
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 cf587718c2 set cpu affinity in main_stack_thread_socket.c. 2023-04-19 13:54:10 +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 f85c52e341 Don't sleep while no event triggerd in demo. 2023-04-12 17:49:16 +08:00
fengbojiang 739ea21764 Add some log. 2023-04-12 12:03:34 +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 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
fengbojiang 88318c48c4 Fix lock issue. 2023-04-07 12:00:02 +08:00
fengbojiang c0677726be Add main_stack_epoll_pipeline, and must disable FF_THREAD_SOCKET before build adapter. 2023-04-07 11:27:34 +08:00
fengbojiang 5a01e6f99b Optimize some code of main_stack_epoll. 2023-04-07 11:26:30 +08:00
fengbojiang baceb8fd64 1. Add FF_PROC_ID environment variable to fix the issue that secondary APP's process get sc
from the first ff_so_zone.
2. SIGINT can destructor sc.
2023-04-07 10:43:37 +08:00
fengbojiang 7492bfbcb6 Add helloworld_stack_epoll for demo. 2023-04-06 21:53:02 +08:00
fengbojiang 9e149018e3 Add header file `#include <sys/ioctl.h>` in `example/mai.c`. 2023-02-17 19:13:42 +08:00
fengbojiang 7b98ccb479 1. Set non blocking in `example/main.c`.
2. Add some description of `ff_socket()` and `ff_write()`.
3. Ref #709.
2023-02-17 19:10:41 +08:00
fengbojiang 06553fe07a Code formatting fine-tuning for `example/main_zc`. 2023-02-17 19:09:53 +08:00
fengbojiang c0a9f536ca Fixed #705. While Adding -DNDEBUG flag will cause the helloworld example
to crash. Because `assert((kq = ff_kqueue()) > 0);` was be ignored and
nevents used usigned type.
2023-02-16 17:17:10 +08:00
fengbojiang 51c91ab0ad Enable INET6 by default in helloworld. 2022-09-02 20:20:05 +08:00
fengbojiang 021aaded2c Support zero copy while call `ff_write`, you can enable it by modify ‘FF_ZC_SEND=1' in `lib/Makefile`.
`FF_ZC_SEND` is same as `FF_USE_PAGE_ARRAY`, it will improve performance slightly in some scenarios, need to be tested in combination with real applications.

You can enable both compilation options at the same time or separately.
2022-05-07 12:02:49 +08:00
Aayush Atharva 14a7a2abc3 Fix typo 2021-05-25 13:28:49 +05:30
jfb8856606 5de5f63f0e fix compilation problem of example. 2021-03-06 19:19:02 +08:00
fengbojiang 7b8cf09355 Support DPDK 20.11.0(LTS). 2021-03-06 19:18:57 +08:00
fengbojiang(姜凤波) 35fdfcdb22 helloword sever demo support IPv6. 2019-08-08 22:03:57 +08:00
fengbojiang(姜凤波) e8591dc5c0 F-Stack's kni can work on DPDK 18.11 LTS now. 2019-03-14 17:17:58 +08:00
vanlink ec61049c5f remove unnecessary one byte from html page 2019-02-11 16:34:21 +08:00
logwang 2bfe3f2e55 DPDK: upgrade to 17.11.2 LTS.
Changes:
1. This version is downloaded from
https://fast.dpdk.org/rel/dpdk-17.11.2.tar.xz.
2. Adapt the new interface `rte_ring_dequeue_burst`.
3. Change the type of `port_id` from uint8_t to uint16_t.
4. Just link libdpdk.a instead of the other libaries.
5. Install libnuma-dev first.
6. Update the documents.
2018-05-15 17:49:22 +08:00
logwang b9e91cfd6a Example: fix listen queue overflow.
According to the FreeBSD Manual Page:
- When kevent() returns and if `flags` is EVFILT_READ, sockets which have previously been passed to listen() return when there is an incoming connection pending. `data` contains the size of the listen backlog.

So if an EVFILT_READ event reaches and it is the listen socket, we must accept `event->data` times. And for `ff_epoll` interface, we should continue to accept until it fails.

In the previous version, we only accept once when event reaches, it will cause listen queue overflow.
2017-12-21 23:23:33 +08:00
logwang 02610d5877 Example: keep run when accept failed. 2017-11-21 11:42:09 +08:00
logwang 1a527102bc Example: exit when ff_api failed 2017-09-14 18:57:37 +08:00
logwang 8cf1d457cb Optimize makefile 2017-09-14 15:25:07 +08:00
logwang 615f2d3c02 Fix `ff_fdused_range` not work. 2017-08-08 23:47:38 +08:00
logwang a02c88d651 Simplify startup arguments and add ff_fdisused.
Changes:
1.Simplify f-stack startup arguments:"--conf, --proc-type, --proc-id".
2.add a function `ff_fdisused` to check if fd is used in f-stack.
2017-08-08 22:36:49 +08:00
Ron 1a78ce8ea6 epoll optimization, add ff_kevent_do_each 2017-06-13 17:50:51 +08:00
logwang df6ad73146 Add tool: ifconfig.
Changes:
    Remove directory `ipc`, and add a new directory `compat`.
    Directory `compat` includes some FreeBSD source files to be compatible
        with Linux.
    Port FreeBSD ifconfig to F-Stack.
2017-06-06 16:52:52 +08:00
logwang 7abd0fb2a9 Add tool: sysctl.
This commit contains an ipc library implemented by dpdk rte_ring and
sysctl tool ported from FreeBSD.

With this commit we can get and set FreeBSD kernel state in runtime.
2017-05-23 23:13:49 +08:00
byronhe 7991c74543 fix compile error 2017-05-18 00:28:38 +08:00
limzhang(张力) 8a0cdb99c3 example:remove printf 2017-05-15 17:55:26 +08:00
limzhang(张力) fd436ff2d2 add example code which use epoll API. 2017-05-15 17:49:25 +08:00
logwang 8745404160 example: remove pkg-config in Makefile.
Because pkg-config(version before 0.28) reordered -Wl,--whole-archive -Wl,--no-whole-archive not to surround the dpdk libraries, so we remove pkg-config and do it ourselves.
2017-05-12 11:06:04 +08:00
whl739 2dfcd880c7 example: remove printf. 2017-05-10 17:20:41 +08:00
logwang a9643ea85c init 2017-04-21 18:43:26 +08:00