On 2/12/2019 6:18 PM, Christoph Hellwig wrote:
On Thu, Feb 07, 2019 at 07:33:29PM +0200, Max Gurtovoy wrote:
/* Maximum number of work requests per task:
+ * Memory region local invalidate + fast registration
* PDU send
*/
The comment formatting seems odd from the existing code, why not:
/*
* Maximum number of work requests per task
* (invalidate, registration, send):
*/
struct iser_tx_desc {
struct iser_ctrl iser_header;
@@ -262,11 +257,7 @@ struct iser_tx_desc {
union iser_wr {
struct ib_send_wr send;
struct ib_reg_wr fast_reg;
- struct ib_sig_handover_wr sig;
} wrs[ISER_MAX_WRS];
ny chance we can unwind this union in a follow on patch and just have
three members with the right type and a descriptive name?
sure.
index 9556ec55dec2..ae8993a7a34c 100644
--- a/drivers/infiniband/ulp/iser/iser_initiator.c
+++ b/drivers/infiniband/ulp/iser/iser_initiator.c
@@ -594,10 +594,9 @@ void iser_login_rsp(struct ib_cq *cq, struct ib_wc *wc)
static inline int
iser_inv_desc(struct iser_fr_desc *desc, u32 rkey)
{
- if (likely(rkey == desc->rsc.mr->rkey)) {
+ if (likely(rkey == desc->rsc.mr->rkey ||
+ (desc->rsc.sig_mr && rkey == desc->rsc.sig_mr->rkey))) {
desc->rsc.mr_valid = 0;
} else {
iser_err("Bogus remote invalidation for rkey %#x\n", rkey);
return -EINVAL;
Don't we need to skip the first test for the sig_mr case now?
Also if you touch this code: doing the early return for the error
first really helps the reader compared to hiding it in an else.
Also something only vaguely related: Can we drop FMR support in iSER?
It seems like NFS just dropped FMR support, so this might be a good
time.
Sagi has patches to drop the FMR from iSER and I also support it.
Let's see how we progress with this series and then decide who'll rebase
the code on top of the other.