Lines Matching +full:current +full:- +full:mode
1 /* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
24 ((ref) && (((100UL * abs((val) - (ref))) / (ref)) > 10))
28 * Take wrap-around and variable size into consideration.
30 #define BIT_GAP(bits, end, start) ((((end) - (start)) + BIT_ULL(bits)) \
31 & (BIT_ULL(bits) - 1))
34 * struct dim_cq_moder - Structure for CQ moderation values.
40 * @cq_period_mode: CQ period count mode (from CQE/EQE)
50 * struct dim_sample - Structure for DIM sample data.
57 * @comp_ctr: Current completion counter
68 * struct dim_stats - Structure for DIM stats.
69 * Used for holding current measured rates.
86 * struct dim - Main structure for dynamic interrupt moderation (DIM).
91 * @start_sample: Sampled data at start of current iteration
92 * @measuring_sample: A &dim_sample that is used to update the current events
95 * @profile_ix: Current moderation profile
96 * @mode: CQ period count mode
110 u8 mode; member
118 * enum dim_cq_period_mode - Modes for CQ period count
131 * enum dim_state - DIM algorithm states
136 * @DIM_MEASURE_IN_PROGRESS: Algorithm is already in progress - check if
138 * @DIM_APPLY_NEW_PROFILE: DIM consumer is currently applying a profile - no need to measure
147 * enum dim_tune_state - DIM algorithm tune states
151 * @DIM_PARKING_ON_TOP: Algorithm found a local top point - exit on significant difference
152 * @DIM_PARKING_TIRED: Algorithm found a deep top point - don't exit if tired > 0
164 * enum dim_stats_state - DIM algorithm statistics states
166 * These will determine the verdict of current iteration.
168 * @DIM_STATS_WORSE: Current iteration shows worse performance than before
169 * @DIM_STATS_SAME: Current iteration shows same performance than before
170 * @DIM_STATS_BETTER: Current iteration shows better performance than before
179 * enum dim_step_result - DIM algorithm step results
184 * @DIM_TOO_TIRED: Same kind of step was done multiple times - should go to
195 * dim_on_top - check if current state is a good place to stop (top location)
198 * Check if current profile is a good place to park at.
205 * dim_turn - change profile altering direction
208 * Go left if we were going right and vice-versa.
214 * dim_park_on_top - enter a parking state on a top location
223 * dim_park_tired - enter a tired parking state
232 * dim_calc_stats - calculate the difference between two samples
238 * Takes into consideration counter wrap-around.
244 * dim_update_sample - set a sample's fields with given values
253 s->time = ktime_get(); in dim_update_sample()
254 s->pkt_ctr = packets; in dim_update_sample()
255 s->byte_ctr = bytes; in dim_update_sample()
256 s->event_ctr = event_ctr; in dim_update_sample()
260 * dim_update_sample_with_comps - set a sample's fields with given
273 s->comp_ctr = comps; in dim_update_sample_with_comps()
279 * net_dim_get_rx_moderation - provide a CQ moderation object for the given RX profile
280 * @cq_period_mode: CQ period mode
286 * net_dim_get_def_rx_moderation - provide the default RX moderation
287 * @cq_period_mode: CQ period mode
292 * net_dim_get_tx_moderation - provide a CQ moderation object for the given TX profile
293 * @cq_period_mode: CQ period mode
299 * net_dim_get_def_tx_moderation - provide the default TX moderation
300 * @cq_period_mode: CQ period mode
305 * net_dim - main DIM algorithm entry point
307 * @end_sample: Current data measurement
325 * rdma_dim - Runs the adaptive moderation.