Re: [PATCH 10/14] SIWv2: Transmit path: siw_qp_tx.c
From: Bart Van Assche <hidden>
Date: 2011-06-18 17:47:29
Also in:
linux-rdma
On Thu, Jun 16, 2011 at 2:42 PM, Bernard Metzler [off-list ref] wrote:
quoted hunk
--- drivers/infiniband/hw/siw/siw_qp_tx.c | 1332 +++++++++++++++++++++++++++++++++ 1 files changed, 1332 insertions(+), 0 deletions(-) create mode 100644 drivers/infiniband/hw/siw/siw_qp_tx.cdiff --git a/drivers/infiniband/hw/siw/siw_qp_tx.c b/drivers/infiniband/hw/siw/siw_qp_tx.c
[ ... ]
+/*
+ * Write out iov referencing hdr, data and trailer of current FPDU.
+ * Update transmit state dependent on write return status
+ */
+static int siw_tx_hdt(struct siw_iwarp_tx *c_tx, struct socket *s)
+{
+ struct siw_wqe *wqe = c_tx->wqe;
+ struct siw_sge *sge = &wqe->wr.sgl.sge[c_tx->sge_idx],
+ *first_sge = sge;
+ struct siw_mr *mr = NULL;
+ struct ib_umem_chunk *chunk = c_tx->umem_chunk;
+
+ struct kvec iov[MAX_ARRAY];
+ struct page *page_array[MAX_ARRAY];
+ struct msghdr msg = {.msg_flags = MSG_DONTWAIT};
+
+ int seg = 0, do_crc = c_tx->do_crc, is_kva = 0, rv;
+ unsigned int data_len = c_tx->bytes_unsent,
+ hdr_len = 0,
+ trl_len = 0,
+ sge_off = c_tx->sge_off,
+ sge_idx = c_tx->sge_idx,
+ pg_idx = c_tx->pg_idx;Have you run the siw source code through sparse ? Sparse reports the following for the above: drivers/infiniband/hw/siw/siw_qp_tx.c:694:1: warning: the frame size of 1120 bytes is larger than 1024 bytes I assume that you know that one should be careful with stack allocations in the kernel ?
+ if (tx_type == RDMAP_RDMA_READ_REQ) {This is what the compiler says about the above statement: drivers/infiniband/hw/siw/siw_qp_tx.c:1145:15: warning: comparison between enum siw_wr_opcode and enum rdma_opcode So how can that statement be correct ? Bart. -- 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