[ofw] SRQ attached QP issue

Alex Estrin alex.estrin at qlogic.com
Fri Sep 26 15:15:51 PDT 2008


Hello,

It seem there is a controversy exist in mlx4 driver that won't allow to
create QP if it was attached to SRQ.

At first it doesn't allow to set any recv queue size (which is fine)

mlx4\kernel\bus\ib\qp.c@ line 219:
		if (cap->max_recv_wr)
			return -EINVAL;

		qp->rq.wqe_cnt = qp->rq.max_gs = 0;

But then there is assertion for zero size memory request in 'kmalloc':
mlx4\kernel\bus\ib\qp.c @ line 416:

		qp->rq.wrid  = kmalloc(qp->rq.wqe_cnt * sizeof (u64),
GFP_KERNEL);
		
mlx4\kernel\inc\l2w_memory.h @ line 81:

		static inline void * kmalloc( SIZE_T bsize, gfp_t
gfp_mask)
		{
			void *ptr;
			ASSERT( KeGetCurrentIrql() <= DISPATCH_LEVEL);
			ASSERT(bsize);
		.....

I believe it was added for a reason.
Please let me know if I missed anything.

Thanks,
Alex.





More information about the ofw mailing list