Skip to content

Commit 8b77988

Browse files
tomerdbzgalnoam
authored andcommitted
issue: 4640792 fix incorrect cast
Fix incorrect boolean type definitions for two configuration parameters that should be integer types based on their actual usage and environment variable mappings. The parameters were incorrectly defined as boolean when they should be integer, causing build failures. This is a follow-up fix to correct the type mismatches. Changes: - performance.polling.yield_on_poll: Change from bool to int - Controls number of polling iterations before yielding - Disable with 0, not false - applications.nginx.udp_socket_pool_reuse: Change from bool to int - Controls UDP socket pool reuse behavior - Disable with 0, not false These parameters map to environment variables that expect int values: - XLIO_RX_POLL_YIELD - XLIO_NGINX_UDP_POOL_RX_NUM_BUFFS_REUSE Signed-off-by: Tomer Cabouly <[email protected]>
1 parent e7d5176 commit 8b77988

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/core/util/sys_vars.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1940,7 +1940,7 @@ void mce_sys_var::initialize_base_variables(const config_registry &registry)
19401940
registry.get_default_value<uint32_t>("performance.polling.rx_kernel_fd_attention_level");
19411941
hw_ts_conversion_mode = static_cast<ts_conversion_mode_t>(
19421942
registry.get_default_value<int>("network.timing.hw_ts_conversion"));
1943-
rx_poll_yield_loops = registry.get_default_value<bool>("performance.polling.yield_on_poll");
1943+
rx_poll_yield_loops = registry.get_default_value<int>("performance.polling.yield_on_poll");
19441944
select_handle_cpu_usage_stats = registry.get_default_value<bool>("monitor.stats.cpu_usage");
19451945
rx_ready_byte_min_limit =
19461946
registry.get_default_value<uint32_t>("performance.override_rcvbuf_limit");
@@ -2053,7 +2053,7 @@ void mce_sys_var::initialize_base_variables(const config_registry &registry)
20532053
nginx_udp_socket_pool_size =
20542054
registry.get_default_value<uint32_t>("applications.nginx.udp_pool_size");
20552055
nginx_udp_socket_pool_rx_num_buffs_reuse =
2056-
registry.get_default_value<bool>("applications.nginx.udp_socket_pool_reuse");
2056+
registry.get_default_value<int>("applications.nginx.udp_socket_pool_reuse");
20572057
#endif
20582058
#if defined(DEFINED_NGINX) || defined(DEFINED_ENVOY)
20592059
app.type = APP_NONE;

0 commit comments

Comments
 (0)