[ofa-general] [PATCH 2/3] ib/ipoib: set IPoIB-UD RX S/G parameters
Shirley Ma
mashirle at us.ibm.com
Wed Jan 30 12:43:02 PST 2008
Found a problem in patch generation file ipoib_verbs.c, I will fix it
tomorrow, it should be:
--- a/drivers/infiniband/ulp/ipoib/ipoib_verbs.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_verbs.c
@@ -150,7 +150,7 @@ int ipoib_transport_dev_init(struct net_device *dev,
struct ib_device *ca)
.max_send_wr = ipoib_sendq_size,
.max_recv_wr = ipoib_recvq_size,
.max_send_sge = 1,
- .max_recv_sge = 1
+ .max_recv_sge =
IPOIB_UD_RX_SG(priv->max_ib_mtu)
},
.sq_sig_type = IB_SIGNAL_ALL_WR,
.qp_type = IB_QPT_UD
@@ -208,6 +208,16 @@ int ipoib_transport_dev_init(struct net_device
*dev, struct ib_device *ca)
priv->tx_wr.num_sge = 1;
priv->tx_wr.send_flags = IB_SEND_SIGNALED;
+ priv->rx_sge[0].length = IPOIB_UD_HEAD_SIZE(priv->max_ib_mtu);
+ for (i = 0; i < IPOIB_UD_RX_SG(priv->max_ib_mtu) - 1; ++i) {
+ priv->rx_sge[i].lkey = priv->mr->lkey;
+ priv->rx_sge[i + 1].length = PAGE_SIZE;
+ }
+ priv->rx_sge[i + 1].lkey = priv->mr->lkey;
+ priv->rx_wr.num_sge = IPOIB_UD_RX_SG(priv->max_ib_mtu);
+ priv->rx_wr.next = NULL;
+ priv->rx_wr.sg_list = priv->rx_sge;
+
return 0;
out_free_cq:
More information about the general
mailing list