diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 03c7c53c..9c87e989 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 \ @@ -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 \ diff --git a/autotest/units/001_one_port/048_acl_balancer_route/autotest.yaml b/autotest/units/001_one_port/048_acl_balancer_route/autotest.yaml index 5907d3d1..1244f976 100644 --- a/autotest/units/001_one_port/048_acl_balancer_route/autotest.yaml +++ b/autotest/units/001_one_port/048_acl_balancer_route/autotest.yaml @@ -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 @@ -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: | diff --git a/autotest/units/001_one_port/dataplane.conf b/autotest/units/001_one_port/dataplane.conf index e8d9e2d9..7760deef 100644 --- a/autotest/units/001_one_port/dataplane.conf +++ b/autotest/units/001_one_port/dataplane.conf @@ -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", diff --git a/common/config.autotest.h b/common/config.autotest.h index ce0aedb6..7a270049 100644 --- a/common/config.autotest.h +++ b/common/config.autotest.h @@ -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) diff --git a/common/config.autotest_large.h b/common/config.autotest_large.h deleted file mode 100644 index b9763bc3..00000000 --- a/common/config.autotest_large.h +++ /dev/null @@ -1,3 +0,0 @@ -#include "config.firewall.h" - -#define CONFIG_YADECAP_AUTOTEST diff --git a/common/config.firewall.h b/common/config.firewall.h deleted file mode 100644 index fd74172a..00000000 --- a/common/config.firewall.h +++ /dev/null @@ -1,10 +0,0 @@ -#include "config.release.h" - -#undef YANET_CONFIG_ACL_STATES4_HT_SIZE -#define YANET_CONFIG_ACL_STATES4_HT_SIZE (4 * 1024 * 1024) - -#undef YANET_CONFIG_ACL_STATES6_HT_SIZE -#define YANET_CONFIG_ACL_STATES6_HT_SIZE (64 * 1024 * 1024) - -#undef YANET_CONFIG_NAT64STATEFUL_HT_SIZE -#define YANET_CONFIG_NAT64STATEFUL_HT_SIZE (64 * 1024) diff --git a/common/config.l3balancer.h b/common/config.l3balancer.h deleted file mode 100644 index e0aa1600..00000000 --- a/common/config.l3balancer.h +++ /dev/null @@ -1,19 +0,0 @@ -#include "config.release.h" - -#undef YANET_CONFIG_ACL_STATES4_HT_SIZE -#define YANET_CONFIG_ACL_STATES4_HT_SIZE (128 * 1024) - -#undef YANET_CONFIG_ACL_STATES6_HT_SIZE -#define YANET_CONFIG_ACL_STATES6_HT_SIZE (128 * 1024) - -#undef CONFIG_YADECAP_TUN64_HT_SIZE -#define CONFIG_YADECAP_TUN64_HT_SIZE (4 * 1024) - -#undef YANET_CONFIG_BALANCER_WEIGHTS_SIZE -#define YANET_CONFIG_BALANCER_WEIGHTS_SIZE (32 * 1024 * 1024) - -#undef YANET_CONFIG_BALANCER_STATE_HT_SIZE -#define YANET_CONFIG_BALANCER_STATE_HT_SIZE (64 * 1024 * 1024) - -#undef YANET_CONFIG_NAT64STATEFUL_HT_SIZE -#define YANET_CONFIG_NAT64STATEFUL_HT_SIZE (64 * 1024) diff --git a/common/config.low_memory.h b/common/config.low_memory.h deleted file mode 100644 index e7d79942..00000000 --- a/common/config.low_memory.h +++ /dev/null @@ -1,73 +0,0 @@ -#include "config.release.h" - -#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) diff --git a/common/config.release.h b/common/config.release.h index 722bc6f9..27e96eca 100644 --- a/common/config.release.h +++ b/common/config.release.h @@ -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) @@ -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) @@ -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 diff --git a/demo/README.md b/demo/README.md index e0cd6ca2..118bb033 100644 --- a/demo/README.md +++ b/demo/README.md @@ -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. diff --git a/image/yanet/Dockerfile b/image/yanet/Dockerfile index 9bfc0f07..ab660108 100644 --- a/image/yanet/Dockerfile +++ b/image/yanet/Dockerfile @@ -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 \ diff --git a/image/yanet/Dockerfile.ubuntu18.04 b/image/yanet/Dockerfile.ubuntu18.04 index 7d90d3c6..ad9229dd 100644 --- a/image/yanet/Dockerfile.ubuntu18.04 +++ b/image/yanet/Dockerfile.ubuntu18.04 @@ -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 \