perf: Reduce str_to_mac() and inet_addr() calls

This commit is contained in:
luwenpeng
2023-10-12 11:59:42 +08:00
parent 49ccb5149f
commit 4f870de963
7 changed files with 68 additions and 64 deletions

View File

@@ -8,6 +8,7 @@ extern "C"
#include "utils.h"
#include "raw_packet.h"
#include <linux/if_ether.h>
enum traffic_type
{
@@ -97,8 +98,8 @@ struct selected_sf
struct throughput_metrics rx;
struct throughput_metrics tx;
char sf_dst_ip[16];
char sf_dst_mac[32];
in_addr_t sf_dst_ip;
u_char sf_dst_mac[ETH_ALEN];
int sf_index;
};