public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Rohit Sajan Kumar <rohit.sajan.kumar@oracle.com>
Cc: "matanb@mellanox.com" <matanb@mellanox.com>,
	"dledford@redhat.com" <dledford@redhat.com>,
	"sean.hefty@intel.com" <sean.hefty@intel.com>,
	"hal.rosenstock@gmail.com" <hal.rosenstock@gmail.com>,
	Manjunath Patil <manjunath.b.patil@oracle.com>,
	Rama Nichanamatlu <rama.nichanamatlu@oracle.com>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] net/mlx5: Add sysfs entry for vhca to /sys/class/infiniband/mlx5
Date: Sat, 14 May 2022 08:09:28 +0300	[thread overview]
Message-ID: <Yn85iFNS96yO2ISD@unreal> (raw)
In-Reply-To: <BYAPR10MB2997DF974EF3631A2E69CA3CDCCA9@BYAPR10MB2997.namprd10.prod.outlook.com>

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@oracle.com>
> Sent: Monday, May 9, 2022 4:00 PM
> To: matanb@mellanox.com <matanb@mellanox.com>; leonro@mellanox.com <leonro@mellanox.com>; dledford@redhat.com <dledford@redhat.com>; sean.hefty@intel.com <sean.hefty@intel.com>; hal.rosenstock@gmail.com <hal.rosenstock@gmail.com>; Rohit Sajan Kumar <rohit.sajan.kumar@oracle.com>; Manjunath Patil <manjunath.b.patil@oracle.com>; Rama Nichanamatlu <rama.nichanamatlu@oracle.com>
> Cc: linux-rdma@vger.kernel.org <linux-rdma@vger.kernel.org>; linux-kernel@vger.kernel.org <linux-kernel@vger.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@oracle.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
> 

       reply	other threads:[~2022-05-14  5:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1652137257-5614-1-git-send-email-rohit.sajan.kumar@oracle.com>
     [not found] ` <BYAPR10MB2997DF974EF3631A2E69CA3CDCCA9@BYAPR10MB2997.namprd10.prod.outlook.com>
2022-05-14  5:09   ` Leon Romanovsky [this message]
2022-05-15  7:36     ` [PATCH] net/mlx5: Add sysfs entry for vhca to /sys/class/infiniband/mlx5 Mark Bloch
2022-05-18  4:49       ` Leon Romanovsky
2022-05-18  8:39         ` Mark Bloch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Yn85iFNS96yO2ISD@unreal \
    --to=leon@kernel.org \
    --cc=dledford@redhat.com \
    --cc=hal.rosenstock@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=manjunath.b.patil@oracle.com \
    --cc=matanb@mellanox.com \
    --cc=rama.nichanamatlu@oracle.com \
    --cc=rohit.sajan.kumar@oracle.com \
    --cc=sean.hefty@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox