Re: [for-next V2 08/10] linux/dim: Implement rdma_dim

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/26/2019 1:02 AM, Sagi Grimberg wrote:
>
>> +void rdma_dim(struct dim *dim, u64 completions)
>> +{
>> +    struct dim_sample *curr_sample = &dim->measuring_sample;
>> +    struct dim_stats curr_stats;
>> +    u32 nevents;
>> +
>> +    dim_update_sample_with_comps(curr_sample->event_ctr + 1,
>> +                     curr_sample->pkt_ctr,
>> +                     curr_sample->byte_ctr,
>> +                     curr_sample->comp_ctr + completions,
>> +                     &dim->measuring_sample);
>
> If this is the only caller, why add pkt_ctr and byte_ctr at all?


We wanted to keep the API general enough that if someone wants to 
implement a different algorithm using the dim library they will be able 
to use all the possible statistics. I agree though that in the rdma_dim 
function there is no point in making it seem like they are relevant 
parameters.





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux