Re: [PATCH net-next 2/2] nfp: customize the dim profiles
From: Jiri Pirko <jiri@resnulli.us>
Date: 2024-02-01 07:43:01
From: Jiri Pirko <jiri@resnulli.us>
Date: 2024-02-01 07:43:01
Thu, Feb 01, 2024 at 03:16:50AM CET, yinjun.zhang@corigine.com wrote:
On Wednesday, January 31, 2024 5:39 PM, Jiri Pirko wrote: <...>quoted
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 };