[ofa-general] Re: [PATCH 1/1] MLX4: Added resize_cq capability.
Roland Dreier
rdreier at cisco.com
Fri Mar 28 20:35:22 PDT 2008
> +enum {
> + MLX4_MAX_DIRECT_CQ_SIZE = 2 * PAGE_SIZE
> +};
If you're going to introduce this, please replace the existing use of
2 * PAGE_SIZE with the constant.
> +enum {
> + MLX4_CQ_ENTRY_SIZE = 0x20
> +};
Just use sizeof (struct mlx4_cqe) the way the rest of the code does.
> + cq->is_kernel = !context;
I don't think there's any need for this new member... we can just test
cq->ibcq->uobject the way the rest of the existing code does.
> + context = kzalloc(sizeof *context, GFP_KERNEL);
> + memset(context, 0, sizeof *context);
no point in doing this memset if you use kzalloc().
- R.
More information about the general
mailing list