[ofa-general] Re: [PATCH v1] libmlx4: Added resize CQ capability.
Roland Dreier
rdreier at cisco.com
Wed Apr 23 11:14:37 PDT 2008
> + if ((cqe->owner_sr_opcode & MLX4_CQE_OPCODE_MASK) == MLX4_CQE_OPCODE_RESIZE)
> + goto repoll;
seems like this can never happen in userspace, since we can hold the CQ
lock the whole time the resize is in progress?
> +int mlx4_get_outstanding_cqes(struct mlx4_cq *cq)
> +{
> + int i;
This needs to be unsigned I think to avoid undefined overflow
issues... (although in practice I guess it probably doesn't matter)
> +
> + for (i = cq->cons_index; get_sw_cqe(cq, (i & cq->ibv_cq.cqe)); ++i)
> + ;
> +
> + return i - cq->cons_index;
> +}
Anyway I deleted the changes to the polling path and updated the
variable, and applied it. Please let me know if I messed something up...
More information about the general
mailing list