linux/drivers/infiniband/hw/i40iw
Mark Bloch 1fb7f8973f RDMA: Support more than 255 rdma ports
Current code uses many different types when dealing with a port of a RDMA
device: u8, unsigned int and u32. Switch to u32 to clean up the logic.

This allows us to make (at least) the core view consistent and use the
same type. Unfortunately not all places can be converted. Many uverbs
functions expect port to be u8 so keep those places in order not to break
UAPIs.  HW/Spec defined values must also not be changed.

With the switch to u32 we now can support devices with more than 255
ports. U32_MAX is reserved to make control logic a bit easier to deal
with. As a device with U32_MAX ports probably isn't going to happen any
time soon this seems like a non issue.

When a device with more than 255 ports is created uverbs will report the
RDMA device as having 255 ports as this is the max currently supported.

The verbs interface is not changed yet because the IBTA spec limits the
port size in too many places to be u8 and all applications that relies in
verbs won't be able to cope with this change. At this stage, we are
extending the interfaces that are using vendor channel solely

Once the limitation is lifted mlx5 in switchdev mode will be able to have
thousands of SFs created by the device. As the only instance of an RDMA
device that reports more than 255 ports will be a representor device and
it exposes itself as a RAW Ethernet only device CM/MAD/IPoIB and other
ULPs aren't effected by this change and their sysfs/interfaces that are
exposes to userspace can remain unchanged.

While here cleanup some alignment issues and remove unneeded sanity
checks (mainly in rdmavt),

Link: https://lore.kernel.org/r/20210301070420.439400-1-leon@kernel.org
Signed-off-by: Mark Bloch <mbloch@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
2021-03-26 09:31:21 -03:00
..
i40iw_cm.c RDMA: Fix kernel-doc compilation warnings 2021-03-22 09:31:19 -03:00
i40iw_cm.h RDMA: Replace zero-length array with flexible-array member 2020-02-20 13:33:51 -04:00
i40iw_ctrl.c RDMA/hw/i40iw/i40iw_ctrl: Fix a bunch of misspellings and formatting issues 2021-01-19 20:33:40 -04:00
i40iw_d.h RDMA/i40iw: Remove push code from i40iw 2020-12-01 20:50:01 -04:00
i40iw_hmc.c RDMA: Fix kernel-doc compilation warnings 2021-03-22 09:31:19 -03:00
i40iw_hmc.h i40iw: add hmc resource files 2016-02-29 17:10:53 -05:00
i40iw_hw.c RDMA/hw/i40iw/i40iw_hw: Provide description for 'ipv4', remove 'user_pri' and fix 'iwcq' 2021-01-19 20:33:41 -04:00
i40iw_main.c RDMA: Fix kernel-doc compilation warnings 2021-03-22 09:31:19 -03:00
i40iw_osdep.h RDMA: Delete not-used static inline functions 2021-03-22 09:31:19 -03:00
i40iw_p.h i40iw: Report correct firmware version 2020-03-18 13:53:44 -03:00
i40iw_pble.c RDMA/hw/i40iw/i40iw_pble: Provide description for 'dev' and fix formatting issues 2021-01-19 20:33:41 -04:00
i40iw_pble.h i40iw: add pble resource files 2016-02-29 17:10:53 -05:00
i40iw_puda.c RDMA: Fix kernel-doc compilation warnings 2021-03-22 09:31:19 -03:00
i40iw_puda.h i40iw: Free IEQ resources 2018-01-16 20:38:18 -07:00
i40iw_register.h i40iw: add X722 register file 2016-03-16 13:50:53 -04:00
i40iw_status.h RDMA/i40iw: Remove push code from i40iw 2020-12-01 20:50:01 -04:00
i40iw_type.h RDMA/i40iw: Remove push code from i40iw 2020-12-01 20:50:01 -04:00
i40iw_uk.c RDMA/hw/i40iw/i40iw_uk: Clean-up some function documentation headers 2021-01-19 20:33:42 -04:00
i40iw_user.h RDMA/i40iw: Remove push code from i40iw 2020-12-01 20:50:01 -04:00
i40iw_utils.c RDMA: Fix kernel-doc compilation warnings 2021-03-22 09:31:19 -03:00
i40iw_verbs.c RDMA: Support more than 255 rdma ports 2021-03-26 09:31:21 -03:00
i40iw_verbs.h i40iw: Add support to make destroy QP synchronous 2020-09-22 20:23:18 -03:00
i40iw_vf.c i40iw: constify i40iw_vf_cqp_ops structure 2016-05-13 13:47:07 -04:00
i40iw_vf.h i40iw: constify i40iw_vf_cqp_ops structure 2016-05-13 13:47:07 -04:00
i40iw_virtchnl.c RDMA: Fix kernel-doc compilation warnings 2021-03-22 09:31:19 -03:00
i40iw_virtchnl.h i40iw: virtual channel handling files 2016-03-16 13:50:53 -04:00
i40iw.h RDMA: Delete not-used static inline functions 2021-03-22 09:31:19 -03:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile i40e: Move client header location 2020-06-25 22:25:13 -07:00