diff options
| author | Steve Wise <swise@opengridcomputing.com> | 2010-07-23 15:12:32 -0400 |
|---|---|---|
| committer | Roland Dreier <rolandd@cisco.com> | 2010-08-03 00:06:12 -0400 |
| commit | d4f1a5c6efabccd4b787a8b5907a5df9204ad2f6 (patch) | |
| tree | 23b7cc503c946670e85fc69e35b4ba98953878f9 | |
| parent | 73d6fcad2ac84b6fad326d87dc1dd0b29aabbd34 (diff) | |
RDMA/cxgb4: Use correct control txq
There is only one control txq per tx channel. So use the port number
as the queue index when sending.
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
| -rw-r--r-- | drivers/infiniband/hw/cxgb4/cm.c | 13 | ||||
| -rw-r--r-- | drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 1 |
2 files changed, 10 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c index e7b08dca740a..ffdc308151ce 100644 --- a/drivers/infiniband/hw/cxgb4/cm.c +++ b/drivers/infiniband/hw/cxgb4/cm.c | |||
| @@ -473,7 +473,7 @@ static int send_connect(struct c4iw_ep *ep) | |||
| 473 | __func__); | 473 | __func__); |
| 474 | return -ENOMEM; | 474 | return -ENOMEM; |
| 475 | } | 475 | } |
| 476 | set_wr_txq(skb, CPL_PRIORITY_SETUP, ep->txq_idx); | 476 | set_wr_txq(skb, CPL_PRIORITY_SETUP, ep->ctrlq_idx); |
| 477 | 477 | ||
| 478 | cxgb4_best_mtu(ep->com.dev->rdev.lldi.mtus, ep->mtu, &mtu_idx); | 478 | cxgb4_best_mtu(ep->com.dev->rdev.lldi.mtus, ep->mtu, &mtu_idx); |
| 479 | wscale = compute_wscale(rcv_win); | 479 | wscale = compute_wscale(rcv_win); |
| @@ -853,7 +853,7 @@ static int update_rx_credits(struct c4iw_ep *ep, u32 credits) | |||
| 853 | req->credit_dack = cpu_to_be32(credits | RX_FORCE_ACK(1) | | 853 | req->credit_dack = cpu_to_be32(credits | RX_FORCE_ACK(1) | |
| 854 | F_RX_DACK_CHANGE | | 854 | F_RX_DACK_CHANGE | |
| 855 | V_RX_DACK_MODE(dack_mode)); | 855 | V_RX_DACK_MODE(dack_mode)); |
| 856 | set_wr_txq(skb, CPL_PRIORITY_ACK, ep->txq_idx); | 856 | set_wr_txq(skb, CPL_PRIORITY_ACK, ep->ctrlq_idx); |
| 857 | c4iw_ofld_send(&ep->com.dev->rdev, skb); | 857 | c4iw_ofld_send(&ep->com.dev->rdev, skb); |
| 858 | return credits; | 858 | return credits; |
| 859 | } | 859 | } |
| @@ -1295,7 +1295,7 @@ static void accept_cr(struct c4iw_ep *ep, __be32 peer_ip, struct sk_buff *skb, | |||
| 1295 | ep->hwtid)); | 1295 | ep->hwtid)); |
| 1296 | rpl->opt0 = cpu_to_be64(opt0); | 1296 | rpl->opt0 = cpu_to_be64(opt0); |
| 1297 | rpl->opt2 = cpu_to_be32(opt2); | 1297 | rpl->opt2 = cpu_to_be32(opt2); |
| 1298 | set_wr_txq(skb, CPL_PRIORITY_SETUP, ep->txq_idx); | 1298 | set_wr_txq(skb, CPL_PRIORITY_SETUP, ep->ctrlq_idx); |
| 1299 | c4iw_l2t_send(&ep->com.dev->rdev, skb, ep->l2t); | 1299 | c4iw_l2t_send(&ep->com.dev->rdev, skb, ep->l2t); |
| 1300 | 1300 | ||
| 1301 | return; | 1301 | return; |
| @@ -1352,7 +1352,7 @@ static int pass_accept_req(struct c4iw_dev *dev, struct sk_buff *skb) | |||
| 1352 | u16 rss_qid; | 1352 | u16 rss_qid; |
| 1353 | u32 mtu; | 1353 | u32 mtu; |
| 1354 | int step; | 1354 | int step; |
| 1355 | int txq_idx; | 1355 | int txq_idx, ctrlq_idx; |
| 1356 | 1356 | ||
| 1357 | parent_ep = lookup_stid(t, stid); | 1357 | parent_ep = lookup_stid(t, stid); |
| 1358 | PDBG("%s parent ep %p tid %u\n", __func__, parent_ep, hwtid); | 1358 | PDBG("%s parent ep %p tid %u\n", __func__, parent_ep, hwtid); |
| @@ -1384,6 +1384,7 @@ static int pass_accept_req(struct c4iw_dev *dev, struct sk_buff *skb) | |||
| 1384 | smac_idx = (cxgb4_port_viid(pdev) & 0x7F) << 1; | 1384 | smac_idx = (cxgb4_port_viid(pdev) & 0x7F) << 1; |
| 1385 | step = dev->rdev.lldi.ntxq / dev->rdev.lldi.nchan; | 1385 | step = dev->rdev.lldi.ntxq / dev->rdev.lldi.nchan; |
| 1386 | txq_idx = cxgb4_port_idx(pdev) * step; | 1386 | txq_idx = cxgb4_port_idx(pdev) * step; |
| 1387 | ctrlq_idx = cxgb4_port_idx(pdev); | ||
| 1387 | step = dev->rdev.lldi.nrxq / dev->rdev.lldi.nchan; | 1388 | step = dev->rdev.lldi.nrxq / dev->rdev.lldi.nchan; |
| 1388 | rss_qid = dev->rdev.lldi.rxq_ids[cxgb4_port_idx(pdev) * step]; | 1389 | rss_qid = dev->rdev.lldi.rxq_ids[cxgb4_port_idx(pdev) * step]; |
| 1389 | dev_put(pdev); | 1390 | dev_put(pdev); |
| @@ -1395,6 +1396,7 @@ static int pass_accept_req(struct c4iw_dev *dev, struct sk_buff *skb) | |||
| 1395 | smac_idx = (cxgb4_port_viid(dst->neighbour->dev) & 0x7F) << 1; | 1396 | smac_idx = (cxgb4_port_viid(dst->neighbour->dev) & 0x7F) << 1; |
| 1396 | step = dev->rdev.lldi.ntxq / dev->rdev.lldi.nchan; | 1397 | step = dev->rdev.lldi.ntxq / dev->rdev.lldi.nchan; |
| 1397 | txq_idx = cxgb4_port_idx(dst->neighbour->dev) * step; | 1398 | txq_idx = cxgb4_port_idx(dst->neighbour->dev) * step; |
| 1399 | ctrlq_idx = cxgb4_port_idx(dst->neighbour->dev); | ||
| 1398 | step = dev->rdev.lldi.nrxq / dev->rdev.lldi.nchan; | 1400 | step = dev->rdev.lldi.nrxq / dev->rdev.lldi.nchan; |
| 1399 | rss_qid = dev->rdev.lldi.rxq_ids[ | 1401 | rss_qid = dev->rdev.lldi.rxq_ids[ |
| 1400 | cxgb4_port_idx(dst->neighbour->dev) * step]; | 1402 | cxgb4_port_idx(dst->neighbour->dev) * step]; |
| @@ -1434,6 +1436,7 @@ static int pass_accept_req(struct c4iw_dev *dev, struct sk_buff *skb) | |||
| 1434 | child_ep->rss_qid = rss_qid; | 1436 | child_ep->rss_qid = rss_qid; |
| 1435 | child_ep->mtu = mtu; | 1437 | child_ep->mtu = mtu; |
| 1436 | child_ep->txq_idx = txq_idx; | 1438 | child_ep->txq_idx = txq_idx; |
| 1439 | child_ep->ctrlq_idx = ctrlq_idx; | ||
| 1437 | 1440 | ||
| 1438 | PDBG("%s tx_chan %u smac_idx %u rss_qid %u\n", __func__, | 1441 | PDBG("%s tx_chan %u smac_idx %u rss_qid %u\n", __func__, |
| 1439 | tx_chan, smac_idx, rss_qid); | 1442 | tx_chan, smac_idx, rss_qid); |
| @@ -1965,6 +1968,7 @@ int c4iw_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param) | |||
| 1965 | ep->txq_idx = cxgb4_port_idx(pdev) * step; | 1968 | ep->txq_idx = cxgb4_port_idx(pdev) * step; |
| 1966 | step = ep->com.dev->rdev.lldi.nrxq / | 1969 | step = ep->com.dev->rdev.lldi.nrxq / |
| 1967 | ep->com.dev->rdev.lldi.nchan; | 1970 | ep->com.dev->rdev.lldi.nchan; |
| 1971 | ep->ctrlq_idx = cxgb4_port_idx(pdev); | ||
| 1968 | ep->rss_qid = ep->com.dev->rdev.lldi.rxq_ids[ | 1972 | ep->rss_qid = ep->com.dev->rdev.lldi.rxq_ids[ |
| 1969 | cxgb4_port_idx(pdev) * step]; | 1973 | cxgb4_port_idx(pdev) * step]; |
| 1970 | dev_put(pdev); | 1974 | dev_put(pdev); |
| @@ -1979,6 +1983,7 @@ int c4iw_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param) | |||
| 1979 | step = ep->com.dev->rdev.lldi.ntxq / | 1983 | step = ep->com.dev->rdev.lldi.ntxq / |
| 1980 | ep->com.dev->rdev.lldi.nchan; | 1984 | ep->com.dev->rdev.lldi.nchan; |
| 1981 | ep->txq_idx = cxgb4_port_idx(ep->dst->neighbour->dev) * step; | 1985 | ep->txq_idx = cxgb4_port_idx(ep->dst->neighbour->dev) * step; |
| 1986 | ep->ctrlq_idx = cxgb4_port_idx(ep->dst->neighbour->dev); | ||
| 1982 | step = ep->com.dev->rdev.lldi.nrxq / | 1987 | step = ep->com.dev->rdev.lldi.nrxq / |
| 1983 | ep->com.dev->rdev.lldi.nchan; | 1988 | ep->com.dev->rdev.lldi.nchan; |
| 1984 | ep->rss_qid = ep->com.dev->rdev.lldi.rxq_ids[ | 1989 | ep->rss_qid = ep->com.dev->rdev.lldi.rxq_ids[ |
diff --git a/drivers/infiniband/hw/cxgb4/iw_cxgb4.h b/drivers/infiniband/hw/cxgb4/iw_cxgb4.h index d33e1a668811..ed459b8f800f 100644 --- a/drivers/infiniband/hw/cxgb4/iw_cxgb4.h +++ b/drivers/infiniband/hw/cxgb4/iw_cxgb4.h | |||
| @@ -619,6 +619,7 @@ struct c4iw_ep { | |||
| 619 | u16 plen; | 619 | u16 plen; |
| 620 | u16 rss_qid; | 620 | u16 rss_qid; |
| 621 | u16 txq_idx; | 621 | u16 txq_idx; |
| 622 | u16 ctrlq_idx; | ||
| 622 | u8 tos; | 623 | u8 tos; |
| 623 | }; | 624 | }; |
| 624 | 625 | ||
