perf: 查询流表时关闭addr2string

This commit is contained in:
luwenpeng
2023-06-01 14:45:50 +08:00
parent a9df9ebe81
commit 9395538973

View File

@@ -3,7 +3,7 @@
#include "tfe_session_table.h"
#include <tfe_utils.h>
extern void * g_packet_io_logger;
extern void *g_packet_io_logger;
struct session_table
{
@@ -197,7 +197,6 @@ struct session_node *session_table_search_by_id(struct session_table *table, uin
struct session_node *session_table_search_by_addr(struct session_table *table, const struct addr_tuple4 *session_addr)
{
struct session_node *temp = NULL;
char *addr_str = addr_tuple4_to_str(session_addr);
HASH_FIND(hh2, table->root_by_addr, session_addr, sizeof(struct addr_tuple4), temp);
if (!temp)
{
@@ -206,16 +205,9 @@ struct session_node *session_table_search_by_addr(struct session_table *table, c
HASH_FIND(hh2, table->root_by_addr, &reverse_addr, sizeof(struct addr_tuple4), temp);
if (!temp)
{
TFE_LOG_DEBUG(g_packet_io_logger, "%s: search: key %s not exists", LOG_TAG_STABLE, addr_str);
free(addr_str);
addr_str = NULL;
return NULL;
}
}
TFE_LOG_DEBUG(g_packet_io_logger, "%s: search: key %s success", LOG_TAG_STABLE, addr_str);
free(addr_str);
addr_str = NULL;
return temp;
}