Re: missing counter values in sysfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/03/18 01:53, Parav Pandit wrote:
Currently rxe driver choose to not implement counters and therefore
N/A (no PMA) error is returned. I do not know why it is done that
way. I personally think, right thing to do is, to return error code
EINVAL or EOPNOTSUPP to indicate it is not supported. That makes user
aware of the error. Additionally when provider driver such as rxe
doesn’t implement them, counters directory shouldn't even appear.

This covers both the parts of genuine error on supported HCA and not
supported provider (Rxe).

I agree with the above and tested your patch. It properly hides the
counters directory for rxe and my stats collector is happy - it sees
that there is a live IB device, but since it has no metrics they are
just ignored. :)

From e194e28cf657dc079950d2953ec33371d5c251fa Mon Sep 17 00:00:00 2001
From: Parav Pandit <parav@xxxxxxxxxxxx>
Date: Sun, 2 Sep 2018 18:45:20 -0500
Subject: [PATCH] RDMA/core: Do not expose unsupported counters

If the provider driver doesn't support pma counters, avoid exposing its
directory.
If fails to read the PMA counter, return an error so that user can retry
later.

Fixes: 35c4cbb17811 ("IB/core: Create get_perf_mad function in sysfs.c")

Signed-off-by: Parav Pandit <parav@xxxxxxxxxxxx>

Reported-by: Holger Hoffstätte <holger@xxxxxxxxxxxxxxxxxxxxxx>
Tested-by: Holger Hoffstätte <holger@xxxxxxxxxxxxxxxxxxxxxx>

Thanks for the quick help! :)

cheers,
Holger



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux