On Mon, May 14, 2018 at 02:23:16PM +0000, Bart Van Assche wrote: > > > WARN_ON(sdev->device->phys_port_cnt > ARRAY_SIZE(sdev->port)); > > > > Should we add a IB_MAX_PORTS define that ULPs can rely on in the core? > > How many drivers would benefit from the introduction of such a constant? > A third possible alternative is that I change the port array in the ib_srpt > driver such that it is allocated dynamically. That would allow to eliminate > the WARN_ON() statement mentioned above. No idea how many benefit. But either we have an upper limit, or ULPs should be able to deal with any possible number, e.g. by using your dynamic allocation idea. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html