On Sat, 2014-03-22 at 21:24 +0000, Sagi Grimberg wrote: > > > > > From: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx> > > > > This patch changes isert_conn_create_fastreg_pool() to follow > > logic in iscsi_target_locate_portal() for determing how many > > FRMR descriptors to allocate based upon the number of possible > > per-session command slots that are available. > > > > This addresses an OOPs in isert_reg_rdma() where due to the > > use of ISCSI_DEF_XMIT_CMDS_MAX could end up returning a bogus > > fast_reg_descriptor when the number of active tags exceeded > > the original hardcoded max. > > > > Note this also includes moving isert_conn_create_fastreg_pool() > > from isert_connect_request() to isert_put_login_tx() before > > posting the final Login Response PDU in order to determine the > > se_nacl->queue_depth (eg: number of tags) per session the target > > will be enforcing. > > > > > > > Ah yes, this patch makes sense to me. > Thanks for reviewing! > > v2 changes: > > - Move isert_conn->conn_fr_pool list_head init into > > isert_conn_request() > > > > Cc: Sagi Grimberg <sagig@xxxxxxxxxxxx> > > Cc: Or Gerlitz <ogerlitz@xxxxxxxxxxxx> > > Signed-off-by: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx> > > --- > > drivers/infiniband/ulp/isert/ib_isert.c | 43 > > ++++++++++++++++++++----------- > > 1 file changed, 28 insertions(+), 15 deletions(-) > > > > diff --git a/drivers/infiniband/ulp/isert/ib_isert.c > > b/drivers/infiniband/ulp/isert/ib_isert.c > > index 09bde9f..62e67db 100644 > > --- a/drivers/infiniband/ulp/isert/ib_isert.c > > +++ b/drivers/infiniband/ulp/isert/ib_isert.c <SNIP> > > @@ -2708,6 +2716,11 @@ isert_reg_rdma(struct iscsi_conn *conn, > > struct iscsi_cmd *cmd, > > if (wr->data.dma_nents != 1 || > > se_cmd->prot_op != TARGET_PROT_NORMAL) { > > spin_lock_irqsave(&isert_conn->conn_lock, flags); > > + if (list_empty(&isert_conn->conn_fr_pool)) { > > > > > This feels like we're being *too* careful. Each command uses a > *single* fastreg desc. You should never ever end up here (assuming > that the queue depth was respected). > <nod>, dropping this now unnecessary list_empty() check. --nab -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html