]> git.baikalelectronics.ru Git - kernel.git/commit
IB/core: Increase number of char device minors
authorHuy Nguyen <huyn@mellanox.com>
Mon, 8 Jan 2018 10:15:38 +0000 (12:15 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Thu, 11 Jan 2018 05:00:32 +0000 (22:00 -0700)
commit8cb686518810cf4781968d1840c5295eb0aa1c54
tree35724d9b304785e271624b00c555356402bd6b17
parent2d08c7bb625474d8897e036dc62e4ce5e3aaecab
IB/core: Increase number of char device minors

There is a need to increase number of possible char devices to support
large number of SR-IOV instances. The current limit is in the range of
64-128 devices/ports. Increase it to support up to 1024.

The patch performs the following steps to refactor the code:
1. Removes the split bitmap for fixed and overflow dev numbers.
2. Pre-allocates the non-legacy major number range during driver
   initialization, choosen for simplicity.
3. Add new define (RDMA_MAX_PORTS) that is shared between all drivers.
   This is the maximum total number of ports on all struct ib_devices.
4. Set RDMA_MAX_PORTS to 1024.

Signed-off-by: Huy Nguyen <huyn@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/core_priv.h
drivers/infiniband/core/ucm.c
drivers/infiniband/core/user_mad.c
drivers/infiniband/core/uverbs_main.c