HomeFreeBSD

ibcore: Fix unable to change lifespan entry for hw_counters.

Description

ibcore: Fix unable to change lifespan entry for hw_counters.

This patch fixes the case where 'lifespan' entry of the hw_counters
is not writable. Currently write callback is not exposed for for
the hw_counters sysfs operation. Due to this, modifying lifespan
value results into permission denied error in below example.

echo 10 > /sys/class/infiniband/mlx5_0/ports/1/hw_counters/lifespan
-bash: /sys/class/infiniband/mlx5_0/ports/1/hw_counters/lifespan:
Permission denied

This patch adds the hook to modify any attribute which implements
store() operation.

Linux commit:
79c4d80b43b8e43684894574a508a871f0c196bf

Reviewed by: kib
Sponsored by: Mellanox Technologies // NVIDIA Networking

(cherry picked from commit d7d833e20ba33f5b9f3052a534af7ecdd602f152)

Details

Provenance
hselaskyAuthored on Jun 16 2021, 1:01 PM
Parents
rG06307dd6e0df: ibcore: Issue DREQ when receiving REQ/REP for stale QP.
Branches
Unknown
Tags
Unknown