From: Roland Dreier <roland@topspin.com>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org, openib-general@openib.org
Subject: [PATCH][15/27] IB/mthca: fill in opcode field for send completions
Date: Fri, 1 Apr 2005 12:49:53 -0800 [thread overview]
Message-ID: <2005411249.qipkNNwvZYuE2KBu@topspin.com> (raw)
In-Reply-To: <2005411249.E7CWkenJFFkWDs2q@topspin.com>
From: Michael S. Tsirkin <mst@mellanox.co.il>
Fill in missing fields in send completions.
Signed-off-by: Itamar Rabenstein <itamar@mellanox.co.il>
Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <roland@topspin.com>
--- linux-export.orig/drivers/infiniband/hw/mthca/mthca_cq.c 2005-04-01 12:38:24.207705852 -0800
+++ linux-export/drivers/infiniband/hw/mthca/mthca_cq.c 2005-04-01 12:38:26.177278312 -0800
@@ -473,7 +473,41 @@
}
if (is_send) {
- entry->opcode = IB_WC_SEND; /* XXX */
+ entry->wc_flags = 0;
+ switch (cqe->opcode) {
+ case MTHCA_OPCODE_RDMA_WRITE:
+ entry->opcode = IB_WC_RDMA_WRITE;
+ break;
+ case MTHCA_OPCODE_RDMA_WRITE_IMM:
+ entry->opcode = IB_WC_RDMA_WRITE;
+ entry->wc_flags |= IB_WC_WITH_IMM;
+ break;
+ case MTHCA_OPCODE_SEND:
+ entry->opcode = IB_WC_SEND;
+ break;
+ case MTHCA_OPCODE_SEND_IMM:
+ entry->opcode = IB_WC_SEND;
+ entry->wc_flags |= IB_WC_WITH_IMM;
+ break;
+ case MTHCA_OPCODE_RDMA_READ:
+ entry->opcode = IB_WC_RDMA_READ;
+ entry->byte_len = be32_to_cpu(cqe->byte_cnt);
+ break;
+ case MTHCA_OPCODE_ATOMIC_CS:
+ entry->opcode = IB_WC_COMP_SWAP;
+ entry->byte_len = be32_to_cpu(cqe->byte_cnt);
+ break;
+ case MTHCA_OPCODE_ATOMIC_FA:
+ entry->opcode = IB_WC_FETCH_ADD;
+ entry->byte_len = be32_to_cpu(cqe->byte_cnt);
+ break;
+ case MTHCA_OPCODE_BIND_MW:
+ entry->opcode = IB_WC_BIND_MW;
+ break;
+ default:
+ entry->opcode = MTHCA_OPCODE_INVALID;
+ break;
+ }
} else {
entry->byte_len = be32_to_cpu(cqe->byte_cnt);
switch (cqe->opcode & 0x1f) {
--- linux-export.orig/drivers/infiniband/hw/mthca/mthca_dev.h 2005-04-01 12:38:25.561412000 -0800
+++ linux-export/drivers/infiniband/hw/mthca/mthca_dev.h 2005-04-01 12:38:26.173279180 -0800
@@ -88,6 +88,19 @@
MTHCA_NUM_EQ
};
+enum {
+ MTHCA_OPCODE_NOP = 0x00,
+ MTHCA_OPCODE_RDMA_WRITE = 0x08,
+ MTHCA_OPCODE_RDMA_WRITE_IMM = 0x09,
+ MTHCA_OPCODE_SEND = 0x0a,
+ MTHCA_OPCODE_SEND_IMM = 0x0b,
+ MTHCA_OPCODE_RDMA_READ = 0x10,
+ MTHCA_OPCODE_ATOMIC_CS = 0x11,
+ MTHCA_OPCODE_ATOMIC_FA = 0x12,
+ MTHCA_OPCODE_BIND_MW = 0x18,
+ MTHCA_OPCODE_INVALID = 0xff
+};
+
struct mthca_cmd {
int use_events;
struct semaphore hcr_sem;
--- linux-export.orig/drivers/infiniband/hw/mthca/mthca_qp.c 2005-04-01 12:38:25.023528759 -0800
+++ linux-export/drivers/infiniband/hw/mthca/mthca_qp.c 2005-04-01 12:38:26.181277444 -0800
@@ -171,19 +171,6 @@
};
enum {
- MTHCA_OPCODE_NOP = 0x00,
- MTHCA_OPCODE_RDMA_WRITE = 0x08,
- MTHCA_OPCODE_RDMA_WRITE_IMM = 0x09,
- MTHCA_OPCODE_SEND = 0x0a,
- MTHCA_OPCODE_SEND_IMM = 0x0b,
- MTHCA_OPCODE_RDMA_READ = 0x10,
- MTHCA_OPCODE_ATOMIC_CS = 0x11,
- MTHCA_OPCODE_ATOMIC_FA = 0x12,
- MTHCA_OPCODE_BIND_MW = 0x18,
- MTHCA_OPCODE_INVALID = 0xff
-};
-
-enum {
MTHCA_NEXT_DBD = 1 << 7,
MTHCA_NEXT_FENCE = 1 << 6,
MTHCA_NEXT_CQ_UPDATE = 1 << 3,
next prev parent reply other threads:[~2005-04-01 21:00 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-01 20:49 [PATCH][1/27] IB/mthca: map MPT/MTT context in mem-free mode Roland Dreier
2005-04-01 20:49 ` [PATCH][2/27] IB/mthca: fill in more device query fields Roland Dreier
2005-04-01 20:49 ` [PATCH][3/27] IB/mthca: fix calculation of RDB shift Roland Dreier
2005-04-01 20:49 ` [PATCH][4/27] IB/mthca: fix posting sends with immediate data Roland Dreier
2005-04-01 20:49 ` [PATCH][5/27] IB/mthca: allow unaligned memory regions Roland Dreier
2005-04-01 20:49 ` [PATCH][6/27] IB/mthca: allocate correct number of doorbell pages Roland Dreier
2005-04-01 20:49 ` [PATCH][7/27] IB/mthca: clean up mthca_dereg_mr() Roland Dreier
2005-04-01 20:49 ` [PATCH][8/27] IB/mthca: fix MR allocation error path Roland Dreier
2005-04-01 20:49 ` [PATCH][9/27] IB/mthca: release mutex on doorbell alloc " Roland Dreier
2005-04-01 20:49 ` [PATCH][10/27] IB/mthca: print assigned IRQ when interrupt test fails Roland Dreier
2005-04-01 20:49 ` [PATCH][11/27] IB/mthca: only free doorbell records in mem-free mode Roland Dreier
2005-04-01 20:49 ` [PATCH][12/27] IB/mthca: fix format of CQ number for CQ events Roland Dreier
2005-04-01 20:49 ` [PATCH][13/27] IB/mthca: implement RDMA/atomic operations for mem-free mode Roland Dreier
2005-04-01 20:49 ` [PATCH][14/27] IB/mthca: fix MTT allocation in " Roland Dreier
2005-04-01 20:49 ` Roland Dreier [this message]
2005-04-01 20:49 ` [PATCH][16/27] IB/mthca: allow address handle creation in interrupt context Roland Dreier
2005-04-01 20:49 ` [PATCH][17/27] IB/mthca: encapsulate MTT buddy allocator Roland Dreier
2005-04-01 20:49 ` [PATCH][18/27] IB/mthca: add SYNC_TPT firmware command Roland Dreier
2005-04-01 20:49 ` [PATCH][19/27] IB/mthca: add mthca_write64_raw() for writing to MTT table directly Roland Dreier
2005-04-01 20:49 ` [PATCH][20/27] IB/mthca: add mthca_table_find() function Roland Dreier
2005-04-01 20:49 ` [PATCH][21/27] IB/mthca: split MR key munging routines Roland Dreier
2005-04-01 20:49 ` [PATCH][22/27] IB/mthca: add fast memory region implementation Roland Dreier
2005-04-01 20:49 ` [PATCH][23/27] IB/mthca: tweaks to mthca_cmd.c Roland Dreier
2005-04-01 20:49 ` [PATCH][24/27] IB/mthca: encapsulate mem-free check into mthca_is_memfree() Roland Dreier
2005-04-01 20:49 ` [PATCH][25/27] IB/mthca: map context for RDMA responder in mem-free mode Roland Dreier
2005-04-01 20:49 ` [PATCH][26/27] IB/mthca: update receive queue initialization for new HCAs Roland Dreier
2005-04-01 20:49 ` [PATCH][27/27] IB/mthca: add support for new MT25204 HCA Roland Dreier
2005-04-01 22:06 ` [PATCH][26.5/27] Add MT25204 PCI IDs Roland Dreier
2005-04-08 0:10 ` Greg KH
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=2005411249.qipkNNwvZYuE2KBu@topspin.com \
--to=roland@topspin.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=openib-general@openib.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox