Skip to content

Commit 6d2a418

Browse files
committed
issue: 4207451 Improve config parameter naming
This patch restructures the XLIO configuration system for organization: 1. Rename 'observability' namespace to 'monitor' 2. Reorganize parameter paths: - Move WRE counts from buffers to rings section - Rename 'select' polling to 'iomux' to better reflect its purpose - Group related parameters more logically 3. Flatten completion queue interrupt moderation params 4. Improve parameter naming for clarity: - sendfile_limit → sendfile_cache_limit - dup2_support → dup2_close_fd - rx_duration_usec → blocking_rx_poll_usec - ts_conversion → hw_ts_conversion 5. Move profiles.spec to top-level namespace All related code, mappings, and documentation are updated. Signed-off-by: Tomer Cabouly <[email protected]>
1 parent b6c652d commit 6d2a418

File tree

7 files changed

+521
-536
lines changed

7 files changed

+521
-536
lines changed

README

Lines changed: 208 additions & 202 deletions
Large diffs are not rendered by default.

src/core/config/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ The schema organizes configuration into the following main sections:
3939
3. **hardware**: Hardware-specific configurations and offloads
4040
4. **performance**: Settings that affect XLIO performance characteristics
4141
5. **applications**: Configurations and optimizations for specific applications
42-
6. **observability**: Settings for logging, statistics, and monitoring
42+
6. **monitor**: Settings for logging, statistics, and monitoring
4343

4444
## Configuration Methods
4545

@@ -55,7 +55,7 @@ Multiple configuration values can be set in a single environment variable using
5555

5656
```bash
5757
# Set multiple configuration values in one line
58-
export XLIO_INLINE_CONFIG="core.resources.memory_limit=4294967296, observability.log.file_path=/tmp/xlio.log, network.protocols.tcp.nodelay.enable=true"
58+
export XLIO_INLINE_CONFIG="core.resources.memory_limit=4294967296, monitor.log.file_path=/tmp/xlio.log, network.protocols.tcp.nodelay.enable=true"
5959
```
6060

6161
The syntax supports comma-separated key-value pairs where each key uses the dot notation of the configuration hierarchy.
@@ -119,7 +119,7 @@ export XLIO_USE_NEW_CONFIG=1
119119
The new configuration system maintains compatibility with legacy environment variables through a mapping system. Each configuration parameter in the new system can be associated with a legacy environment variable. This mapping is defined in `src/core/config/mappings.py`.
120120

121121
For example:
122-
- `observability.log.level` maps to `XLIO_TRACELEVEL`
122+
- `monitor.log.level` maps to `XLIO_TRACELEVEL`
123123
- `network.protocols.ip.mtu` maps to `XLIO_MTU`
124124
- `performance.threading.cpu_affinity` maps to `XLIO_INTERNAL_THREAD_AFFINITY`
125125

@@ -133,7 +133,7 @@ network.protocols.tcp.nodelay.enable
133133
performance.rings.tx.alloc_logic
134134
performance.buffers.tx.global_array_size
135135
applications.nginx.distribute_cq
136-
observability.stats.shmem_dir
136+
monitor.stats.shmem_dir
137137
```
138138

139139
## Dependencies
@@ -157,7 +157,7 @@ bool enable_hugepages = config->get_value<bool>("core.resources.hugepages.enable
157157
int64_t memory_limit = config->get_value<int64_t>("core.resources.memory_limit");
158158

159159
// Get a string value
160-
std::string log_file = config->get_value<std::string>("observability.log.file_path");
160+
std::string log_file = config->get_value<std::string>("monitor.log.file_path");
161161
```
162162

163163
## Migration Guide

src/core/config/descriptor_providers/xlio_config_schema.json

Lines changed: 117 additions & 123 deletions
Large diffs are not rendered by default.

src/core/config/mappings.py

Lines changed: 39 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
"core.syscall.allow_privileged_sockopt": "XLIO_ALLOW_PRIVILEGED_SOCK_OPT",
2121
"core.syscall.avoid_ctl_syscalls": "XLIO_AVOID_SYS_CALLS_ON_TCP_FD",
2222
"core.syscall.deferred_close": "XLIO_DEFERRED_CLOSE",
23-
"core.syscall.dup2_support": "XLIO_CLOSE_ON_DUP2",
23+
"core.syscall.dup2_close_fd": "XLIO_CLOSE_ON_DUP2",
2424
"core.syscall.fork_support": "XLIO_FORK",
2525
"core.syscall.getsockname_dummy_send": "XLIO_TRIGGER_DUMMY_SEND_GETSOCKNAME",
26-
"core.syscall.sendfile_limit": "XLIO_ZC_CACHE_THRESHOLD",
26+
"core.syscall.sendfile_cache_limit": "XLIO_ZC_CACHE_THRESHOLD",
2727

2828
# network section
2929
"network.multicast.mc_disable_flowtag": "XLIO_DISABLE_FLOW_TAG",
@@ -46,8 +46,8 @@
4646
"network.protocols.tcp.timer_msec": "XLIO_TCP_TIMER_RESOLUTION_MSEC",
4747
"network.protocols.tcp.timestamps": "XLIO_TCP_TIMESTAMP_OPTION",
4848
"network.protocols.tcp.wmem": "XLIO_TCP_SEND_BUFFER_SIZE",
49-
"network.protocols.udp.batch_size": "TX_BUFS_BATCH_UDP",
50-
"network.timing.ts_conversion": "XLIO_HW_TS_CONVERSION",
49+
"network.protocols.udp.buffer_batch": "TX_BUFS_BATCH_UDP",
50+
"network.timing.hw_ts_conversion": "XLIO_HW_TS_CONVERSION",
5151

5252
# hardware_features section
5353
"hardware_features.striding_rq.enable": "XLIO_STRQ",
@@ -73,55 +73,55 @@
7373
"performance.buffers.tcp_segments.socket_batch_size": "XLIO_TX_SEGS_BATCH_TCP",
7474
"performance.buffers.tx.buf_size": "XLIO_TX_BUF_SIZE",
7575
"performance.buffers.tx.global_array_size": "XLIO_TX_BUFS",
76-
"performance.buffers.tx.nonblocking_eagain": "XLIO_TX_NONBLOCKED_EAGAINS",
7776
"performance.buffers.tx.prefetch_size": "XLIO_TX_PREFETCH_BYTES",
78-
"performance.buffers.tx.tcp_batch_size": "XLIO_TX_BUFS_BATCH_TCP",
79-
"performance.buffers.work_request_elements.rx_batch_size": "XLIO_RX_WRE_BATCHING",
80-
"performance.buffers.work_request_elements.rx_global_array_size": "XLIO_RX_WRE",
77+
"performance.buffers.tx.tcp_buffer_batch": "XLIO_TX_BUFS_BATCH_TCP",
78+
"performance.buffers.work_request_elements.rx_post_batch_size": "XLIO_RX_WRE_BATCHING",
8179
"performance.buffers.work_request_elements.tx_completion_batch_size": "XLIO_TX_WRE_BATCHING",
82-
"performance.buffers.work_request_elements.tx_global_array_size": "XLIO_TX_WRE",
8380
"performance.buffers.work_request_elements.tx_max_inline_size": "XLIO_TX_MAX_INLINE",
84-
"performance.completion_queue.interrupt_moderation.interrupt_per_packet": "XLIO_INTERNAL_THREAD_ARM_CQ",
85-
"performance.completion_queue.interrupt_moderation.manual_moderation.adaptive_change_frequency_msec": "XLIO_CQ_AIM_INTERVAL_MSEC",
86-
"performance.completion_queue.interrupt_moderation.manual_moderation.adaptive_count": "XLIO_CQ_AIM_MAX_COUNT",
87-
"performance.completion_queue.interrupt_moderation.manual_moderation.adaptive_period_usec": "XLIO_CQ_AIM_MAX_PERIOD_USEC",
88-
"performance.completion_queue.interrupt_moderation.manual_moderation.enable": "XLIO_CQ_MODERATION_ENABLE",
89-
"performance.completion_queue.interrupt_moderation.manual_moderation.interrupt_per_sec": "XLIO_CQ_AIM_INTERRUPTS_RATE_PER_SEC",
90-
"performance.completion_queue.interrupt_moderation.manual_moderation.packet_count": "XLIO_CQ_MODERATION_COUNT",
91-
"performance.completion_queue.interrupt_moderation.manual_moderation.period_usec": "XLIO_CQ_MODERATION_PERIOD_USEC",
81+
"performance.completion_queue.interrupt_moderation.adaptive_change_frequency_msec": "XLIO_CQ_AIM_INTERVAL_MSEC",
82+
"performance.completion_queue.interrupt_moderation.adaptive_count": "XLIO_CQ_AIM_MAX_COUNT",
83+
"performance.completion_queue.interrupt_moderation.adaptive_interrupt_per_sec": "XLIO_CQ_AIM_INTERRUPTS_RATE_PER_SEC",
84+
"performance.completion_queue.interrupt_moderation.adaptive_period_usec": "XLIO_CQ_AIM_MAX_PERIOD_USEC",
85+
"performance.completion_queue.interrupt_moderation.enable": "XLIO_CQ_MODERATION_ENABLE",
86+
"performance.completion_queue.interrupt_moderation.packet_count": "XLIO_CQ_MODERATION_COUNT",
87+
"performance.completion_queue.interrupt_moderation.period_usec": "XLIO_CQ_MODERATION_PERIOD_USEC",
9288
"performance.completion_queue.keep_full": "XLIO_CQ_KEEP_QP_FULL",
9389
"performance.completion_queue.periodic_drain_max_cqes": "XLIO_PROGRESS_ENGINE_WCE_MAX",
9490
"performance.completion_queue.periodic_drain_msec": "XLIO_PROGRESS_ENGINE_INTERVAL",
9591
"performance.completion_queue.rx_drain_rate_nsec": "XLIO_RX_CQ_DRAIN_RATE_NSEC",
9692
"performance.completion_queue.rx_spare_buffers": "XLIO_QP_COMPENSATION_LEVEL",
9793
"performance.max_gro_streams": "XLIO_GRO_STREAMS_MAX",
94+
"performance.polling.blocking_rx_poll_usec": "XLIO_RX_POLL",
95+
"performance.polling.iomux.poll_os_force": "XLIO_SELECT_POLL_OS_FORCE",
96+
"performance.polling.iomux.poll_os_ratio": "XLIO_SELECT_POLL_OS_RATIO",
97+
"performance.polling.iomux.poll_usec": "XLIO_SELECT_POLL",
98+
"performance.polling.iomux.skip_os": "XLIO_SELECT_SKIP_OS",
9899
"performance.polling.kernel_fd_attention_level": "XLIO_RING_KERNEL_FD_ATTENTION_LEVEL",
100+
"performance.polling.max_rx_poll_batch": "XLIO_CQ_POLL_BATCH_MAX",
101+
"performance.polling.nonblocking_eagain": "XLIO_TX_NONBLOCKED_EAGAINS",
99102
"performance.polling.offload_transition_poll_count": "XLIO_RX_POLL_INIT",
100-
"performance.polling.rx_buffer_max_count": "XLIO_CQ_POLL_BATCH_MAX",
101103
"performance.polling.rx_cq_wait_ctrl": "XLIO_RX_CQ_WAIT_CTRL",
102-
"performance.polling.rx_duration_usec": "XLIO_RX_POLL",
103104
"performance.polling.rx_kernel_fd_attention_level": "XLIO_RX_UDP_POLL_OS_RATIO",
104-
"performance.polling.rx_poll_on_tx": "XLIO_RX_POLL_ON_TX_TCP",
105-
"performance.polling.select.poll_os_force": "XLIO_SELECT_POLL_OS_FORCE",
106-
"performance.polling.select.poll_os_ratio": "XLIO_SELECT_POLL_OS_RATIO",
107-
"performance.polling.select.poll_usec": "XLIO_SELECT_POLL",
108-
"performance.polling.select.skip_os": "XLIO_SELECT_SKIP_OS",
105+
"performance.polling.rx_poll_on_tx_tcp": "XLIO_RX_POLL_ON_TX_TCP",
109106
"performance.polling.skip_cq_on_rx": "XLIO_SKIP_POLL_IN_RX",
110107
"performance.polling.yield_on_poll": "XLIO_RX_POLL_YIELD",
111108
"performance.rings.max_per_interface": "XLIO_RING_LIMIT_PER_INTERFACE",
112109
"performance.rings.rx.allocation_logic": "XLIO_RING_ALLOCATION_LOGIC_RX",
113110
"performance.rings.rx.migration_ratio": "XLIO_RING_MIGRATION_RATIO_RX",
111+
"performance.rings.rx.ring_elements_count": "XLIO_RX_WRE",
114112
"performance.rings.tx.allocation_logic": "XLIO_RING_ALLOCATION_LOGIC_TX",
115113
"performance.rings.tx.max_on_device_memory": "XLIO_RING_DEV_MEM_TX",
116114
"performance.rings.tx.migration_ratio": "XLIO_RING_MIGRATION_RATIO_TX",
115+
"performance.rings.tx.ring_elements_count": "XLIO_TX_WRE",
117116
"performance.steering_rules.tcp.2t_rules": "XLIO_TCP_2T_RULES",
118117
"performance.steering_rules.tcp.3t_rules": "XLIO_TCP_3T_RULES",
119118
"performance.steering_rules.udp.3t_rules": "XLIO_UDP_3T_RULES",
120119
"performance.steering_rules.udp.only_mc_l2_rules": "XLIO_ETH_MC_L2_ONLY_RULES",
121120
"performance.threading.cpu_affinity": "XLIO_INTERNAL_THREAD_AFFINITY",
122121
"performance.threading.cpuset": "XLIO_INTERNAL_THREAD_CPUSET",
123-
"performance.threading.handlers.behavior": "XLIO_TCP_CTL_THREAD",
124-
"performance.threading.handlers.timer_msec": "XLIO_TIMER_RESOLUTION_MSEC",
122+
"performance.threading.internal_handler.behavior": "XLIO_TCP_CTL_THREAD",
123+
"performance.threading.internal_handler.timer_msec": "XLIO_TIMER_RESOLUTION_MSEC",
124+
"performance.threading.internal_handler.wakeup_per_packet": "XLIO_INTERNAL_THREAD_ARM_CQ",
125125
"performance.threading.mutex_over_spinlock": "XLIO_MULTILOCK",
126126

