Thread (1 message) 1 message, 1 author, 2012-03-21

RE: [PATCH 4/9] ocrdma: Driver for Emulex OneConnect RDMA adapter

From: <hidden>
Date: 2012-03-21 19:46:51
Also in: linux-rdma

-----Original Message-----
From: Roland Dreier [mailto:roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org]
Sent: Thursday, March 22, 2012 1:02 AM
To: Pandit, Parav
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 4/9] ocrdma: Driver for Emulex OneConnect RDMA
adapter

On Wed, Mar 21, 2012 at 12:09 PM,  [off-list ref] wrote:
quoted
Yes. Driver needs to put QP to flush state. So that appropriate CQEs can be
returned during poll_cq() phase.
quoted
So state machine is implemented above.
Couldn't you just write

    if (ib_modify_qp_is_ok(...)) {
        if (new_state == OCRDMA_QPS_ERR)
            ocrdma_flush_qp(qp);
    } else {
        status = -EINVAL;
    }

and save about 100 lines of code?
Yes, this can be done. This is one path.
Another path is async_event coming from adapter. So I still need qp_state_machine function but as you suggested, I'll remove the states and will have invoke flush_qp() on error.
 - R.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help