[ofa-general] Re: [PATCH 2/10] IB/core: Add creation flags to QPs

Eli Cohen eli at dev.mellanox.co.il
Thu Mar 20 01:05:25 PDT 2008


On Wed, 2008-03-19 at 16:06 -0700, Roland Dreier wrote:
> > @@ -505,6 +509,7 @@ struct ib_qp_init_attr {
>  >  	enum ib_sig_type	sq_sig_type;
>  >  	enum ib_qp_type		qp_type;
>  >  	u8			port_num; /* special QP types only */
>  > +	enum qp_create_flags    create_flags;
>  >  };
> 
> I'm dubious about this.  It seems to me like everything (including the
> mlx4 low-level driver changes for LSO) would be simpler to implement
> and use if we just extend the qp_type to include IB_QPT_UD_LSO.  For
> example it eliminates the need to test if someone tries to create an
> LSO QP for a non-UD transport and return an error (although I don't
> see that test in your code anyway).

I could do with defining a new QP type but the point is that you can
still post LSO WRs even if you did not create an LSO QP - it's just that
in some cases the post may fail due to insufficient buffer space.
Specifying the creation flag tells the driver to reserve memory for LSO
needs and so to ensure that any WR with any number of gather entries
will succeed. If you prefer I a new QP type I can re-send the patch.

> 
> As I recall, the XRC patches want this flags field too.  But does it
> work there if we just add another XRC QP type too?





More information about the general mailing list