Re: [PATCH for-next] RDMA/hns: Support congestion control algorithm parameter configuration

Leon Romanovsky
2024-03-12T08:05:27Z

On Mon, Mar 11, 2024 at 10:00:27PM +0800, Junxian Huang wrote:
>
>
> On 2024/3/11 15:11, Leon Romanovsky wrote:
> > On Mon, Mar 11, 2024 at 10:00:51AM +0800, Junxian Huang wrote:
> >>
> >>
> >> On 2024/3/10 18:00, Leon Romanovsky wrote:
> >>> On Fri, Mar 08, 2024 at 06:54:43PM +0800, Junxian Huang wrote:
> >>>> From: Chengchang Tang <tangchengchang@huawei.com>
> >>>>
> >>>> hns RoCE supports 4 congestion control algorithms. Each algorihm
> >>>> involves multiple parameters. Add port sysfs directory for each
> >>>> algorithm to allow modifying their parameters.
> >>>
> >>> Unless Jason changed his position after this rewrite [1], we don't allow
> >>> any custom driver sysfs code.
> >>>
> >>> [1] https://lore.kernel.org/all/cover.1623427137.git.leonro@nvidia.com/
> >>>
> >>
> >> I didn't quite get the reason from [1], could you please explain it?
> >
> > Before [1], we didn't allow custom sysfs. After [1], the sysfs code
> > started to be more sane and usable for the drivers. However, it is
> > unlikely that the policy is changed to allow driver sysfs code.
> >
> >>
> >> And it would be helpful if you could give us a hint about any other
> >> proper ways to do the algorithm parameter configuration.
> >
> > Like any other FW internals.
> >
>
> If we add the capability of custom driver parameter configuration to
> rdmatool (similar to [2]), would it be acceptable?

Moshe's patch is for devlink. We are working on a generic solution for
other vendors to control/debug their devices.
https://lwn.net/Articles/955001/
https://lore.kernel.org/all/20240304160237.GA2909161@nvidia.com/

Feel free to join the discussion and reply that you are interested in
this proposal as well and emphasize that your device is not netdev at
all.

Thanks

>
> [2] https://patchwork.ozlabs.org/project/netdev/patch/1530703837-24563-4-git-send-email-moshe@mellanox.com/
>
> Junxian
>
> > Thanks
> >
> >>
> >> Thanks,
> >> Junxian
> >>
> >>>>
> >>>> Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
> >>>> Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
> >>>> ---
> >>>> drivers/infiniband/hw/hns/Makefile | 2 +-
> >>>> drivers/infiniband/hw/hns/hns_roce_device.h | 20 ++
> >>>> drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 59 ++++
> >>>> drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 132 ++++++++
> >>>> drivers/infiniband/hw/hns/hns_roce_main.c | 3 +
> >>>> drivers/infiniband/hw/hns/hns_roce_sysfs.c | 346 ++++++++++++++++++++
> >>>> 6 files changed, 561 insertions(+), 1 deletion(-)
> >>>> create mode 100644 drivers/infiniband/hw/hns/hns_roce_sysfs.c
> >>>
> >>> Thanks
> >>