[PATCH] rdma: force queue size to respect controller capability

Sagi Grimberg sagi at grimberg.me
Wed Apr 5 23:15:58 PDT 2017


> Sagi,
>
> Was the +1 issue resolved differently?  I’m looking at the current code and I still see MQES + 1 being used.
>
> I’m running into an issue where my target reports a MQES of 3fh.
>
> The original ctrl->ctrl.sqsize comes from the create ctrl which sets a 0 based size.
>        ctrl->ctrl.sqsize = opts->queue_size - 1;
>
> When host does the
>         ctrl->ctrl.sqsize =
>                 min_t(int, NVME_CAP_MQES(ctrl->cap) + 1, ctrl->ctrl.sqsize);
>
>  the comparison is  min_t(40h, 7fh)
>
> So sqsize is now set as a 1 based value.  When the IO q is created, the target rejects it since it is larger than the max size.

Hey Darren,

You're right, we are wrongly taking MQES + 1. Not sure how this slipped.

I'll send a patch, thanks for reporting!



More information about the Linux-nvme mailing list