Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:dim_calc_stats

Proto:void dim_calc_stats(struct dim_sample *start, struct dim_sample *end, struct dim_stats *curr_stats)

Type:void

Parameter:

TypeParameterName
struct dim_sample *start
struct dim_sample *end
struct dim_stats *curr_stats
61  delta_us = ktime_us_delta(time, time)
62  npkts = Calculate the gap between two values.* Take wrap-around and variable size into consideration.(BITS_PER_TYPE(u32), pkt_ctr, pkt_ctr)
63  nbytes = Calculate the gap between two values.* Take wrap-around and variable size into consideration.(BITS_PER_TYPE(u32), byte_ctr, byte_ctr)
65  ncomps = Calculate the gap between two values.* Take wrap-around and variable size into consideration.(BITS_PER_TYPE(u32), comp_ctr, comp_ctr)
68  If Not delta_us Then Return
71  packets per msec = DIV_ROUND_UP(npkts * USEC_PER_MSEC, delta_us)
72  ytes per msec = DIV_ROUND_UP(nbytes * USEC_PER_MSEC, delta_us)
73  vents per msec = DIV_ROUND_UP(Number of events between DIM iterations.* Causes a moderation of the algorithm run. * USEC_PER_MSEC, delta_us)
75  completions per msec = DIV_ROUND_UP(ncomps * USEC_PER_MSEC, delta_us)
76  If vents per msec != 0 Then atio of completions to events = DIV_ROUND_DOWN_ULL(completions per msec * 100, vents per msec )
79  Else atio of completions to events = 0
Caller
NameDescribe
net_dim
rdma_dim