Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\dim\net_dim.c Create Date:2022-07-28 07:19:40
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:net_dim_decision

Proto:static bool net_dim_decision(struct dim_stats *curr_stats, struct dim *dim)

Type:bool

Parameter:

TypeParameterName
struct dim_stats *curr_stats
struct dim *dim
167  prev_state = tune_state
168  prev_ix = profile_ix
173  Case tune_state == DIM_PARKING_ON_TOP
174  stats_res = net_dim_stats_compare(curr_stats, & prev_stats)
176  If stats_res != DIM_STATS_SAME Then net_dim_exit_parking(dim)
178  Break
180  Case tune_state == DIM_PARKING_TIRED
181  tired--
182  If Not tired Then net_dim_exit_parking(dim)
184  Break
186  Case tune_state == DIM_GOING_RIGHT
187  Case tune_state == DIM_GOING_LEFT
188  stats_res = net_dim_stats_compare(curr_stats, & prev_stats)
190  If stats_res != DIM_STATS_BETTER Then dim_turn(dim)
195  Break
198  step_res = net_dim_step(dim)
200  Case step_res == DIM_ON_EDGE
202  Break
203  Case step_res == DIM_TOO_TIRED
205  Break
208  Break
211  If prev_state != DIM_PARKING_ON_TOP || tune_state != DIM_PARKING_ON_TOP Then prev_stats = curr_stats
215  Return profile_ix != prev_ix
Caller
NameDescribe
net_dim