Lines Matching +full:steps +full:- +full:per +full:- +full:period

1 /* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
15 /* Number of DIM profiles and period mode. */
33 ((ref) && (((100UL * abs((val) - (ref))) / (ref)) > 10))
37 * Take wrap-around and variable size into consideration.
39 #define BIT_GAP(bits, end, start) ((((end) - (start)) + BIT_ULL(bits)) \
40 & (BIT_ULL(bits) - 1))
43 * struct dim_cq_moder - Structure for CQ moderation values.
49 * @cq_period_mode: CQ period count mode (from CQE/EQE)
68 * struct dim_irq_moder - Structure for irq moderation information.
73 * @dim_rx_mode: Rx DIM period count mode: CQE or EQE
74 * @dim_tx_mode: Tx DIM period count mode: CQE or EQE
92 * struct dim_sample - Structure for DIM sample data.
110 * struct dim_stats - Structure for DIM stats.
113 * @ppms: Packets per msec
114 * @bpms: Bytes per msec
115 * @epms: Events per msec
116 * @cpms: Completions per msec
120 int ppms; /* packets per msec */
121 int bpms; /* bytes per msec */
122 int epms; /* events per msec */
123 int cpms; /* completions per msec */
128 * struct dim - Main structure for dynamic interrupt moderation (DIM).
138 * @mode: CQ period count mode
140 * @steps_right: Number of steps taken towards higher moderation
141 * @steps_left: Number of steps taken towards lower moderation
160 * enum dim_cq_period_mode - Modes for CQ period count
173 * enum dim_state - DIM algorithm states
178 * @DIM_MEASURE_IN_PROGRESS: Algorithm is already in progress - check if
180 * @DIM_APPLY_NEW_PROFILE: DIM consumer is currently applying a profile - no need to measure
189 * enum dim_tune_state - DIM algorithm tune states
193 * @DIM_PARKING_ON_TOP: Algorithm found a local top point - exit on significant difference
194 * @DIM_PARKING_TIRED: Algorithm found a deep top point - don't exit if tired > 0
206 * enum dim_stats_state - DIM algorithm statistics states
221 * enum dim_step_result - DIM algorithm step results
226 * @DIM_TOO_TIRED: Same kind of step was done multiple times - should go to
237 * net_dim_init_irq_moder - collect information to initialize irq moderation
241 * @rx_mode: CQ period mode for Rx
242 * @tx_mode: CQ period mode for Tx
254 * net_dim_free_irq_moder - free fields for irq moderation
260 * net_dim_setting - initialize DIM's cq mode and schedule worker
268 * net_dim_work_cancel - synchronously cancel dim's worker
274 * net_dim_get_rx_irq_moder - get DIM rx results based on profile_ix
284 * net_dim_get_tx_irq_moder - get DIM tx results based on profile_ix
294 * net_dim_set_rx_mode - set DIM rx cq mode
301 * net_dim_set_tx_mode - set DIM tx cq mode
308 * dim_on_top - check if current state is a good place to stop (top location)
318 * dim_turn - change profile altering direction
321 * Go left if we were going right and vice-versa.
327 * dim_park_on_top - enter a parking state on a top location
336 * dim_park_tired - enter a tired parking state
345 * dim_calc_stats - calculate the difference between two samples
351 * Takes into consideration counter wrap-around.
359 * dim_update_sample - set a sample's fields with given values
368 s->time = ktime_get(); in dim_update_sample()
369 s->pkt_ctr = packets; in dim_update_sample()
370 s->byte_ctr = bytes; in dim_update_sample()
371 s->event_ctr = event_ctr; in dim_update_sample()
375 * dim_update_sample_with_comps - set a sample's fields with given
388 s->comp_ctr = comps; in dim_update_sample_with_comps()
394 * net_dim_get_rx_moderation - provide a CQ moderation object for the given RX profile
395 * @cq_period_mode: CQ period mode
401 * net_dim_get_def_rx_moderation - provide the default RX moderation
402 * @cq_period_mode: CQ period mode
407 * net_dim_get_tx_moderation - provide a CQ moderation object for the given TX profile
408 * @cq_period_mode: CQ period mode
414 * net_dim_get_def_tx_moderation - provide the default TX moderation
415 * @cq_period_mode: CQ period mode
420 * net_dim - main DIM algorithm entry point
440 * rdma_dim - Runs the adaptive moderation.