perf: 查询流表时关闭addr2string
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user