Lines Matching refs:qidx

208 	uint16_t qidx;  in nicvf_dev_stats_get()  local
221 for (qidx = rx_start; qidx <= rx_end; qidx++) { in nicvf_dev_stats_get()
222 if (qidx >= RTE_ETHDEV_QUEUE_STAT_CNTRS) in nicvf_dev_stats_get()
225 nicvf_hw_get_rx_qstats(nic, &rx_qstats, qidx); in nicvf_dev_stats_get()
226 stats->q_ibytes[qidx] = rx_qstats.q_rx_bytes; in nicvf_dev_stats_get()
227 stats->q_ipackets[qidx] = rx_qstats.q_rx_packets; in nicvf_dev_stats_get()
234 for (qidx = tx_start; qidx <= tx_end; qidx++) { in nicvf_dev_stats_get()
235 if (qidx >= RTE_ETHDEV_QUEUE_STAT_CNTRS) in nicvf_dev_stats_get()
238 nicvf_hw_get_tx_qstats(nic, &tx_qstats, qidx); in nicvf_dev_stats_get()
239 stats->q_obytes[qidx] = tx_qstats.q_tx_bytes; in nicvf_dev_stats_get()
240 stats->q_opackets[qidx] = tx_qstats.q_tx_packets; in nicvf_dev_stats_get()
253 for (qidx = rx_start; qidx <= rx_end; qidx++) { in nicvf_dev_stats_get()
254 if (qidx >= RTE_ETHDEV_QUEUE_STAT_CNTRS) in nicvf_dev_stats_get()
258 qidx % MAX_RCV_QUEUES_PER_QS); in nicvf_dev_stats_get()
259 stats->q_ibytes[qidx] = rx_qstats.q_rx_bytes; in nicvf_dev_stats_get()
260 stats->q_ipackets[qidx] = rx_qstats.q_rx_packets; in nicvf_dev_stats_get()
266 for (qidx = tx_start; qidx <= tx_end; qidx++) { in nicvf_dev_stats_get()
267 if (qidx >= RTE_ETHDEV_QUEUE_STAT_CNTRS) in nicvf_dev_stats_get()
271 qidx % MAX_SND_QUEUES_PER_QS); in nicvf_dev_stats_get()
272 stats->q_obytes[qidx] = tx_qstats.q_tx_bytes; in nicvf_dev_stats_get()
273 stats->q_opackets[qidx] = tx_qstats.q_tx_packets; in nicvf_dev_stats_get()
559 struct nicvf_rxq *rxq, uint16_t qidx, uint32_t desc_cnt) in nicvf_qset_cq_alloc() argument
565 nicvf_netdev_qidx(nic, qidx), ring_size, in nicvf_qset_cq_alloc()
583 struct nicvf_txq *sq, uint16_t qidx, uint32_t desc_cnt) in nicvf_qset_sq_alloc() argument
589 nicvf_netdev_qidx(nic, qidx), ring_size, in nicvf_qset_sq_alloc()
652 uint16_t qidx; in nicvf_rbdr_release_mbuf() local
660 for (qidx = rx_start; qidx <= rx_end; qidx++) { in nicvf_rbdr_release_mbuf()
661 rxq = dev->data->rx_queues[qidx]; in nicvf_rbdr_release_mbuf()
719 uint16_t qidx) in nicvf_vf_start_tx_queue() argument
724 assert(qidx < MAX_SND_QUEUES_PER_QS); in nicvf_vf_start_tx_queue()
726 if (dev->data->tx_queue_state[nicvf_netdev_qidx(nic, qidx)] == in nicvf_vf_start_tx_queue()
730 txq = dev->data->tx_queues[nicvf_netdev_qidx(nic, qidx)]; in nicvf_vf_start_tx_queue()
732 ret = nicvf_qset_sq_config(nic, qidx, txq); in nicvf_vf_start_tx_queue()
735 nic->vf_id, qidx, ret); in nicvf_vf_start_tx_queue()
739 dev->data->tx_queue_state[nicvf_netdev_qidx(nic, qidx)] = in nicvf_vf_start_tx_queue()
744 nicvf_qset_sq_reclaim(nic, qidx); in nicvf_vf_start_tx_queue()
750 uint16_t qidx) in nicvf_vf_stop_tx_queue() argument
755 assert(qidx < MAX_SND_QUEUES_PER_QS); in nicvf_vf_stop_tx_queue()
757 if (dev->data->tx_queue_state[nicvf_netdev_qidx(nic, qidx)] == in nicvf_vf_stop_tx_queue()
761 ret = nicvf_qset_sq_reclaim(nic, qidx); in nicvf_vf_stop_tx_queue()
764 nic->vf_id, qidx, ret); in nicvf_vf_stop_tx_queue()
766 txq = dev->data->tx_queues[nicvf_netdev_qidx(nic, qidx)]; in nicvf_vf_stop_tx_queue()
770 dev->data->tx_queue_state[nicvf_netdev_qidx(nic, qidx)] = in nicvf_vf_stop_tx_queue()
779 uint16_t qidx, qcnt; in nicvf_configure_cpi() local
783 for (qidx = qcnt = 0; qidx < dev->data->nb_rx_queues; qidx++) in nicvf_configure_cpi()
784 if (dev->data->rx_queue_state[qidx] == in nicvf_configure_cpi()
920 nicvf_dev_tx_queue_setup(struct rte_eth_dev *dev, uint16_t qidx, in nicvf_dev_tx_queue_setup() argument
932 if (qidx >= MAX_SND_QUEUES_PER_QS) in nicvf_dev_tx_queue_setup()
933 nic = nic->snicvf[qidx / MAX_SND_QUEUES_PER_QS - 1]; in nicvf_dev_tx_queue_setup()
935 qidx = qidx % MAX_SND_QUEUES_PER_QS; in nicvf_dev_tx_queue_setup()
966 (int)dev->data->port_id, (int)qidx); in nicvf_dev_tx_queue_setup()
971 if (dev->data->tx_queues[nicvf_netdev_qidx(nic, qidx)] != NULL) { in nicvf_dev_tx_queue_setup()
973 nicvf_netdev_qidx(nic, qidx)); in nicvf_dev_tx_queue_setup()
974 nicvf_dev_tx_queue_release(dev, nicvf_netdev_qidx(nic, qidx)); in nicvf_dev_tx_queue_setup()
975 dev->data->tx_queues[nicvf_netdev_qidx(nic, qidx)] = NULL; in nicvf_dev_tx_queue_setup()
983 nicvf_netdev_qidx(nic, qidx)); in nicvf_dev_tx_queue_setup()
988 txq->queue_id = qidx; in nicvf_dev_tx_queue_setup()
990 txq->sq_head = nicvf_qset_base(nic, qidx) + NIC_QSET_SQ_0_7_HEAD; in nicvf_dev_tx_queue_setup()
991 txq->sq_door = nicvf_qset_base(nic, qidx) + NIC_QSET_SQ_0_7_DOOR; in nicvf_dev_tx_queue_setup()
1008 dev->data->tx_queues[nicvf_netdev_qidx(nic, qidx)] = txq; in nicvf_dev_tx_queue_setup()
1016 nicvf_dev_tx_queue_release(dev, nicvf_netdev_qidx(nic, qidx)); in nicvf_dev_tx_queue_setup()
1020 if (nicvf_qset_sq_alloc(dev, nic, txq, qidx, nb_desc)) { in nicvf_dev_tx_queue_setup()
1021 PMD_INIT_LOG(ERR, "Failed to allocate mem for sq %d", qidx); in nicvf_dev_tx_queue_setup()
1022 nicvf_dev_tx_queue_release(dev, nicvf_netdev_qidx(nic, qidx)); in nicvf_dev_tx_queue_setup()
1030 nicvf_netdev_qidx(nic, qidx), txq, nb_desc, txq->desc, in nicvf_dev_tx_queue_setup()
1033 dev->data->tx_queue_state[nicvf_netdev_qidx(nic, qidx)] = in nicvf_dev_tx_queue_setup()
1077 uint16_t qidx) in nicvf_vf_start_rx_queue() argument
1082 assert(qidx < MAX_RCV_QUEUES_PER_QS); in nicvf_vf_start_rx_queue()
1084 if (dev->data->rx_queue_state[nicvf_netdev_qidx(nic, qidx)] == in nicvf_vf_start_rx_queue()
1089 rxq = dev->data->rx_queues[nicvf_netdev_qidx(nic, qidx)]; in nicvf_vf_start_rx_queue()
1092 ret = nicvf_qset_rq_config(nic, qidx, rxq); in nicvf_vf_start_rx_queue()
1095 nic->vf_id, qidx, ret); in nicvf_vf_start_rx_queue()
1098 ret = nicvf_qset_cq_config(nic, qidx, rxq); in nicvf_vf_start_rx_queue()
1101 nic->vf_id, qidx, ret); in nicvf_vf_start_rx_queue()
1105 dev->data->rx_queue_state[nicvf_netdev_qidx(nic, qidx)] = in nicvf_vf_start_rx_queue()
1110 nicvf_qset_cq_reclaim(nic, qidx); in nicvf_vf_start_rx_queue()
1112 nicvf_qset_rq_reclaim(nic, qidx); in nicvf_vf_start_rx_queue()
1118 uint16_t qidx) in nicvf_vf_stop_rx_queue() argument
1123 if (dev->data->rx_queue_state[nicvf_netdev_qidx(nic, qidx)] == in nicvf_vf_stop_rx_queue()
1127 ret = nicvf_qset_rq_reclaim(nic, qidx); in nicvf_vf_stop_rx_queue()
1130 nic->vf_id, qidx, ret); in nicvf_vf_stop_rx_queue()
1133 rxq = dev->data->rx_queues[nicvf_netdev_qidx(nic, qidx)]; in nicvf_vf_stop_rx_queue()
1137 ret = nicvf_qset_cq_reclaim(nic, qidx); in nicvf_vf_stop_rx_queue()
1140 nic->vf_id, qidx, ret); in nicvf_vf_stop_rx_queue()
1143 dev->data->rx_queue_state[nicvf_netdev_qidx(nic, qidx)] = in nicvf_vf_stop_rx_queue()
1157 nicvf_dev_rx_queue_start(struct rte_eth_dev *dev, uint16_t qidx) in nicvf_dev_rx_queue_start() argument
1162 if (qidx >= MAX_RCV_QUEUES_PER_QS) in nicvf_dev_rx_queue_start()
1163 nic = nic->snicvf[(qidx / MAX_RCV_QUEUES_PER_QS - 1)]; in nicvf_dev_rx_queue_start()
1165 qidx = qidx % MAX_RCV_QUEUES_PER_QS; in nicvf_dev_rx_queue_start()
1167 ret = nicvf_vf_start_rx_queue(dev, nic, qidx); in nicvf_dev_rx_queue_start()
1179 nicvf_dev_rx_queue_stop(struct rte_eth_dev *dev, uint16_t qidx) in nicvf_dev_rx_queue_stop() argument
1184 if (qidx >= MAX_SND_QUEUES_PER_QS) in nicvf_dev_rx_queue_stop()
1185 nic = nic->snicvf[(qidx / MAX_SND_QUEUES_PER_QS - 1)]; in nicvf_dev_rx_queue_stop()
1187 qidx = qidx % MAX_RCV_QUEUES_PER_QS; in nicvf_dev_rx_queue_stop()
1189 ret = nicvf_vf_stop_rx_queue(dev, nic, qidx); in nicvf_dev_rx_queue_stop()
1196 nicvf_dev_tx_queue_start(struct rte_eth_dev *dev, uint16_t qidx) in nicvf_dev_tx_queue_start() argument
1200 if (qidx >= MAX_SND_QUEUES_PER_QS) in nicvf_dev_tx_queue_start()
1201 nic = nic->snicvf[(qidx / MAX_SND_QUEUES_PER_QS - 1)]; in nicvf_dev_tx_queue_start()
1203 qidx = qidx % MAX_SND_QUEUES_PER_QS; in nicvf_dev_tx_queue_start()
1205 return nicvf_vf_start_tx_queue(dev, nic, qidx); in nicvf_dev_tx_queue_start()
1209 nicvf_dev_tx_queue_stop(struct rte_eth_dev *dev, uint16_t qidx) in nicvf_dev_tx_queue_stop() argument
1213 if (qidx >= MAX_SND_QUEUES_PER_QS) in nicvf_dev_tx_queue_stop()
1214 nic = nic->snicvf[(qidx / MAX_SND_QUEUES_PER_QS - 1)]; in nicvf_dev_tx_queue_stop()
1216 qidx = qidx % MAX_SND_QUEUES_PER_QS; in nicvf_dev_tx_queue_stop()
1218 return nicvf_vf_stop_tx_queue(dev, nic, qidx); in nicvf_dev_tx_queue_stop()
1251 nicvf_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t qidx, in nicvf_dev_rx_queue_setup() argument
1273 if (qidx >= MAX_RCV_QUEUES_PER_QS) in nicvf_dev_rx_queue_setup()
1274 nic = nic->snicvf[qidx / MAX_RCV_QUEUES_PER_QS - 1]; in nicvf_dev_rx_queue_setup()
1276 qidx = qidx % MAX_RCV_QUEUES_PER_QS; in nicvf_dev_rx_queue_setup()
1321 if (dev->data->rx_queues[nicvf_netdev_qidx(nic, qidx)] != NULL) { in nicvf_dev_rx_queue_setup()
1323 nicvf_netdev_qidx(nic, qidx)); in nicvf_dev_rx_queue_setup()
1324 nicvf_dev_rx_queue_release(dev, nicvf_netdev_qidx(nic, qidx)); in nicvf_dev_rx_queue_setup()
1325 dev->data->rx_queues[nicvf_netdev_qidx(nic, qidx)] = NULL; in nicvf_dev_rx_queue_setup()
1333 nicvf_netdev_qidx(nic, qidx)); in nicvf_dev_rx_queue_setup()
1339 rxq->queue_id = qidx; in nicvf_dev_rx_queue_setup()
1343 rxq->cq_status = nicvf_qset_base(nic, qidx) + NIC_QSET_CQ_0_7_STATUS; in nicvf_dev_rx_queue_setup()
1344 rxq->cq_door = nicvf_qset_base(nic, qidx) + NIC_QSET_CQ_0_7_DOOR; in nicvf_dev_rx_queue_setup()
1352 dev->data->rx_queues[nicvf_netdev_qidx(nic, qidx)] = rxq; in nicvf_dev_rx_queue_setup()
1359 nicvf_dev_rx_queue_release(dev, nicvf_netdev_qidx(nic, qidx)); in nicvf_dev_rx_queue_setup()
1368 nicvf_netdev_qidx(nic, qidx), rxq, mp->name, nb_desc, in nicvf_dev_rx_queue_setup()
1371 dev->data->rx_queue_state[nicvf_netdev_qidx(nic, qidx)] = in nicvf_dev_rx_queue_setup()
1430 uint16_t qidx; in rbdr_rte_mempool_get() local
1440 for (qidx = rx_start; qidx <= rx_end; qidx++) { in rbdr_rte_mempool_get()
1441 rxq = eth_dev->data->rx_queues[qidx]; in rbdr_rte_mempool_get()
1457 uint16_t qidx, data_off; in nicvf_vf_start() local
1489 for (qidx = rx_start; qidx <= rx_end; qidx++) { in nicvf_vf_start()
1490 rxq = dev->data->rx_queues[qidx]; in nicvf_vf_start()
1496 nic->vf_id, qidx, rxq->pool->name); in nicvf_vf_start()
1524 for (qidx = rx_start; qidx <= rx_end; qidx++) { in nicvf_vf_start()
1525 rxq = dev->data->rx_queues[qidx]; in nicvf_vf_start()
1603 for (qidx = tx_start; qidx <= tx_end; qidx++) { in nicvf_vf_start()
1605 qidx % MAX_SND_QUEUES_PER_QS); in nicvf_vf_start()
1611 for (qidx = rx_start; qidx <= rx_end; qidx++) { in nicvf_vf_start()
1613 qidx % MAX_RCV_QUEUES_PER_QS); in nicvf_vf_start()
1643 for (qidx = rx_start; qidx <= rx_end; qidx++) in nicvf_vf_start()
1644 nicvf_vf_stop_rx_queue(dev, nic, qidx % MAX_RCV_QUEUES_PER_QS); in nicvf_vf_start()
1646 for (qidx = tx_start; qidx <= tx_end; qidx++) in nicvf_vf_start()
1647 nicvf_vf_stop_tx_queue(dev, nic, qidx % MAX_SND_QUEUES_PER_QS); in nicvf_vf_start()
1664 uint16_t qidx; in nicvf_dev_start() local
1680 for (qidx = 0; qidx < dev->data->nb_rx_queues; qidx++) { in nicvf_dev_start()
1681 rxq = dev->data->rx_queues[qidx]; in nicvf_dev_start()
1692 qidx, rbdrsz, buffsz); in nicvf_dev_start()
1790 uint16_t qidx; in nicvf_vf_stop() local
1807 for (qidx = tx_start; qidx <= tx_end; qidx++) in nicvf_vf_stop()
1808 nicvf_vf_stop_tx_queue(dev, nic, qidx % MAX_SND_QUEUES_PER_QS); in nicvf_vf_stop()
1814 for (qidx = rx_start; qidx <= rx_end; qidx++) in nicvf_vf_stop()
1815 nicvf_vf_stop_rx_queue(dev, nic, qidx % MAX_RCV_QUEUES_PER_QS); in nicvf_vf_stop()