summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/mlx5/mlx5_ib.h
diff options
context:
space:
mode:
authorParav Pandit <parav@nvidia.com>2021-02-03 16:01:32 +0300
committerJason Gunthorpe <jgg@nvidia.com>2021-02-05 19:06:01 +0300
commit7416790e22452bfa86de6b55638eacf7780c8f6f (patch)
treef2c25ff63ff525be7f287bc77906beb0c1b49632 /drivers/infiniband/hw/mlx5/mlx5_ib.h
parent7a58779edd75c37352917e8fbc7769efce0e65b6 (diff)
downloadlinux-7416790e22452bfa86de6b55638eacf7780c8f6f.tar.xz
RDMA/core: Introduce and use API to read port immutable data
Currently mlx5 driver caches port GID table length for 2 ports. It is also cached by IB core as port immutable data. When mlx5 representor ports are present, which are usually more than 2, invalid access to port_caps array can happen while validating the GID table length which is only for 2 ports. To avoid this, take help of the IB cores port immutable data by exposing an API to read the port immutable fields. Remove mlx5 driver's internal cache, thereby reduce code and data. Link: https://lore.kernel.org/r/20210203130133.4057329-5-leon@kernel.org Signed-off-by: Parav Pandit <parav@nvidia.com> Signed-off-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx5/mlx5_ib.h')
-rw-r--r--drivers/infiniband/hw/mlx5/mlx5_ib.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mlx5/mlx5_ib.h b/drivers/infiniband/hw/mlx5/mlx5_ib.h
index 36a92f3c29e3..0f567d570230 100644
--- a/drivers/infiniband/hw/mlx5/mlx5_ib.h
+++ b/drivers/infiniband/hw/mlx5/mlx5_ib.h
@@ -1037,7 +1037,6 @@ struct mlx5_var_table {
};
struct mlx5_port_caps {
- int gid_table_len;
bool has_smi;
u8 ext_port_cap;
};