Re: [PATCH net-next] net/mlx5: remove the recent devlink params
From: Saeed Mahameed <saeedm@nvidia.com>
Date: 2021-10-26 19:11:30
On Tue, 2021-10-26 at 09:47 -0700, Jakub Kicinski wrote:
On Tue, 26 Oct 2021 15:53:17 +0000 Parav Pandit wrote:quoted
Hi Jakub,quoted
From: Jakub Kicinski <kuba@kernel.org> Sent: Tuesday, October 26, 2021 9:00 PM To: davem@davemloft.net Cc: Saeed Mahameed <saeedm@nvidia.com>; netdev@vger.kernel.org; Leon Romanovsky [off-list ref]; Jakub Kicinski [off-list ref] Subject: [PATCH net-next] net/mlx5: remove the recent devlink params revert commit 46ae40b94d88 ("net/mlx5: Let user configure io_eq_size param") revert commit a6cb08daa3b4 ("net/mlx5: Let user configure event_eq_size param") revert commit 554604061979 ("net/mlx5: Let user configure max_macs param") The EQE parameters are applicable to more drivers, they should be configured via standard API, probably ethtool. Example of another driver needing something similar:ethool is not a good choice for following reasons. 1. EQs of the mlx5 core devlink instance is used by multiple auxiliary devices, namely net, rdma, vdpa. 2. And sometime netdevice doesn't even exists to operate via ethtool (but devlink instance exist to serve other devices). 3. ethtool doesn't have notion set the config and apply (like devlink reload) Such reload operation is useful when user wants to configure more than one parameter and initialize the device only once. Otherwise dynamically changing parameter results in multiple device re-init sequence that increases device setup time.Sure these are good points. OTOH devlink doesn't have any notion of queues, IRQ vectors etc today so it doesn't really fit there, either.
The point is, mlx5 has different architecture compared to other vendors, EQs, IRQs are considered shared resources of upper layer protocols/interfaces. ethtool is netdev specific. EQ concept might not apply to all vendors even with last gen HW. netdev/ethtool shouldn't be controlling concrete/arch specific resources. better if we kept ethtool abstract (queues, rings, and ethernet specific ..)
quoted
Should we define the devlink resources in the devlink layer, instead of driver?I'm not sure how the EQE fits into the existing devlink objects. params are not much of an API, it's a garbage bag.
devlink is good place, it is what we decide it should be, a garbage bag or a standard place for all generic networking device related knobs.
quoted
So that multiple drivers can make use of them without redefinition?Yes, please.
let's send a RFC, CC Jiri of course and other vendors who might be interested according to Jakub's grep (huawei/hinic, ibm/ehea, microsoft/mana, qlogic/qed) ..