simple connection tracking table module for recording flow info and modifying headers of packets forwarded by software
More...
#include "doca_ar_conntrack.h"
#include <rte_hash.h>
#include <rte_jhash.h>
#include <rte_hash_crc.h>
#include <rte_mempool.h>
#include <rte_malloc.h>
#include <rte_memcpy.h>
simple connection tracking table module for recording flow info and modifying headers of packets forwarded by software
- Author
- Mark Chen (markc.nosp@m.hen7.nosp@m.7888@.nosp@m.gmai.nosp@m.l.com)
- Version
- 1.0
- Date
- 2024-01-07
- Copyright
- Copyright (c) 2024
◆ doca_ar_add_conn()
get conn from mempool and add conn into the conntrack table
- Parameters
-
- Returns
- struct doca_ar_conn*
◆ doca_ar_conntrack_init_env()
int doca_ar_conntrack_init_env |
( |
int | maxConntrack | ) |
|
init connection tracking table and mempool
- Parameters
-
- Returns
- int
◆ doca_ar_del_conn()
void doca_ar_del_conn |
( |
void * | conn | ) |
|
del conn from the conntrack table and put back to mempool
- Parameters
-
◆ doca_ar_dump_conn()
void doca_ar_dump_conn |
( |
struct cmdline * | cl | ) |
|
iterate the whole conntrack table and print all conns info onto cmdline
- Parameters
-
◆ doca_ar_find_conn()
find the conn from conntrack table
- Parameters
-
- Returns
- struct doca_ar_conn*
◆ doca_ar_modify_conn()
void doca_ar_modify_conn |
( |
struct doca_ar_conn * | conn, |
|
|
struct rte_mbuf * | m ) |
modify the sport of conn and offload cksum
- Parameters
-
◆ doca_ar_parse_conn()
pasrse conn match from rte_mbuf
- Parameters
-
- Returns
- int
◆ doca_ar_print_match()
debug api for pring match info
- Parameters
-
◆ DOCA_LOG_REGISTER()
DOCA_LOG_REGISTER |
( |
DOCA_AR_CONNTRACK | | ) |
|
◆ myHash()
uint32_t myHash |
( |
const void * | key, |
|
|
uint32_t | key_len, |
|
|
uint32_t | init_val ) |
user-defined hash function,here we directly use the rss val precomputed by hardware as the result of hash function so that we can save the cpu cosumption
- Parameters
-
- Returns
- uint32_t
◆ CT
struct rte_hash* CT = NULL |
◆ CT_POOL
struct rte_mempool* CT_POOL = NULL |
◆ maxConntrack