Commit Graph

200 Commits

Author SHA1 Message Date
fengbojiang 3ae8012231 Merge branch 'dev' into freebsd13 2021-09-30 19:58:08 +08:00
fengbojiang 21cfeb4372 Support extra tcp stacks, rack and bbr. 2021-09-23 15:16:09 +08:00
fengbojiang a08a136a15 modify licence. 2021-09-18 16:48:25 +08:00
fengbojiang 4093ffd426 Update LICENCE. 2021-09-18 16:05:45 +08:00
fengbojiang 9dcb6a7622 Add lib/ff_subr_epoch.c. 2021-09-18 15:10:42 +08:00
fengbojiang 8fe2bf87f3 FreeBSD13 can simply work. 2021-09-18 14:50:06 +08:00
fengbojiang 63f0426fdf fix some issues. 2021-09-16 15:30:22 +08:00
fengbojiang 81dd6c7a24 If process_dispatch_ring() has data packet to be processed and it is considered non-idle state. 2021-09-02 12:09:09 +08:00
fengbojiang 0508c8b8ec The CPU usage of packet_dispatcher() is modified to usr. 2021-09-02 12:04:32 +08:00
fengbojiang 0b4a084c8a fix a plurality of packets may not statistics in ff_traffic.rx_packets and ff_traffic.rx_bytes. 2021-09-02 11:47:13 +08:00
fengbojiang e7b7fb6cc9 FreeBSD: Upgrade to FreeBSD-releng-13.0 compiled, to be tested. 2021-08-31 19:00:09 +08:00
fengbojiang 4e3599d820 Support set multi virtual IPv4/IPv6 net addrs in `config.ini`, instead of use `ff_ifconfig`.
Close #421.
2021-06-16 19:26:52 +08:00
fengbojiang 2ea8dd153c modify pcap config. 2021-06-16 19:06:45 +08:00
Hawker 51108f9c2e support `IPV6_RECVPKTINFO` 2021-03-06 19:19:03 +08:00
Hawker d428f7900c Support IPPROTO_IPV6
f-stack中缺乏对`IPPROTO_IPV6`协议相关选项`IPV6_V6ONLY`的支持;无法在ipv6兼容ipv4场景进行网络通信。调用setsockopt时会出现失败。
2021-03-06 19:19:03 +08:00
fengbojiang 7b8cf09355 Support DPDK 20.11.0(LTS). 2021-03-06 19:18:57 +08:00
fengbojiang 4c0b1abdf1 upgrade F-STACK_VERSION to 1.21. 2021-03-06 19:18:57 +08:00
fengbojiang d96a9d10f4 modify `struct linux_sockaddr` same to `struct sockaddr` in linux. 2021-03-06 19:18:56 +08:00
fengbojiang 527e34d48a Fix some issues of ff msg. 2021-03-06 19:18:53 +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
zengyi1001 d53ebd8f3c Add IPv6 net addr parameters in config
Co-authored-by: fengbojiang <fengbojiang@tencent.com>
2021-03-06 19:18:52 +08:00
fengbojiang 8fb48d649e Fix #560, Wrong msg_flags in struct msghdr after calling ff_recvmsg in a Linux application. 2021-03-06 19:18:52 +08:00
freak82 0816b9cb45 Fix #568, Insufficient condition in ff_rte_frm_extcl function. 2021-03-06 19:18:52 +08:00
Jianfeng Tan 06c3e57024 fix use after free issue in mbuf free
Two kinds of mbuf are used in f-stack: freebsd mbuf and dpdk mbuf.

freebsd mbufs are metadata used in freebsd stack, and their data
pointers (m_data) point to dpdk mbuf's data (buf_addr). And they have
their own chain, like this:

  bsd_mbuf1 -> bsd_mbuf2 -> bsd_mbuf3
      \            \            \
    dpdk_mbuf1 -> dpdk_mbuf2 -> dpdk_mbuf3

Considering the map relationship,

- m_freem() is corresponding to rte_pktmbuf_free(), is to free the whole
  chain of mbufs.
- m_free() is corresponding to rte_pktmbuf_free_seg(), is to free the
  specified mbuf segment.

