Commit Graph

188 Commits

Author SHA1 Message Date
fengbojiang b244ea900d F-Stack support DPDK-23.11.3(LTS). 2025-01-10 19:56:51 +08:00
zcj 3dbcad7caf set the IP-type flag for tx_csum_l4 offload 2024-12-13 02:20:56 +08:00
fengbojiang f069dcdcb7 Support KNI ratelimit. 2024-10-17 16:12:43 +08:00
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
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 beaeed64a9 FF_FLOW_ISOLATE support DPDK-22.11. 2023-09-20 20:54:47 +08:00
fengbojiang 51c6fbd66b Modify some code of KNI support virtio_user. 2023-09-19 18:38:17 +08:00
fengbojiang ba2a7fe957 Add kni type argument in config.ini and FF_KNI_KNI in lib/Makefile to set exception path type.
FF_KNI_KNI disabled by default and then:
type 0 and 1 both use virtio_user.

If enabled FF_KNI_KNI(and you must set meson -Ddisable_libs=flow_classif to re-enable kni driver in DPDK first):
type:0 means use historical kni.
type:1 means use virtio_user(linux only), see https://doc.dpdk.org/guides/howto/virtio_user_as_exception_path.html#virtio-user-as-exception-path.
2023-09-19 18:28:57 +08:00
jfb8856606 99b1fff09d f-stack lib support dpdk-22.11.3. 2023-09-13 12:23:25 +00:00
renzibei 7fe40f937e make it compilable under O2 optimization, pass gcc check 2022-12-01 22:02:45 +00:00
fengbojiang 5423ff871b Fix DEPRECATED. 2022-11-12 23:51:36 +08:00
fengbojiang a329eaf2c0 vlan_strip support kni. 2022-11-12 23:35:29 +08:00
hao 4854315d0d Added FDIR using general flow rules.
Added FDIR functionality that does not use flow in isolation mode. This is a part of the research work at RCSLab, University of Waterloo
2022-09-15 20:56:47 -04:00
fengbojiang 0b9105dad3 F-Stack lib and docs support DPDK-21.11. 2022-09-06 12:11:17 +08:00
fengbojiang ff8fd2bdc7 Merge branch 'dev' 2022-09-02 16:51:22 +08:00
fengbojiang ae7ea12bc0 F-Stack support HPTS for rack/bbr, and rack work correctly, but bbr
still has some problems when transferring large files, and the
issue with bbr will be attempted to be resolved after FreeBSD is
upgraded to 13.1 in the next release(1.23).
2022-09-01 19:18:12 +08:00
fengbojiang 2156ba56d9 Merge branch 'master' of https://github.com/F-Stack/f-stack 2022-08-27 20:48:45 +08:00
agerguo b60bfba1bb
Update ff_dpdk_if.c
bond numa
2022-08-19 14:42:19 +08:00
fengbojiang 8edd7a76c2 Add include rte_eth_bond_8023ad.h. Fix #681. 2022-07-06 15:39:40 +08:00
Lorisy 1056bf23c3 对于LACP模式下的bond功能,LACP的协商报文驱动默认加入ring队列,但是不会消费,可以使用单独的队列来做lacp的协商 2022-07-06 15:39:34 +08:00
fengbojiang 4b03900402 Add include rte_eth_bond_8023ad.h. Fix #681. 2022-07-05 14:50:22 +08:00
Lorisy f614f3053a 对于LACP模式下的bond功能,LACP的协商报文驱动默认加入ring队列,但是不会消费,可以使用单独的队列来做lacp的协商 2022-06-29 15:40:52 +08:00
hao 9f7a1423a0 Added F-Stack FreeBSD support (This is a part of the research work at RCSLab, University of Waterloo) 2022-05-31 19:46:09 -04:00
fengbojiang 3ae8012231 Merge branch 'dev' into freebsd13 2021-09-30 19:58:08 +08:00
fengbojiang 4093ffd426 Update LICENCE. 2021-09-18 16:05:45 +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 7b8cf09355 Support DPDK 20.11.0(LTS). 2021-03-06 19:18:57 +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
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
fengbojiang 4b7cdbfe03 Fix some issues of ff msg. 2021-03-06 19:04:47 +08:00
fengbojiang 81612f2676 Fix some issues of ff msg. 2021-03-06 19:04:47 +08:00
fengbojiang(姜凤波) 9fc26dbf88 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(姜凤波) 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
Jianfeng Tan e6161e2b0f 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:04:46 +08:00
Jianfeng Tan 84456118c7 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:04:46 +08:00
Hawker fc7cff57bb update comments 2021-03-06 19:04:46 +08:00
Hawker 76f39db167 update comments 2021-03-06 19:04:46 +08:00
Hawker 663e85b1d7 update comments 2021-03-06 19:04:46 +08:00
Hawker c2cb022c64 update comments 2021-03-06 19:04:46 +08:00
Hawker cb0cb8ee1f update comments 2021-03-06 19:04:45 +08:00