PERFORCE change 132336 for review

Steve Wise swise at FreeBSD.org
Wed Jan 2 13:54:27 PST 2008


http://perforce.freebsd.org/chv.cgi?CH=132336

Change 132336 by swise at swise:vic10:iwarp on 2008/01/02 21:54:22

	cxio hal fixes
	
	1) use m_gethdr() instead of m_get()
	2) don't set gen bit for WRs sent down via the toe queue
	3) request replies to qp setup WRs

Affected files ...

.. //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cxio_hal.c#4 edit
.. //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cxio_wr.h#3 edit

Differences ...

==== //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cxio_hal.c#4 (text+ko) ====

@@ -180,14 +180,14 @@
 {
 	u64 sge_cmd;
 	struct t3_modify_qp_wr *wqe;
-	struct mbuf *skb = m_get(MT_DATA, M_WAITOK);
+	struct mbuf *skb = m_gethdr(MT_DATA, M_WAITOK);
 	if (!skb) {
 		PDBG("%s alloc_skb failed\n", __FUNCTION__);
 		return (ENOMEM);
 	}
 	wqe = (struct t3_modify_qp_wr *) mbuf_put(skb, sizeof(*wqe));
 	memset(wqe, 0, sizeof(*wqe));
-	build_fw_riwrh((struct fw_riwrh *) wqe, T3_WR_QP_MOD, 3, 1, qpid, 7);
+	build_fw_riwrh((struct fw_riwrh *) wqe, T3_WR_QP_MOD, 3, 0, qpid, 7);
 	wqe->flags = cpu_to_be32(MODQP_WRITE_EC);
 	sge_cmd = qpid << 8 | 3;
 	wqe->sge_cmd = cpu_to_be64(sge_cmd);
@@ -560,7 +560,7 @@
 	struct t3_modify_qp_wr *wqe;
 	struct mbuf *skb;
 
-	skb = m_get(MT_DATA, M_WAITOK);
+	skb = m_gethdr(MT_DATA, M_WAITOK);
 	if (!skb) {
 		PDBG("%s alloc_skb failed\n", __FUNCTION__);
 		return (ENOMEM);
@@ -605,7 +605,7 @@
 			V_EC_UP_TOKEN(T3_CTL_QP_TID) | F_EC_VALID)) << 32;
 	wqe = (struct t3_modify_qp_wr *) mbuf_put(skb, sizeof(*wqe));
 	memset(wqe, 0, sizeof(*wqe));
-	build_fw_riwrh((struct fw_riwrh *) wqe, T3_WR_QP_MOD, 0, 1,
+	build_fw_riwrh((struct fw_riwrh *) wqe, T3_WR_QP_MOD, 3, 0,
 		       T3_CTL_QP_TID, 7);
 	wqe->flags = cpu_to_be32(MODQP_WRITE_EC);
 	sge_cmd = (3ULL << 56) | FW_RI_SGEEC_START << 8 | 3;
@@ -725,6 +725,7 @@
 			       wr_len);
 		if (flag == T3_COMPLETION_FLAG)
 			ring_doorbell(rdev_p->ctrl_qp.doorbell, T3_CTRL_QP_ID);
+
 		len -= 96;
 		rdev_p->ctrl_qp.wptr++;
 	}
@@ -872,7 +873,7 @@
 cxio_rdma_init(struct cxio_rdev *rdev_p, struct t3_rdma_init_attr *attr)
 {
 	struct t3_rdma_init_wr *wqe;
-	struct mbuf *skb = m_get(MT_DATA, M_NOWAIT);
+	struct mbuf *skb = m_gethdr(MT_DATA, M_NOWAIT);
 	if (!skb)
 		return (ENOMEM);
 	PDBG("%s rdev_p %p\n", __FUNCTION__, rdev_p);

==== //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cxio_wr.h#3 (text+ko) ====



More information about the p4-projects mailing list