Skip to content

Commit

Permalink
increased max entries for tproxy_extension_map, if_list_extension_map…
Browse files Browse the repository at this point in the history
… and range maps
  • Loading branch information
r-caamano committed May 22, 2024
1 parent f44fddd commit 204b5c2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 5 additions & 3 deletions src/zfw.c
Original file line number Diff line number Diff line change
Expand Up @@ -2442,8 +2442,8 @@ void map_insert()
{
printf("BPF_OBJ_GET: %s \n", strerror(errno));
free(key);
free(orule);
free(rule);
free(orule);
close_maps(1);
}
map.map_fd = fd;
Expand Down Expand Up @@ -2481,6 +2481,7 @@ void map_insert()
free(key);
free(index);
free(port_mapping);
free(rule);
free(orule);
close(fd);
close_maps(1);
Expand All @@ -2502,10 +2503,10 @@ void map_insert()
if (count_fd == -1)
{
printf("BPF_OBJ_GET: %s \n", strerror(errno));
free(rule);
free(key);
free(index);
free(port_mapping);
free(rule);
free(orule);
close(fd);
close_maps(1);
Expand Down Expand Up @@ -2549,13 +2550,14 @@ void map_insert()
printf("MAP_UPDATE_ELEM: %s \n", strerror(errno));
free(key);
free(port_mapping);
free(rule);
free(orule);
close(fd);
close_maps(1);
}
free(rule);
free(key);
free(port_mapping);
free(rule);
free(orule);
close(fd);
struct tproxy_extension_key tp_ext_key = {
Expand Down
6 changes: 3 additions & 3 deletions src/zfw_tc_ingress.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ struct {
__uint(type, BPF_MAP_TYPE_HASH);
__uint(key_size, sizeof(struct tproxy_extension_key));
__uint(value_size, sizeof(struct tproxy_extension_mapping));
__uint(max_entries, 128000);
__uint(max_entries, 10000000);
__uint(pinning, LIBBPF_PIN_BY_NAME);
__uint(map_flags, BPF_F_NO_PREALLOC);
} tproxy_extension_map SEC(".maps");
Expand All @@ -402,7 +402,7 @@ struct {
__uint(type, BPF_MAP_TYPE_HASH);
__uint(key_size, sizeof(struct port_extension_key));
__uint(value_size, sizeof(struct if_list_extension_mapping));
__uint(max_entries, 128000);
__uint(max_entries, 10000000);
__uint(pinning, LIBBPF_PIN_BY_NAME);
__uint(map_flags, BPF_F_NO_PREALLOC);
} if_list_extension_map SEC(".maps");
Expand All @@ -411,7 +411,7 @@ struct {
__uint(type, BPF_MAP_TYPE_HASH);
__uint(key_size, sizeof(struct port_extension_key));
__uint(value_size, sizeof(struct range_mapping));
__uint(max_entries, 132000);
__uint(max_entries, 10000000);
__uint(pinning, LIBBPF_PIN_BY_NAME);
__uint(map_flags, BPF_F_NO_PREALLOC);
} range_map SEC(".maps");
Expand Down

0 comments on commit 204b5c2

Please sign in to comment.