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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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:
> > @@ -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



[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux