From: Or Gerlitz <ogerlitz@mellanox.com>
To: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
Cc: target-devel <target-devel@vger.kernel.org>,
linux-rdma <linux-rdma@vger.kernel.org>,
linux-scsi <linux-scsi@vger.kernel.org>,
Roland Dreier <roland@kernel.org>,
Alexander Nezhinsky <alexandern@mellanox.com>
Subject: Re: [RFC 10/11] iser-target: Add logic for core
Date: Thu, 14 Mar 2013 13:08:44 +0200 [thread overview]
Message-ID: <5141AFBC.8000002@mellanox.com> (raw)
In-Reply-To: <1362707116-31406-11-git-send-email-nab@linux-iscsi.org>
On 08/03/2013 03:45, Nicholas A. Bellinger wrote:
> +void
> +isert_dump_ib_wc(struct ib_wc *wc)
> +{
> + pr_debug("wc->wr_id: %llu\n", wc->wr_id);
> + pr_debug("wc->status: 0x%08x\n", wc->status);
This helper is called for a CQ completion with error, but when this
happens all the WC fields except for the wr_id and the status aren't
defined, so there's no point in dumping them (can be terribly misleading)
> + pr_debug("wc->opcode: 0x%08x\n", wc->opcode);
> + pr_debug("wc->vendor_err: 0x%08x\n", wc->vendor_err);
> + pr_debug("wc->byte_len: %u\n", wc->byte_len);
> + pr_debug("wc->qp: %p\n", wc->qp);
> + pr_debug("wc->src_qp: %u\n", wc->src_qp);
> + pr_debug("wc->wc_flags: 0x%08x\n", wc->wc_flags);
> + pr_debug("wc->pkey_index: %hu\n", wc->pkey_index);
> + pr_debug("wc->slid: %hu\n", wc->slid);
> + pr_debug("wc->sl: 0x%02x\n", wc->sl);
> + pr_debug("wc->dlid_path_bits: 0x%02x\n", wc->dlid_path_bits);
> + pr_debug("wc->port_num: 0x%02x\n", wc->port_num);
> +}
> +
> +void
> +iser_cq_tx_tasklet(unsigned long data)
> +{
> + struct isert_conn *isert_conn = (struct isert_conn *)data;
> + struct ib_cq *tx_cq = isert_conn->conn_tx_cq;
> + struct iser_tx_desc *tx_desc;
> + struct ib_wc wc;
> +
> + while (ib_poll_cq(tx_cq, 1, &wc) == 1) {
> + tx_desc = (struct iser_tx_desc *)(unsigned long)wc.wr_id;
> +
> + if (wc.status == IB_WC_SUCCESS) {
> + isert_send_completion(tx_desc, isert_conn);
> + } else {
> + pr_debug("TX wc.status != IB_WC_SUCCESS >>>>>>>>>>>>>>\n");
> + isert_dump_ib_wc(&wc);
> + atomic_dec(&isert_conn->post_send_buf_count);
> + isert_cq_comp_err(tx_desc, isert_conn);
> + }
> + }
> +
> + ib_req_notify_cq(tx_cq, IB_CQ_NEXT_COMP);
> +}
> +
> +void
> +isert_cq_tx_callback(struct ib_cq *cq, void *context)
> +{
> + struct isert_conn *isert_conn = context;
> +
> + tasklet_schedule(&isert_conn->conn_tx_tasklet);
> +}
> +
> +void
> +iser_cq_rx_tasklet(unsigned long data)
> +{
> + struct isert_conn *isert_conn = (struct isert_conn *)data;
> + struct ib_cq *rx_cq = isert_conn->conn_rx_cq;
> + struct iser_rx_desc *rx_desc;
> + struct ib_wc wc;
> + unsigned long xfer_len;
> +
> + while (ib_poll_cq(rx_cq, 1, &wc) == 1) {
> + rx_desc = (struct iser_rx_desc *)(unsigned long)wc.wr_id;
> +
> + if (wc.status == IB_WC_SUCCESS) {
> + xfer_len = (unsigned long)wc.byte_len;
> + isert_rx_completion(rx_desc, isert_conn, xfer_len);
> + } else {
> + pr_debug("RX wc.status != IB_WC_SUCCESS >>>>>>>>>>>>>>\n");
> + if (wc.status != IB_WC_WR_FLUSH_ERR)
> + isert_dump_ib_wc(&wc);
> +
> + isert_conn->post_recv_buf_count--;
> + isert_cq_comp_err(NULL, isert_conn);
> + }
> + }
> +
> + ib_req_notify_cq(rx_cq, IB_CQ_NEXT_COMP);
> +}
next prev parent reply other threads:[~2013-03-14 11:08 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-08 1:45 [RFC 00/11] Add support for iSCSI Extentions for RDMA (ISER) target Nicholas A. Bellinger
2013-03-08 1:45 ` [RFC 01/11] iscsi-target: Add iscsit_transport API template Nicholas A. Bellinger
2013-03-08 4:14 ` Roland Dreier
[not found] ` <CAG4TOxM=PDYXCAMNdRx629aAP+XF7oZmykg0k4b+a688PzzayA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-03-08 6:02 ` Nicholas A. Bellinger
2013-03-08 16:59 ` Roland Dreier
2013-03-08 12:36 ` Or Gerlitz
2013-03-08 21:26 ` Nicholas A. Bellinger
2013-03-22 17:23 ` Andy Grover
2013-03-22 22:29 ` Nicholas A. Bellinger
2013-03-08 1:45 ` [RFC 02/11] iscsi-target: Initial traditional TCP conversion to iscsit_transport Nicholas A. Bellinger
2013-03-22 17:23 ` Andy Grover
2013-03-22 22:38 ` Nicholas A. Bellinger
2013-03-08 1:45 ` [RFC 03/11] iscsi-target: Add iser-target parameter keys + setup during login Nicholas A. Bellinger
2013-03-22 17:23 ` Andy Grover
2013-03-22 22:57 ` Nicholas A. Bellinger
[not found] ` <1362707116-31406-1-git-send-email-nab-IzHhD5pYlfBP7FQvKIMDCQ@public.gmane.org>
2013-03-08 1:45 ` [RFC 04/11] iscsi-target: Add per transport iscsi_cmd alloc/free Nicholas A. Bellinger
2013-03-08 14:29 ` Asias He
2013-03-08 20:47 ` Nicholas A. Bellinger
[not found] ` <1362707116-31406-5-git-send-email-nab-IzHhD5pYlfBP7FQvKIMDCQ@public.gmane.org>
2013-03-22 17:23 ` Andy Grover
2013-03-22 22:59 ` Nicholas A. Bellinger
2013-03-08 1:45 ` [RFC 06/11] iscsi-target: Refactor TX queue logic + export response PDU creation Nicholas A. Bellinger
2013-03-08 1:45 ` [RFC 05/11] iscsi-target: Refactor RX PDU logic + export request PDU handling Nicholas A. Bellinger
[not found] ` <1362707116-31406-6-git-send-email-nab-IzHhD5pYlfBP7FQvKIMDCQ@public.gmane.org>
2013-03-22 17:23 ` Andy Grover
2013-03-22 23:09 ` Nicholas A. Bellinger
2013-03-08 1:45 ` [RFC 07/11] iscsi-target: Add iser network portal attribute Nicholas A. Bellinger
2013-03-08 1:45 ` [RFC 08/11] iser-target: Add base + proto includes Nicholas A. Bellinger
2013-03-14 11:26 ` Or Gerlitz
2013-03-08 1:45 ` [RFC 09/11] iser-target: Add logic for verbs Nicholas A. Bellinger
2013-03-14 11:19 ` Or Gerlitz
[not found] ` <1362707116-31406-10-git-send-email-nab-IzHhD5pYlfBP7FQvKIMDCQ@public.gmane.org>
2013-03-14 11:42 ` Or Gerlitz
2013-03-08 1:45 ` [RFC 10/11] iser-target: Add logic for core Nicholas A. Bellinger
2013-03-14 11:08 ` Or Gerlitz [this message]
2013-03-14 11:58 ` Or Gerlitz
2013-03-08 1:45 ` [RFC 11/11] iser-target: Add Makefile + Kconfig Nicholas A. Bellinger
2013-03-14 8:17 ` [RFC 00/11] Add support for iSCSI Extentions for RDMA (ISER) target Or Gerlitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5141AFBC.8000002@mellanox.com \
--to=ogerlitz@mellanox.com \
--cc=alexandern@mellanox.com \
--cc=linux-rdma@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=nab@linux-iscsi.org \
--cc=roland@kernel.org \
--cc=target-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.