linux/drivers/infiniband/hw/qib
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
..
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
qib_6120_regs.h
qib_7220_regs.h
qib_7220.h Merge branch 'timer_setup' into for-next 2017-10-18 13:12:09 -04:00
qib_7322_regs.h
qib_common.h RDMA: Delete not-used static inline functions 2021-03-22 09:31:19 -03:00
qib_debugfs.c infiniband: qib: no need to check return value of debugfs_create functions 2019-01-24 09:22:29 -07:00
qib_debugfs.h
qib_diag.c RDMA: Use u64_to_user_ptr everywhere 2018-03-29 13:42:29 -06:00
qib_driver.c RDMA/hw/qib/qib_driver: Fix misspelling in 'ppd's param description 2021-01-22 14:37:30 -04:00
qib_eeprom.c RDMA/hw/qib/qib_eeprom: Fix misspelling of 'buff' in 'qib_eeprom_{read,write}()' 2021-01-22 14:37:30 -04:00
qib_file_ops.c RDMA: Fix kernel-doc compilation warnings 2021-03-22 09:31:19 -03:00
qib_fs.c infiniband: don't bother with d_delete() 2019-09-03 09:30:55 -04:00
qib_iba6120.c RDMA: Fix kernel-doc compilation warnings 2021-03-22 09:31:19 -03:00
qib_iba7220.c RDMA: Fix kernel-doc compilation warnings 2021-03-22 09:31:19 -03:00
qib_iba7322.c RDMA: Fix kernel-doc compilation warnings 2021-03-22 09:31:19 -03:00
qib_init.c RDMA: Fix kernel-doc compilation warnings 2021-03-22 09:31:19 -03:00
qib_intr.c RDMA/hw/qib/qib_intr: Fix a bunch of formatting issues 2021-01-22 14:37:31 -04:00
qib_mad.c RDMA: Support more than 255 rdma ports 2021-03-26 09:31:21 -03:00
qib_mad.h IB/core: Add core header changes needed for OPA 2015-08-28 22:54:50 -04:00
qib_pcie.c RDMA/hw/qib/qib_pcie: Demote obvious kernel-doc abuse 2021-01-22 14:37:31 -04:00
qib_pio_copy.c
qib_qp.c RDMA: Support more than 255 rdma ports 2021-03-26 09:31:21 -03:00
qib_qsfp.c IB/qib: Remove empty function 2017-01-24 16:20:37 -05:00
qib_qsfp.h IB/qib: Remove empty function 2017-01-24 16:20:37 -05:00
qib_rc.c RDMA/hw/qib/qib_rc: Fix some worthy kernel-docs demote hardly complete one 2021-01-22 14:37:31 -04:00
qib_ruc.c IB/{hfi1, qib, rdmavt}: Move ruc_loopback to rdmavt 2018-10-03 16:38:28 -06:00
qib_sd7220.c drivers: Remove explicit invocations of mmiowb() 2019-04-08 12:01:02 +01:00
qib_sdma.c RDMA/qib: Convert tasklets to use new tasklet_setup() API 2020-09-03 12:01:53 -03:00
qib_sysfs.c RDMA: Support more than 255 rdma ports 2021-03-26 09:31:21 -03:00
qib_twsi.c RDMA/hw/qib/qib_twsi: Provide description for missing param 'last' 2021-01-22 14:37:32 -04:00
qib_tx.c RDMA/hw/qib/qib_tx: Provide description for 'qib_chg_pioavailkernel()'s 'rcd' param 2021-01-22 14:37:32 -04:00
qib_uc.c RDMA/hw/qib/qib_uc: Provide description for missing 'flags' param 2021-01-22 14:37:32 -04:00
qib_ud.c RDMA/hw/qib/qib_ud: Provide description for 'qib_make_ud_req's 'flags' param 2021-01-22 14:37:33 -04:00
qib_user_pages.c RDMA/hw/qib/qib_user_pages: Demote non-conformant documentation header 2021-01-22 14:37:33 -04:00
qib_user_sdma.c mm, tree-wide: rename put_user_page*() to unpin_user_page*() 2020-01-31 10:30:38 -08:00
qib_user_sdma.h
qib_verbs.c RDMA: Support more than 255 rdma ports 2021-03-26 09:31:21 -03:00
qib_verbs.h RDMA: Support more than 255 rdma ports 2021-03-26 09:31:21 -03:00
qib_wc_ppc64.c
qib_wc_x86_64.c IB/qib: fix test of unsigned variable 2015-05-12 13:55:41 -04:00
qib.h RDMA: Support more than 255 rdma ports 2021-03-26 09:31:21 -03:00