Commit Graph

35 Commits

Author SHA1 Message Date
fengbojiang 0dc9cb4bbd Add APi `ff_dpdk_raw_packet_send` to suppoort RAW packet send direty with DPDK by user APP not via socket. 2024-10-15 15:22:45 +08:00
Vitaly Pavlov 0d9c205610 fix pthread issue 2024-10-11 00:31:49 +00:00
Radu Nichita 6166910faa Add POSIX Like functions for pthread_create and pthread_join 2024-08-14 10:17:35 +02:00
renzibei 90b9053c56 Add ff_stop_run to stop the poll loop 2024-03-30 05:20:13 +00:00
fengbojiang 81b0219b09 Add an API ff_get_traffic to get traffic for QoS or other. 2023-10-20 12:15:55 +08:00
fengbojiang 19b67af558 gettimeofday automatically compatible with different glibc versions. 2023-10-19 16:48:44 +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 ff8fd2bdc7 Merge branch 'dev' 2022-09-02 16:51:22 +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
fengbojiang 782d5777bd Update annotations for zero-copy API. 2022-04-17 21:05:32 +08:00
fengbojiang e12886c02c 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-04-15 18:00:49 +08:00
fengbojiang 4093ffd426 Update LICENCE. 2021-09-18 16:05:45 +08:00
fengbojiang d96a9d10f4 modify `struct linux_sockaddr` same to `struct sockaddr` in linux. 2021-03-06 19:18:56 +08:00
fengbojiang(姜凤波) cddb7cd030 Add `ff_regist_pcblddr_fun` to regist a pcb lddr function in F-Stack.
If There are multiple ips, and F-Stack client application can choose a source ip by yourself, instead always use the first ip.
2021-03-06 19:18:52 +08:00
fengbojiang(姜凤波) 1ddd0f0898 Add `ff_regist_pcblddr_fun` to regist a pcb lddr function in F-Stack.
If There are multiple ips, and F-Stack client application can choose a source ip by yourself, instead always use the first ip.
2021-03-06 19:04:46 +08:00
fengbojiang 3a84cd1fec User APP can use AF_INET6/PF_INET6 directly whether call ff socket or linux API, such as inet_ntoa/inet_aton. 2020-09-03 01:35:22 +08:00
fengbojiang 8d21adc4b7 User APP can use AF_INET6/PF_INET6 directly whether call ff socket or linux API, such as inet_ntoa/inet_aton. 2020-09-03 01:35:22 +08:00
root e49450aae1 Fix define PF_INET6_LINUX 2019-07-15 17:22:15 +08:00
root 9e60a85fe5 Fix define PF_INET6_LINUX 2019-07-15 17:22:15 +08:00
fengbojiang(姜凤波) adfdf56113 IPv6: FreeBSD stack and f-stack support ipv6. 2019-07-12 20:56:01 +08:00
fengbojiang(姜凤波) d7140ab746 IPv6: FreeBSD stack and f-stack support ipv6. 2019-07-12 20:56:01 +08:00
fengbojiang(姜凤波) d9e0c21a28 Add dispatch API reference. 2019-06-25 12:38:19 +08:00
fengbojiang(姜凤波) ee6c3aa356 modify packet_dispatcher to support response package direct. 2019-03-08 15:12:57 +08:00
whl739 867abe45fa Misc: some updates.
1.add interface `ff_dup` and `ff_dup2`.
2.add interface `ff_ioctl_freebsd`/`ff_getsockopt_freebsd`/`ff_setsockopt_freebsd` for tools.
3.initial parameter `proc-type` can be NULL, default "auto".
2018-06-10 20:41:48 +08:00
logwang 8740605f9d Remove the unusable api `ff_socketpair`.
Since F-Stack doesn't support AF_UNIX. ff_socketpair couldn't work and
should be removed.
2017-12-27 14:59:15 +08:00
chenwei 70bb2888cb Nginx: support kernel network stack, so we can do what fstack can't do,
e.g. unix socket, ipc (with APP on kernel network stack), packet from kernel network stack.
1. Add a new directive kernel_network_stack :
    Syntax: 	kernel_network_stack on | off;
    Default: 	kernel_network_stack off;
   Context: 	http, server
  This directive is available only when NGX_HAVE_FF_STACK is defined.
  Determines whether server should run on kernel network stack or fstack.
2. Use a simpler and  more effective solution to discriminate fstack fd(file descriptor, only socket for now) from kernel fd.
2017-12-08 18:32:08 +08:00
whl739 127dd473af Add tool: ipfw.
ipfw -- interface for firewall, packet scheduler, NAT and so on.

It is comprised of several components: the kernel firewall filter rule processor and its integrated packet accounting facility, the logging facility, NAT, a forward facility, a bridge facility, and an ipstealth facility.
Note that the `dummynet` traffic shaper is not merged.
2017-11-14 16:44:32 +08:00
logwang eb5902d97d Api: add packet dispatch callback function register.
In some cases, for example, packets are forwarded to your server through
IP tunnel, and they will be received on fixed queues, since RSS doesn't support tunnels.So we need to dispatch them again.

With this commit, we can implement a dispatcher callback function and regist
it, packets retrieved from rx queue will be dispatched again according to
the dispatcher result.
2017-11-09 21:22:13 +08:00
logwang 3b2bd0f641 Add tool: ngctl.
ngctl -- netgraph control utility.
The ngctl utility creates a new netgraph node of type socket which can be used to issue netgraph commands.
2017-11-01 17:38:22 +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
logwang 7e048838a7 Add API: ff_gettimeofday.
Since f-stack run with polling mode, nginx will call gettimeofday every loop, and cost a lot.
With this commit, f-stack will update current timespec periodically in
ff_hardclock_job. And ff_gettimeofday will get this value.
In nginx, hijack gettimeofday to call ff_gettimeofday.
2017-08-04 18:04:43 +08:00
logwang 3132126c98 Merge branch master of https://github.com/F-Stack/f-stack 2017-06-14 15:38:42 +08:00
logwang 144c6bcd95 Add tool: route.
This commit ports FreeBSD `route` to F-Stack, can be used to set the route
table.
2017-06-14 15:25:35 +08:00
Ron 1a78ce8ea6 epoll optimization, add ff_kevent_do_each 2017-06-13 17:50:51 +08:00
logwang a9643ea85c init 2017-04-21 18:43:26 +08:00