127127
# applications section
@@ -130,26 +130,28 @@
130130
"applications.nginx.udp_pool_size": "XLIO_NGINX_UDP_POOL_SIZE",
131131
"applications.nginx.udp_socket_pool_reuse": "XLIO_NGINX_UDP_POOL_RX_NUM_BUFFS_REUSE",
132132
"applications.nginx.workers_num": "XLIO_NGINX_WORKERS_NUM",
133-
"applications.profiles.spec": "XLIO_SPEC",
134133

135134
# acceleration_control section
136135
"acceleration_control.app_id": "XLIO_APPLICATION_ID",
137136
"acceleration_control.default_acceleration": "XLIO_OFFLOADED_SOCKETS",
138137

139-
# observability section
140-
"observability.exit_report": "XLIO_PRINT_REPORT",
141-
"observability.log.colors": "XLIO_LOG_COLORS",
142-
"observability.log.details": "XLIO_LOG_DETAILS",
143-
"observability.log.file_path": "XLIO_LOG_FILE",
144-
"observability.log.level": "XLIO_TRACELEVEL",
145-
"observability.stats.cpu_usage": "XLIO_CPU_USAGE_STATS",
146-
"observability.stats.fd_num": "XLIO_STATS_FD_NUM",
147-
"observability.stats.file_path": "XLIO_STATS_FILE",
148-
"observability.stats.shmem_dir": "XLIO_STATS_SHMEM_DIR",
138+
# monitor section
139+
"monitor.exit_report": "XLIO_PRINT_REPORT",
140+
"monitor.log.colors": "XLIO_LOG_COLORS",
141+
"monitor.log.details": "XLIO_LOG_DETAILS",
142+
"monitor.log.file_path": "XLIO_LOG_FILE",
143+
"monitor.log.level": "XLIO_TRACELEVEL",
144+
"monitor.stats.cpu_usage": "XLIO_CPU_USAGE_STATS",
145+
"monitor.stats.fd_num": "XLIO_STATS_FD_NUM",
146+
"monitor.stats.file_path": "XLIO_STATS_FILE",
147+
"monitor.stats.shmem_dir": "XLIO_STATS_SHMEM_DIR",
149148

150149
# extra_api section
151150
"extra_api.hugepage_size": "XLIO_USER_HUGE_PAGE_SIZE",
152151
"extra_api.socketextreme": "XLIO_SOCKETEXTREME",
152+
153+
# profiles section
154+
"profiles.spec": "XLIO_SPEC",
153155

154156
}
155157

0 commit comments

Comments
 (0)