Lines Matching refs:tx
695 struct ipoib_cm_tx *tx, in post_send() argument
707 return ib_post_send(tx->qp, &priv->tx_wr, &bad_wr); in post_send()
710 void ipoib_cm_send(struct net_device *dev, struct sk_buff *skb, struct ipoib_cm_tx *tx) in ipoib_cm_send() argument
717 if (unlikely(skb->len > tx->mtu)) { in ipoib_cm_send()
719 skb->len, tx->mtu); in ipoib_cm_send()
722 ipoib_cm_skb_too_long(dev, skb, tx->mtu - IPOIB_ENCAP_LEN); in ipoib_cm_send()
727 tx->tx_head, skb->len, tx->qp->qp_num); in ipoib_cm_send()
736 tx_req = &tx->tx_ring[tx->tx_head & (ipoib_sendq_size - 1)]; in ipoib_cm_send()
750 rc = post_send(priv, tx, tx->tx_head & (ipoib_sendq_size - 1), in ipoib_cm_send()
759 ++tx->tx_head; in ipoib_cm_send()
763 tx->qp->qp_num); in ipoib_cm_send()
778 struct ipoib_cm_tx *tx = wc->qp->qp_context; in ipoib_cm_handle_tx_wc() local
792 tx_req = &tx->tx_ring[wr_id]; in ipoib_cm_handle_tx_wc()
804 ++tx->tx_tail; in ipoib_cm_handle_tx_wc()
819 neigh = tx->neigh; in ipoib_cm_handle_tx_wc()
825 tx->neigh = NULL; in ipoib_cm_handle_tx_wc()
828 if (test_and_clear_bit(IPOIB_FLAG_INITIALIZED, &tx->flags)) { in ipoib_cm_handle_tx_wc()
829 list_move(&tx->list, &priv->cm.reap_list); in ipoib_cm_handle_tx_wc()
833 clear_bit(IPOIB_FLAG_OPER_UP, &tx->flags); in ipoib_cm_handle_tx_wc()
1022 static struct ib_qp *ipoib_cm_create_tx_qp(struct net_device *dev, struct ipoib_cm_tx *tx) in ipoib_cm_create_tx_qp() argument
1033 .qp_context = tx, in ipoib_cm_create_tx_qp()
1222 struct ipoib_cm_tx *tx = cm_id->context; in ipoib_cm_tx_handler() local
1223 struct ipoib_dev_priv *priv = netdev_priv(tx->dev); in ipoib_cm_tx_handler()
1247 neigh = tx->neigh; in ipoib_cm_tx_handler()
1253 tx->neigh = NULL; in ipoib_cm_tx_handler()
1256 if (test_and_clear_bit(IPOIB_FLAG_INITIALIZED, &tx->flags)) { in ipoib_cm_tx_handler()
1257 list_move(&tx->list, &priv->cm.reap_list); in ipoib_cm_tx_handler()
1275 struct ipoib_cm_tx *tx; in ipoib_cm_create_tx() local
1277 tx = kzalloc(sizeof *tx, GFP_ATOMIC); in ipoib_cm_create_tx()
1278 if (!tx) in ipoib_cm_create_tx()
1281 neigh->cm = tx; in ipoib_cm_create_tx()
1282 tx->neigh = neigh; in ipoib_cm_create_tx()
1283 tx->path = path; in ipoib_cm_create_tx()
1284 tx->dev = dev; in ipoib_cm_create_tx()
1285 list_add(&tx->list, &priv->cm.start_list); in ipoib_cm_create_tx()
1286 set_bit(IPOIB_FLAG_INITIALIZED, &tx->flags); in ipoib_cm_create_tx()
1288 return tx; in ipoib_cm_create_tx()
1291 void ipoib_cm_destroy_tx(struct ipoib_cm_tx *tx) in ipoib_cm_destroy_tx() argument
1293 struct ipoib_dev_priv *priv = netdev_priv(tx->dev); in ipoib_cm_destroy_tx()
1295 if (test_and_clear_bit(IPOIB_FLAG_INITIALIZED, &tx->flags)) { in ipoib_cm_destroy_tx()
1297 list_move(&tx->list, &priv->cm.reap_list); in ipoib_cm_destroy_tx()
1300 tx->neigh->daddr + 4); in ipoib_cm_destroy_tx()
1301 tx->neigh = NULL; in ipoib_cm_destroy_tx()