/* * Net DIM profiles: * There are different set of profiles for each CQ period mode. * There are different set of profiles for RX/TX CQs. * Each profile size must be of NET_DIM_PARAMS_NUM_PROFILES
*/ #define NET_DIM_RX_EQE_PROFILES { \
{.usec = 1, .pkts = NET_DIM_DEFAULT_RX_CQ_PKTS_FROM_EQE,}, \
{.usec = 8, .pkts = NET_DIM_DEFAULT_RX_CQ_PKTS_FROM_EQE,}, \
{.usec = 64, .pkts = NET_DIM_DEFAULT_RX_CQ_PKTS_FROM_EQE,}, \
{.usec = 128, .pkts = NET_DIM_DEFAULT_RX_CQ_PKTS_FROM_EQE,}, \
{.usec = 256, .pkts = NET_DIM_DEFAULT_RX_CQ_PKTS_FROM_EQE,} \
}
staticbool net_dim_decision(struct dim_stats *curr_stats, struct dim *dim)
{ int prev_state = dim->tune_state; int prev_ix = dim->profile_ix; int stats_res; int step_res;
switch (dim->tune_state) { case DIM_PARKING_ON_TOP:
stats_res = net_dim_stats_compare(curr_stats,
&dim->prev_stats); if (stats_res != DIM_STATS_SAME)
net_dim_exit_parking(dim); break;
case DIM_PARKING_TIRED:
dim->tired--; if (!dim->tired)
net_dim_exit_parking(dim); break;
case DIM_GOING_RIGHT: case DIM_GOING_LEFT:
stats_res = net_dim_stats_compare(curr_stats,
&dim->prev_stats); if (stats_res != DIM_STATS_BETTER)
dim_turn(dim);
if (dim_on_top(dim)) {
dim_park_on_top(dim); break;
}
step_res = net_dim_step(dim); switch (step_res) { case DIM_ON_EDGE:
dim_park_on_top(dim); break; case DIM_TOO_TIRED:
dim_park_tired(dim); break;
}
switch (dim->state) { case DIM_MEASURE_IN_PROGRESS:
nevents = BIT_GAP(BITS_PER_TYPE(u16),
end_sample->event_ctr,
dim->start_sample.event_ctr); if (nevents < DIM_NEVENTS) break; if (!dim_calc_stats(&dim->start_sample, end_sample, &curr_stats)) break; if (net_dim_decision(&curr_stats, dim)) {
dim->state = DIM_APPLY_NEW_PROFILE;
schedule_work(&dim->work); break;
}
fallthrough; case DIM_START_MEASURE:
dim_update_sample(end_sample->event_ctr, end_sample->pkt_ctr,
end_sample->byte_ctr, &dim->start_sample);
dim->state = DIM_MEASURE_IN_PROGRESS; break; case DIM_APPLY_NEW_PROFILE: break;
}
}
EXPORT_SYMBOL(net_dim);
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.9Bemerkung:
(vorverarbeitet am 2026-06-08)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.