Lines Matching refs:txq_ctrl

54 		struct mlx5_txq_ctrl *txq_ctrl = mlx5_txq_get(dev, i);  in mlx5_txq_start()  local
55 struct mlx5_txq_data *txq_data = &txq_ctrl->txq; in mlx5_txq_start()
58 if (!txq_ctrl) in mlx5_txq_start()
60 if (txq_ctrl->type == MLX5_TXQ_TYPE_STANDARD) in mlx5_txq_start()
61 txq_alloc_elts(txq_ctrl); in mlx5_txq_start()
62 MLX5_ASSERT(!txq_ctrl->obj); in mlx5_txq_start()
63 txq_ctrl->obj = mlx5_malloc(flags, sizeof(struct mlx5_txq_obj), in mlx5_txq_start()
64 0, txq_ctrl->socket); in mlx5_txq_start()
65 if (!txq_ctrl->obj) { in mlx5_txq_start()
74 mlx5_free(txq_ctrl->obj); in mlx5_txq_start()
75 txq_ctrl->obj = NULL; in mlx5_txq_start()
78 if (txq_ctrl->type == MLX5_TXQ_TYPE_STANDARD) { in mlx5_txq_start()
83 txq_ctrl->socket); in mlx5_txq_start()
93 dev->data->port_id, i, (void *)&txq_ctrl->obj); in mlx5_txq_start()
94 LIST_INSERT_HEAD(&priv->txqsobj, txq_ctrl->obj, next); in mlx5_txq_start()
216 struct mlx5_txq_ctrl *txq_ctrl; in mlx5_hairpin_auto_bind() local
226 txq_ctrl = mlx5_txq_get(dev, i); in mlx5_hairpin_auto_bind()
227 if (!txq_ctrl) in mlx5_hairpin_auto_bind()
229 if (txq_ctrl->type != MLX5_TXQ_TYPE_HAIRPIN) { in mlx5_hairpin_auto_bind()
233 if (txq_ctrl->hairpin_conf.peers[0].port != self_port) in mlx5_hairpin_auto_bind()
235 if (txq_ctrl->hairpin_conf.manual_bind) { in mlx5_hairpin_auto_bind()
245 txq_ctrl = mlx5_txq_get(dev, i); in mlx5_hairpin_auto_bind()
246 if (!txq_ctrl) in mlx5_hairpin_auto_bind()
248 if (txq_ctrl->type != MLX5_TXQ_TYPE_HAIRPIN) { in mlx5_hairpin_auto_bind()
253 if (txq_ctrl->hairpin_conf.peers[0].port != self_port) in mlx5_hairpin_auto_bind()
255 if (!txq_ctrl->obj) { in mlx5_hairpin_auto_bind()
262 sq = txq_ctrl->obj->sq; in mlx5_hairpin_auto_bind()
264 txq_ctrl->hairpin_conf.peers[0].queue); in mlx5_hairpin_auto_bind()
270 txq_ctrl->hairpin_conf.peers[0].queue); in mlx5_hairpin_auto_bind()
278 i, txq_ctrl->hairpin_conf.peers[0].queue); in mlx5_hairpin_auto_bind()
286 txq_ctrl->hairpin_conf.peers[0].queue); in mlx5_hairpin_auto_bind()
305 txq_ctrl->hairpin_status = 1; in mlx5_hairpin_auto_bind()
307 mlx5_rxq_release(dev, txq_ctrl->hairpin_conf.peers[0].queue); in mlx5_hairpin_auto_bind()
312 mlx5_rxq_release(dev, txq_ctrl->hairpin_conf.peers[0].queue); in mlx5_hairpin_auto_bind()
354 struct mlx5_txq_ctrl *txq_ctrl; in mlx5_hairpin_queue_peer_update() local
356 txq_ctrl = mlx5_txq_get(dev, peer_queue); in mlx5_hairpin_queue_peer_update()
357 if (txq_ctrl == NULL) { in mlx5_hairpin_queue_peer_update()
363 if (txq_ctrl->type != MLX5_TXQ_TYPE_HAIRPIN) { in mlx5_hairpin_queue_peer_update()
370 if (txq_ctrl->obj == NULL || txq_ctrl->obj->sq == NULL) { in mlx5_hairpin_queue_peer_update()
377 peer_info->qp_id = txq_ctrl->obj->sq->id; in mlx5_hairpin_queue_peer_update()
380 peer_info->peer_q = txq_ctrl->hairpin_conf.peers[0].queue; in mlx5_hairpin_queue_peer_update()
381 peer_info->tx_explicit = txq_ctrl->hairpin_conf.tx_explicit; in mlx5_hairpin_queue_peer_update()
382 peer_info->manual_bind = txq_ctrl->hairpin_conf.manual_bind; in mlx5_hairpin_queue_peer_update()
453 struct mlx5_txq_ctrl *txq_ctrl; in mlx5_hairpin_queue_peer_bind() local
456 txq_ctrl = mlx5_txq_get(dev, cur_queue); in mlx5_hairpin_queue_peer_bind()
457 if (txq_ctrl == NULL) { in mlx5_hairpin_queue_peer_bind()
463 if (txq_ctrl->type != MLX5_TXQ_TYPE_HAIRPIN) { in mlx5_hairpin_queue_peer_bind()
470 if (txq_ctrl->obj == NULL || txq_ctrl->obj->sq == NULL) { in mlx5_hairpin_queue_peer_bind()
477 if (txq_ctrl->hairpin_status != 0) { in mlx5_hairpin_queue_peer_bind()
488 txq_ctrl->hairpin_conf.tx_explicit) { in mlx5_hairpin_queue_peer_bind()
496 txq_ctrl->hairpin_conf.manual_bind) { in mlx5_hairpin_queue_peer_bind()
507 ret = mlx5_devx_cmd_modify_sq(txq_ctrl->obj->sq, &sq_attr); in mlx5_hairpin_queue_peer_bind()
509 txq_ctrl->hairpin_status = 1; in mlx5_hairpin_queue_peer_bind()
592 struct mlx5_txq_ctrl *txq_ctrl; in mlx5_hairpin_queue_peer_unbind() local
595 txq_ctrl = mlx5_txq_get(dev, cur_queue); in mlx5_hairpin_queue_peer_unbind()
596 if (txq_ctrl == NULL) { in mlx5_hairpin_queue_peer_unbind()
602 if (txq_ctrl->type != MLX5_TXQ_TYPE_HAIRPIN) { in mlx5_hairpin_queue_peer_unbind()
610 if (txq_ctrl->hairpin_status == 0) { in mlx5_hairpin_queue_peer_unbind()
616 if (!txq_ctrl->obj || !txq_ctrl->obj->sq) { in mlx5_hairpin_queue_peer_unbind()
625 ret = mlx5_devx_cmd_modify_sq(txq_ctrl->obj->sq, &sq_attr); in mlx5_hairpin_queue_peer_unbind()
627 txq_ctrl->hairpin_status = 0; in mlx5_hairpin_queue_peer_unbind()
687 struct mlx5_txq_ctrl *txq_ctrl; in mlx5_hairpin_bind_single_port() local
709 txq_ctrl = mlx5_txq_get(dev, i); in mlx5_hairpin_bind_single_port()
710 if (txq_ctrl == NULL) in mlx5_hairpin_bind_single_port()
712 if (txq_ctrl->type != MLX5_TXQ_TYPE_HAIRPIN) { in mlx5_hairpin_bind_single_port()
722 conf = &txq_ctrl->hairpin_conf; in mlx5_hairpin_bind_single_port()
749 txq_ctrl = mlx5_txq_get(dev, i); in mlx5_hairpin_bind_single_port()
750 if (txq_ctrl == NULL) in mlx5_hairpin_bind_single_port()
752 if (txq_ctrl->type != MLX5_TXQ_TYPE_HAIRPIN) { in mlx5_hairpin_bind_single_port()
756 if (txq_ctrl->hairpin_conf.peers[0].port != rx_port) { in mlx5_hairpin_bind_single_port()
760 rx_queue = txq_ctrl->hairpin_conf.peers[0].queue; in mlx5_hairpin_bind_single_port()
779 cur.qp_id = txq_ctrl->obj->sq->id; in mlx5_hairpin_bind_single_port()
781 cur.tx_explicit = txq_ctrl->hairpin_conf.tx_explicit; in mlx5_hairpin_bind_single_port()
782 cur.manual_bind = txq_ctrl->hairpin_conf.manual_bind; in mlx5_hairpin_bind_single_port()
803 txq_ctrl = mlx5_txq_get(dev, i); in mlx5_hairpin_bind_single_port()
804 if (txq_ctrl == NULL) in mlx5_hairpin_bind_single_port()
806 rx_queue = txq_ctrl->hairpin_conf.peers[0].queue; in mlx5_hairpin_bind_single_port()
831 struct mlx5_txq_ctrl *txq_ctrl; in mlx5_hairpin_unbind_single_port() local
844 txq_ctrl = mlx5_txq_get(dev, i); in mlx5_hairpin_unbind_single_port()
845 if (txq_ctrl == NULL) in mlx5_hairpin_unbind_single_port()
847 if (txq_ctrl->type != MLX5_TXQ_TYPE_HAIRPIN) { in mlx5_hairpin_unbind_single_port()
851 if (txq_ctrl->hairpin_conf.peers[0].port != rx_port) { in mlx5_hairpin_unbind_single_port()
856 if (txq_ctrl->hairpin_conf.manual_bind == 0) { in mlx5_hairpin_unbind_single_port()
867 rx_queue = txq_ctrl->hairpin_conf.peers[0].queue; in mlx5_hairpin_unbind_single_port()
968 struct mlx5_txq_ctrl *txq_ctrl; in mlx5_hairpin_get_peer_ports() local
977 txq_ctrl = mlx5_txq_get(dev, i); in mlx5_hairpin_get_peer_ports()
978 if (!txq_ctrl) in mlx5_hairpin_get_peer_ports()
980 if (txq_ctrl->type != MLX5_TXQ_TYPE_HAIRPIN) { in mlx5_hairpin_get_peer_ports()
984 pp = txq_ctrl->hairpin_conf.peers[0].port; in mlx5_hairpin_get_peer_ports()
1235 struct mlx5_txq_ctrl *txq_ctrl = mlx5_txq_get(dev, i); in mlx5_traffic_enable() local
1236 if (!txq_ctrl) in mlx5_traffic_enable()
1239 if (txq_ctrl->type == MLX5_TXQ_TYPE_HAIRPIN && in mlx5_traffic_enable()
1240 txq_ctrl->hairpin_conf.tx_explicit == 0 && in mlx5_traffic_enable()
1241 txq_ctrl->hairpin_conf.peers[0].port == in mlx5_traffic_enable()