Re: [PATCH net-next v8 6/9] devlink: Allow to change priv in devlink-rate from parent_set callbacks
From: Jiri Pirko <jiri@resnulli.us>
Date: 2022-10-31 12:23:03
From: Jiri Pirko <jiri@resnulli.us>
Date: 2022-10-31 12:23:03
Fri, Oct 28, 2022 at 12:51:40PM CEST, michal.wilczynski@intel.com wrote:
From driver perspective it doesn't make any sense to make any changes to the internal HQoS tree if the created node doesn't have a parent. So a node created without any parent doesn't have to be initialized in the driver. Allow for such scenario by allowing to modify priv in parent_set callbacks. Change priv parameter to double pointer, to allow for setting priv during the parent set phase.
I fail to understand the reason for this patch, but anyway, it looks very hacky. The priv is something the leaf/node is created with. Changing it from the callback awfully smells like wrong design. Please don't do that.