Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic allocation memory (part 6) #143

Merged
merged 1 commit into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ jobs:
export YANET_VERSION_CUSTOM=stable
meson setup --prefix=/target \
-Dtarget=release \
-Dyanet_config=release,l3balancer,firewall \
-Darch=corei7,broadwell,knl \
-Dversion_major=$YANET_VERSION_MAJOR \
-Dversion_minor=$YANET_VERSION_MINOR \
Expand Down Expand Up @@ -65,7 +64,6 @@ jobs:
export YANET_VERSION_CUSTOM=stable
meson setup --prefix=/target \
-Dtarget=release \
-Dyanet_config=release,l3balancer,firewall \
-Darch=corei7,broadwell,knl \
-Dversion_major=$YANET_VERSION_MAJOR \
-Dversion_minor=$YANET_VERSION_MINOR \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ steps:
expect: 008-expect.pcap
- values:
- controlplane balancer.reals_unordered.size 12
- controlplane balancer.reals_unordered_ids_unused.size 1011
- controlplane balancer.reals_unordered_ids_unused.size 2097139
- controlplane balancer.real_counters.size 12
- cli:
- balancer real disable balancer0 10.0.0.1 tcp 80 2000::1 80
Expand Down Expand Up @@ -203,44 +203,44 @@ steps:
balancer0 10.0.0.1 tcp 80 rr 2000::1 80 false 1 7 15 1470
- values:
- controlplane balancer.reals_unordered.size 12
- controlplane balancer.reals_unordered_ids_unused.size 1011
- controlplane balancer.reals_unordered_ids_unused.size 2097139
- controlplane balancer.real_counters.size 12
- reload: controlplane.2.conf
- values:
- controlplane balancer.reals_unordered.size 12
- controlplane balancer.reals_unordered_ids_unused.size 1011
- controlplane balancer.reals_unordered_ids_unused.size 2097139
- controlplane balancer.real_counters.size 12
- sleep: 10
- values:
- controlplane balancer.reals_unordered.size 12
- controlplane balancer.reals_unordered_ids_unused.size 1011
- controlplane balancer.reals_unordered_ids_unused.size 2097139
- controlplane balancer.real_counters.size 12
- sleep: 90
- values:
- controlplane balancer.reals_unordered.size 12
- controlplane balancer.reals_unordered_ids_unused.size 1011
- controlplane balancer.reals_unordered_ids_unused.size 2097139
- controlplane balancer.real_counters.size 12
- reload: controlplane.2.conf
- values:
- controlplane balancer.reals_unordered.size 0
- controlplane balancer.reals_unordered_ids_unused.size 1023
- controlplane balancer.reals_unordered_ids_unused.size 2097151
- controlplane balancer.real_counters.size 0
- reload: controlplane.2.conf
- values:
- controlplane balancer.reals_unordered.size 0
- controlplane balancer.reals_unordered_ids_unused.size 1023
- controlplane balancer.reals_unordered_ids_unused.size 2097151
- controlplane balancer.real_counters.size 0
- reload: controlplane.conf
- values:
- controlplane balancer.reals_unordered.size 12
- controlplane balancer.reals_unordered_ids_unused.size 1011
- controlplane balancer.reals_unordered_ids_unused.size 2097139
- controlplane balancer.real_counters.size 12
- reload: controlplane.2.conf
- sleep: 30
- reload: controlplane.conf
- values:
- controlplane balancer.reals_unordered.size 12
- controlplane balancer.reals_unordered_ids_unused.size 1011
- controlplane balancer.reals_unordered_ids_unused.size 2097139
- controlplane balancer.real_counters.size 12
- sleep: 4
- cli_check: |
Expand Down
8 changes: 6 additions & 2 deletions autotest/units/001_one_port/dataplane.conf
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,13 @@
"balancer_tcp_syn_timeout": 60,
"balancer_tcp_fin_timeout": 60,
"balancer_tcp_timeout": 60,
"balancer_udp_timeout": 60
"balancer_udp_timeout": 60,
"nat64stateful_states_size": 65536,
"acl_states4_ht_size": 8192,
"acl_states6_ht_size": 8192,
"balancer_state_ht_size": 1024
},
"memory": 2048,
"memory": 8192,
"sharedMemory": [
{
"tag": "ring1",
Expand Down
72 changes: 0 additions & 72 deletions common/config.autotest.h
Original file line number Diff line number Diff line change
@@ -1,75 +1,3 @@
#include "config.release.h"

#define CONFIG_YADECAP_AUTOTEST

#undef CONFIG_YADECAP_MBUFS_COUNT
#define CONFIG_YADECAP_MBUFS_COUNT (256)

#undef CONFIG_YADECAP_NAT64STATELESS_TRANSLATIONS_SIZE
#define CONFIG_YADECAP_NAT64STATELESS_TRANSLATIONS_SIZE (1024)

#undef YANET_CONFIG_ACL_COUNTERS_SIZE
#define YANET_CONFIG_ACL_COUNTERS_SIZE (3000)

#undef YANET_CONFIG_ACL_STATES4_HT_SIZE
#define YANET_CONFIG_ACL_STATES4_HT_SIZE (8 * 1024)

#undef YANET_CONFIG_ACL_STATES6_HT_SIZE
#define YANET_CONFIG_ACL_STATES6_HT_SIZE (8 * 1024)

#undef CONFIG_YADECAP_TUN64_HT_SIZE
#define CONFIG_YADECAP_TUN64_HT_SIZE (4 * 1024)

#undef CONFIG_YADECAP_TUN64_HT_EXTENDED_SIZE
#define CONFIG_YADECAP_TUN64_HT_EXTENDED_SIZE (1024)

#undef YANET_CONFIG_ROUTE_VALUES_SIZE
#define YANET_CONFIG_ROUTE_VALUES_SIZE (256)

#undef YANET_CONFIG_ROUTE_TUNNEL_VALUES_SIZE
#define YANET_CONFIG_ROUTE_TUNNEL_VALUES_SIZE (256)

#undef YANET_CONFIG_DREGRESS_VALUES_SIZE
#define YANET_CONFIG_DREGRESS_VALUES_SIZE (128)

#undef YANET_CONFIG_DREGRESS_HT_SIZE
#define YANET_CONFIG_DREGRESS_HT_SIZE (4 * 1024)

#undef YANET_CONFIG_DREGRESS_HT_EXTENDED_SIZE
#define YANET_CONFIG_DREGRESS_HT_EXTENDED_SIZE (1024)

#undef CONFIG_YADECAP_FW_STATEFUL6_HT_EXTENDED_SIZE
#define CONFIG_YADECAP_FW_STATEFUL6_HT_EXTENDED_SIZE (1024)

#undef YANET_CONFIG_COUNTERS_SIZE
#define YANET_CONFIG_COUNTERS_SIZE (1024)

#undef YANET_CONFIG_ROUTE_TUNNEL_WEIGHTS_SIZE
#define YANET_CONFIG_ROUTE_TUNNEL_WEIGHTS_SIZE (8 * 1024)

#undef YANET_CONFIG_BALANCER_SERVICES_SIZE
#define YANET_CONFIG_BALANCER_SERVICES_SIZE (1024)

#undef YANET_CONFIG_BALANCER_REALS_SIZE
#define YANET_CONFIG_BALANCER_REALS_SIZE (1024)

#undef YANET_CONFIG_BALANCER_WEIGHTS_SIZE
#define YANET_CONFIG_BALANCER_WEIGHTS_SIZE (8192)

#undef YANET_CONFIG_BALANCER_STATE_HT_SIZE
#define YANET_CONFIG_BALANCER_STATE_HT_SIZE (1024)

#undef YANET_CONFIG_RING_PRIORITY_RATIO
#define YANET_CONFIG_RING_PRIORITY_RATIO (4)

#undef YANET_CONFIG_BALANCER_WLC_RECONFIGURE
#define YANET_CONFIG_BALANCER_WLC_RECONFIGURE (1)

#undef YANET_CONFIG_BALANCER_WLC_DEFAULT_POWER
#define YANET_CONFIG_BALANCER_WLC_DEFAULT_POWER (10)

#undef YANET_CONFIG_NAT64STATEFUL_HT_SIZE
#define YANET_CONFIG_NAT64STATEFUL_HT_SIZE (64 * 1024)

#undef YANET_CONFIG_ACL_TREE_CHUNKS_BUCKET_SIZE
#define YANET_CONFIG_ACL_TREE_CHUNKS_BUCKET_SIZE (1024)
3 changes: 0 additions & 3 deletions common/config.autotest_large.h

This file was deleted.

10 changes: 0 additions & 10 deletions common/config.firewall.h

This file was deleted.

19 changes: 0 additions & 19 deletions common/config.l3balancer.h

This file was deleted.

73 changes: 0 additions & 73 deletions common/config.low_memory.h

This file was deleted.

8 changes: 4 additions & 4 deletions common/config.release.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define CONFIG_YADECAP_MBUFS_COUNT (16 * 1024)
#define CONFIG_YADECAP_MBUFS_COUNT (48 * 1024)
#define CONFIG_YADECAP_MBUF_SIZE (10 * 1024)
#define CONFIG_YADECAP_WORKER_PORTS_SIZE (8)
#define CONFIG_YADECAP_MBUFS_BURST_SIZE (32)
Expand All @@ -22,7 +22,7 @@
#define CONFIG_YADECAP_ACLS_SIZE (256)
#define YANET_CONFIG_ACL_NETWORK_LPM6_TYPE dataplane::updater_lpm6_16x8bit_id32
#define YANET_CONFIG_ACL_STATES4_HT_SIZE (128 * 1024)
#define YANET_CONFIG_ACL_STATES6_HT_SIZE (256 * 1024)
#define YANET_CONFIG_ACL_STATES6_HT_SIZE (128 * 1024)
#define CONFIG_YADECAP_TUN64_HT_SIZE (512 * 1024)
#define CONFIG_YADECAP_TUN64_HT_EXTENDED_SIZE (1024)
#define YANET_CONFIG_REPEAT_TTL (3)
Expand All @@ -40,8 +40,8 @@
#define YANET_CONFIG_BALANCERS_SIZE (32)
#define YANET_CONFIG_BALANCER_SERVICES_SIZE (2 * 1024 * 1024)
#define YANET_CONFIG_BALANCER_REALS_SIZE (2 * 1024 * 1024)
#define YANET_CONFIG_BALANCER_WEIGHTS_SIZE (32 * 1024)
#define YANET_CONFIG_BALANCER_STATE_HT_SIZE (64 * 1024)
#define YANET_CONFIG_BALANCER_WEIGHTS_SIZE (32 * 1024 * 1024)
#define YANET_CONFIG_BALANCER_STATE_HT_SIZE (128 * 1024)
#define YANET_CONFIG_SAMPLES_SIZE (1024 * 64)
#define YANET_CONFIG_RING_PRIORITY_RATIO (4)
#define YANET_CONFIG_BURST_SIZE CONFIG_YADECAP_MBUFS_BURST_SIZE
Expand Down
2 changes: 1 addition & 1 deletion demo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Open new terminal:
$ cd yanet
$ docker run --rm -it -v $PWD:/project yanetplatform/builder

# meson setup -Dyanet_config=low_memory build_release
# meson setup build_release
# meson compile -C build_release
```
Uses the `low_memory` configuration with a reduced memory limit for the ACL, Firewall/NAT64/balancer states, etc.
Expand Down
1 change: 0 additions & 1 deletion image/yanet/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ COPY . /project
RUN meson setup --prefix=/target \
-Dtarget=release \
-Dstrip=true \
-Dyanet_config=release,firewall,l3balancer,low_memory \
-Darch=corei7,broadwell,knl \
-Dversion_major=$YANET_VERSION_MAJOR \
-Dversion_minor=$YANET_VERSION_MINOR \
Expand Down
2 changes: 1 addition & 1 deletion image/yanet/Dockerfile.ubuntu18.04
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ARG YANET_VERSION_CUSTOM=develop
COPY . /project
RUN meson setup --prefix=/target \
-Dtarget=release \
-Dyanet_config=release,firewall,l3balancer,low_memory \
-Dstrip=true \
-Darch=corei7,broadwell,knl \
-Dversion_major=$YANET_VERSION_MAJOR \
-Dversion_minor=$YANET_VERSION_MINOR \
Expand Down
Loading