The current implementation in f-stack uses rte_pktmbuf_free() for
m_free(). This leads to mbufs, which are still in use, be freed
unexpectedly. For example, if the bsd_mbuf1 is trimed into zero length,
bsd will invoke m_free() to free the specified segment, however, the
whole mbuf chain is freed by calling rte_pktmbuf_free().

  #0 rte_pktmbuf_free (m=0x22006fb480)
  #1 in ff_dpdk_pktmbuf_free (m=0x22006fb480)
  #2 in ff_mbuf_ext_free (m=0x7ffff7f82800, arg1=0x22006fb480, arg2=0x0)
  #3 in mb_free_ext (m=0x7ffff7f82800)
  #4 in m_free (m=0x7ffff7f82800)
  #5 in sbcompress (sb=, m=0x7ffff7f82800, n=)
  #6 in sbappendstream_locked (sb=, m=0x7ffff7f82800, flags=0)

The fix is straightforward. Use the correct API for segment free.

Reported-by: Yong-Hao Zou <yonghaoz1994@gmail.com>
Signed-off-by: Jianfeng Tan <henry.tjf@antgroup.com>
2021-03-06 19:18:52 +08:00
Hawker c0c877b54c update comments 2021-03-06 19:18:52 +08:00
Hawker 6fb0694d16 update comments 2021-03-06 19:18:52 +08:00
Hawker dc643060d1 update comments 2021-03-06 19:18:52 +08:00
Hawker 8155960f54 update create_tcp_flow parameter 2021-03-06 19:18:51 +08:00
Hawker 170b9c333f update init_flow 2021-03-06 19:18:50 +08:00
Hawker d5f823fe01 Replace deprecated filter api with generic flowapi 2021-03-06 19:18:50 +08:00
Hawker 55151ab9d2 Bugfix: support rte_flow_isolate for multi lcore (#562)
* Bugfix: support rte_flow_isolate

init flow isolate mode only run once
2020-11-25 11:31:04 +08:00
fengbojiang 62653ab1a5 Fix bug of `sysctl` in tools/compat/sysctl.c.
The ff msg shouldn't to free while `ff_ipc_send` success but `ff_ipc_recv` failed (such as F-Stack app are breaking by gdb).
2020-11-21 21:27:55 +08:00
zhangxiang10 eff1a060f0 解析file_prefix&pci-whitelist配置 2020-11-17 19:19:19 +08:00
zhangxiang10 c661338e72 解析file_prefix&pci-whitelist配置 2020-11-17 19:04:23 +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 1b5649a396 Add configuration options `symmetric_rss` to set whether to use symmetric RSS. 2020-08-30 00:55:08 +08:00
fengbojiang(姜凤波) 56101252f6 upgrade F-STACK_VERSION to 1.21. 2020-06-19 10:54:34 +08:00
johnjiang 37a7c72f09 DPDK: upgrade to DPDK 19.11.2(LTS). 2020-06-18 16:55:50 +00:00
johnjiang e27c5f4e3a Merge branch 'dev' into feature-knictl 2020-05-21 10:56:12 +08:00
pengtian 0b1e7c031e #add knictl support 2020-05-14 18:30:34 +08:00
johnjiang 53638472c1 Merge pull request #475 from jinhao2/dev
modify dump codes.
2020-01-10 14:36:47 +08:00
rolfliu 37720803e1 Fix #43 #434 for Nginx transparent proxy 2020-01-10 14:26:02 +08:00
jinhao2 cd5b4948de update ff_dump_packets 2020-01-08 21:23:33 +08:00
jinhao2 80d23aa1da update indent size 2020-01-08 21:13:12 +08:00
jin.hao1 a2728d1e67 Update ff_config.h
use 4 spaces indent.
2020-01-07 21:10:08 +08:00
jin.hao1 6d051c0454 update config.c
use 4 space other than tab.
2020-01-07 21:04:17 +08:00
jinhao2 ce40395e0c dump packets by core, instead of by ports;without fopen/fclose while dumping 2020-01-08 12:09:40 +08:00
fengbojiang f67a26a199 Add `ip6_fastfwd.c` in `Makefile`. 2019-11-23 11:40:18 +08:00
Jayath Sathyanarayana 316f2a31b4 Merge patch of Configuration param to skip "TX checksum offload", refer #448. 2019-11-04 13:10:27 +08:00
fengbojiang 86cd82dc87 SOCKET: support `SO_REUSEPORT`. 2019-11-04 10:44:07 +08:00