lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <Yn85iFNS96yO2ISD@unreal>
Date:   Sat, 14 May 2022 08:09:28 +0300
From:   Leon Romanovsky <leon@...nel.org>
To:     Rohit Sajan Kumar <rohit.sajan.kumar@...cle.com>
Cc:     "matanb@...lanox.com" <matanb@...lanox.com>,
        "dledford@...hat.com" <dledford@...hat.com>,
        "sean.hefty@...el.com" <sean.hefty@...el.com>,
        "hal.rosenstock@...il.com" <hal.rosenstock@...il.com>,
        Manjunath Patil <manjunath.b.patil@...cle.com>,
        Rama Nichanamatlu <rama.nichanamatlu@...cle.com>,
        "linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] net/mlx5: Add sysfs entry for vhca to
 /sys/class/infiniband/mlx5

On Fri, May 13, 2022 at 05:46:16PM +0000, Rohit Sajan Kumar wrote:
> Hey,
> 
> Sending this as a gentle reminder to review the patch sent earlier this week which can be found in this email chain.

Patches that sent in HTML format, to wrong addresses and not visible
in patchworks/ML, without target net-next/rdma-next/e.t.c., with wrong
title are generally ignored.

Why vhca_id that returned from MLX5_IB_METHOD_QUERY_PORT is not enough?

Anyway, sysfs file in IB driver for the property of mlx5_core is no-go.

Thanks

> 
> Thank you.
> 
> Best,
> Rohit.
> ________________________________
> From: Rohit Nair <rohit.sajan.kumar@...cle.com>
> Sent: Monday, May 9, 2022 4:00 PM
> To: matanb@...lanox.com <matanb@...lanox.com>; leonro@...lanox.com <leonro@...lanox.com>; dledford@...hat.com <dledford@...hat.com>; sean.hefty@...el.com <sean.hefty@...el.com>; hal.rosenstock@...il.com <hal.rosenstock@...il.com>; Rohit Sajan Kumar <rohit.sajan.kumar@...cle.com>; Manjunath Patil <manjunath.b.patil@...cle.com>; Rama Nichanamatlu <rama.nichanamatlu@...cle.com>
> Cc: linux-rdma@...r.kernel.org <linux-rdma@...r.kernel.org>; linux-kernel@...r.kernel.org <linux-kernel@...r.kernel.org>
> Subject: [PATCH] net/mlx5: Add sysfs entry for vhca to /sys/class/infiniband/mlx5
> 
> While collecting diagnostic information (Ex:wqdump) in virtual
> environment, we need vhca id to collect data belonging a particular VF.
> This patch adds a sysfs entry to show the vhca id inside guest.
> 
> Signed-off-by: Rohit Nair <rohit.sajan.kumar@...cle.com>
> ---
>  drivers/infiniband/hw/mlx5/main.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
> index 32a0ea8..dd935bc 100644
> --- a/drivers/infiniband/hw/mlx5/main.c
> +++ b/drivers/infiniband/hw/mlx5/main.c
> @@ -2499,12 +2499,24 @@ static ssize_t board_id_show(struct device *device,
>  }
>  static DEVICE_ATTR_RO(board_id);
> 
> +static ssize_t vhca_id_show(struct device *device,
> +                           struct device_attribute *attr, char *buf)
> +{
> +       struct mlx5_ib_dev *dev =
> +               container_of(device, struct mlx5_ib_dev, ib_dev.dev);
> +       return sysfs_emit(buf, "%d [0x%x]\n",
> +                      MLX5_CAP_GEN(dev->mdev, vhca_id),
> +                      MLX5_CAP_GEN(dev->mdev, vhca_id));
> +}
> +static DEVICE_ATTR_RO(vhca_id);
> +
>  static struct attribute *mlx5_class_attributes[] = {
>          &dev_attr_hw_rev.attr,
>          &dev_attr_hca_type.attr,
>          &dev_attr_board_id.attr,
>          &dev_attr_fw_pages.attr,
>          &dev_attr_reg_pages.attr,
> +       &dev_attr_vhca_id.attr,
>          NULL,
>  };
> 
> --
> 1.8.3.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