Thread (6 messages) 6 messages, 3 authors, 2021-03-29

Re: [PATCH rdma-next] RDMA: Support more than 255 rdma ports

From: Leon Romanovsky <leon@kernel.org>
Date: 2021-03-01 14:45:59
Also in: linux-rdma, target-devel

On Mon, Mar 01, 2021 at 08:48:34AM -0400, Jason Gunthorpe wrote:
On Mon, Mar 01, 2021 at 09:04:20AM +0200, Leon Romanovsky wrote:
quoted
@@ -884,7 +884,7 @@ static void gid_table_reserve_default(struct ib_device *ib_dev, u8 port,

 static void gid_table_release_one(struct ib_device *ib_dev)
 {
-	unsigned int p;
+	u32 p;

 	rdma_for_each_port (ib_dev, p) {
 		release_gid_table(ib_dev, ib_dev->port_data[p].cache.gid);
@@ -895,7 +895,7 @@ static void gid_table_release_one(struct ib_device *ib_dev)
 static int _gid_table_setup_one(struct ib_device *ib_dev)
 {
 	struct ib_gid_table *table;
-	unsigned int rdma_port;
+	u32 rdma_port;

 	rdma_for_each_port (ib_dev, rdma_port) {
Why are we changing this? 'unsigned int' is the right type for port
numbers
I prefer to see same types in all places. We use u32 for HW data and
netlink, so it makes sense to have it everywhere. Also, at least for me,
the u32 is more explicit than "unsigned int".

So when Mark asked me which type to use, I said u32.

Thanks
Jason
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help