Subject: Re: [PATCH net-next 2/2] nfp: customize the dim profiles

From: Jiri Pirko <[email-masked]>
Date: Thu, 1 Feb 2024 08:42:57 +0100

Thu, Feb 01, 2024 at 03:16:50AM CET, [email-masked] wrote:
>On Wednesday, January 31, 2024 5:39 PM, Jiri Pirko wrote:
><...>
>> It looks incorrect to hardcode it like this. There is a reason this is
>> abstracted out in lib/dim/net_dim.c to avoid exactly this. Can't you
>> perhaps introduce your modified profile there and keep using
>> net_dim_get_[tr]x_moderation() helpers?
>> 
>
>We don't know if this introduced profile is adaptable to other NICs/vendors,
>it's generated based on NFP's performance. Do you really think it's
>appropriate to move it to the net_dim.c as a new common profile like:
>enum dim_cq_period_mode {
>        DIM_CQ_PERIOD_MODE_START_FROM_EQE = 0x0,
>        DIM_CQ_PERIOD_MODE_START_FROM_CQE = 0x1,
>+       DIM_CQ_PERIOD_MODE_SPECIFIC_0 = 0x2,

Maybe. Can't think of anything better atm. Maybe others would have some
ideas.

>        DIM_CQ_PERIOD_NUM_MODES
> };