diff options
author | Junfeng Wang <drenfong.wang@intel.com> | 2020-02-05 17:30:14 +0800 |
---|---|---|
committer | Junfeng Wang <drenfong.wang@intel.com> | 2020-02-24 02:09:21 +0000 |
commit | 18bd20a47409d0292499c1442584a3a34e06755f (patch) | |
tree | afc997f85896388afa10162a2df8a0f5d11b3fc3 /src | |
parent | 3a1d30482cb0514fb18bf08590236fd1b3eba418 (diff) |
fix hyperscan and udpi's building
Change-Id: I004a2d0ac46ebc452d65a0dfbdb8272d7788d5a8
Signed-off-by: Junfeng Wang <drenfong.wang@intel.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/dpi.c | 7 | ||||
-rw-r--r-- | src/dpi_api.c | 11 |
2 files changed, 3 insertions, 15 deletions
@@ -259,7 +259,7 @@ dpi_flow_add_del (dpi_add_del_flow_args_t * a, u32 * flow_idp) vnet_main_t *vnm = dm->vnet_main; dpi4_flow_key_t key4; dpi6_flow_key_t key6; - dpi_flow_entry_t *p; + u32 *p; u32 is_ip6 = a->is_ipv6; u32 flow_id; dpi_flow_entry_t *flow; @@ -395,9 +395,9 @@ dpi_reverse_flow_add_del (dpi_add_del_flow_args_t * a, u32 flow_id) vnet_main_t *vnm = dm->vnet_main; dpi4_flow_key_t key4; dpi6_flow_key_t key6; - dpi_flow_entry_t *p; u32 is_ip6 = a->is_ipv6; dpi_flow_entry_t *flow; + u32 *p; int not_found; if (!is_ip6) @@ -463,7 +463,6 @@ dpi_reverse_flow_add_del (dpi_add_del_flow_args_t * a, u32 flow_id) if (!p) return VNET_API_ERROR_NO_SUCH_ENTRY; - flow_id = is_ip6 ? key6.value : key4.value; flow = pool_elt_at_index (dm->dpi_flows, flow_id); if (!is_ip6) @@ -473,8 +472,6 @@ dpi_reverse_flow_add_del (dpi_add_del_flow_args_t * a, u32 flow_id) if (flow->flow_index != ~0) vnet_flow_del (vnm, flow->flow_index); - - pool_put (dm->dpi_flows, flow); } return 0; diff --git a/src/dpi_api.c b/src/dpi_api.c index d8fa690..cfb5262 100644 --- a/src/dpi_api.c +++ b/src/dpi_api.c @@ -64,15 +64,6 @@ typedef enum #define REPLY_MSG_ID_BASE dm->msg_id_base #include <vlibapi/api_helper_macros.h> -static void -setup_message_id_table (dpi_main_t * dm, api_main_t * am) -{ -#define _(id,n,crc) \ - vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id + dm->msg_id_base); - foreach_vl_msg_name_crc_dpi; -#undef _ -} - #define foreach_dpi_plugin_api_msg \ _(DPI_FLOW_ADD_DEL, dpi_flow_add_del) @@ -144,7 +135,7 @@ dpi_api_hookup (vlib_main_t * vm) #undef _ /* Add our API messages to the global name_crc hash table */ - setup_message_id_table (dm, &api_main); + dm->msg_id_base = setup_message_id_table (); return 0; } |