Lines Matching refs:dpaa_fq
199 struct dpaa_fq *tx_defq;
200 struct dpaa_fq *tx_errq;
201 struct dpaa_fq *rx_defq;
202 struct dpaa_fq *rx_errq;
203 struct dpaa_fq *rx_pcdq;
640 static inline void dpaa_assign_wq(struct dpaa_fq *fq, int idx) in dpaa_assign_wq()
684 static struct dpaa_fq *dpaa_fq_alloc(struct device *dev, in dpaa_fq_alloc()
689 struct dpaa_fq *dpaa_fq; in dpaa_fq_alloc() local
692 dpaa_fq = devm_kcalloc(dev, count, sizeof(*dpaa_fq), in dpaa_fq_alloc()
694 if (!dpaa_fq) in dpaa_fq_alloc()
698 dpaa_fq[i].fq_type = fq_type; in dpaa_fq_alloc()
699 dpaa_fq[i].fqid = start ? start + i : 0; in dpaa_fq_alloc()
700 list_add_tail(&dpaa_fq[i].list, list); in dpaa_fq_alloc()
704 dpaa_assign_wq(dpaa_fq + i, i); in dpaa_fq_alloc()
706 return dpaa_fq; in dpaa_fq_alloc()
712 struct dpaa_fq *dpaa_fq; in dpaa_alloc_all_fqs() local
715 dpaa_fq = dpaa_fq_alloc(dev, 0, 1, list, FQ_TYPE_RX_ERROR); in dpaa_alloc_all_fqs()
716 if (!dpaa_fq) in dpaa_alloc_all_fqs()
719 port_fqs->rx_errq = &dpaa_fq[0]; in dpaa_alloc_all_fqs()
721 dpaa_fq = dpaa_fq_alloc(dev, 0, 1, list, FQ_TYPE_RX_DEFAULT); in dpaa_alloc_all_fqs()
722 if (!dpaa_fq) in dpaa_alloc_all_fqs()
725 port_fqs->rx_defq = &dpaa_fq[0]; in dpaa_alloc_all_fqs()
740 dpaa_fq = dpaa_fq_alloc(dev, fq_base_aligned, DPAA_ETH_PCD_RXQ_NUM, in dpaa_alloc_all_fqs()
742 if (!dpaa_fq) in dpaa_alloc_all_fqs()
745 port_fqs->rx_pcdq = &dpaa_fq[0]; in dpaa_alloc_all_fqs()
750 dpaa_fq = dpaa_fq_alloc(dev, 0, 1, list, FQ_TYPE_TX_ERROR); in dpaa_alloc_all_fqs()
751 if (!dpaa_fq) in dpaa_alloc_all_fqs()
754 port_fqs->tx_errq = &dpaa_fq[0]; in dpaa_alloc_all_fqs()
756 dpaa_fq = dpaa_fq_alloc(dev, 0, 1, list, FQ_TYPE_TX_CONFIRM); in dpaa_alloc_all_fqs()
757 if (!dpaa_fq) in dpaa_alloc_all_fqs()
760 port_fqs->tx_defq = &dpaa_fq[0]; in dpaa_alloc_all_fqs()
887 struct dpaa_fq *fq, in dpaa_setup_ingress()
898 struct dpaa_fq *fq, in dpaa_setup_egress()
920 struct dpaa_fq *fq; in dpaa_fq_setup()
993 static int dpaa_fq_init(struct dpaa_fq *dpaa_fq, bool td_enable) in dpaa_fq_init() argument
1003 priv = netdev_priv(dpaa_fq->net_dev); in dpaa_fq_init()
1004 dev = dpaa_fq->net_dev->dev.parent; in dpaa_fq_init()
1006 if (dpaa_fq->fqid == 0) in dpaa_fq_init()
1007 dpaa_fq->flags |= QMAN_FQ_FLAG_DYNAMIC_FQID; in dpaa_fq_init()
1009 dpaa_fq->init = !(dpaa_fq->flags & QMAN_FQ_FLAG_NO_MODIFY); in dpaa_fq_init()
1011 err = qman_create_fq(dpaa_fq->fqid, dpaa_fq->flags, &dpaa_fq->fq_base); in dpaa_fq_init()
1016 fq = &dpaa_fq->fq_base; in dpaa_fq_init()
1018 if (dpaa_fq->init) { in dpaa_fq_init()
1028 if (dpaa_fq->fq_type == FQ_TYPE_TX_CONFIRM) in dpaa_fq_init()
1034 qm_fqd_set_destwq(&initfq.fqd, dpaa_fq->channel, dpaa_fq->wq); in dpaa_fq_init()
1042 if (dpaa_fq->fq_type == FQ_TYPE_TX || in dpaa_fq_init()
1043 dpaa_fq->fq_type == FQ_TYPE_TX_CONFIRM || in dpaa_fq_init()
1044 dpaa_fq->fq_type == FQ_TYPE_TX_CONF_MQ) { in dpaa_fq_init()
1071 if (dpaa_fq->fq_type == FQ_TYPE_TX) { in dpaa_fq_init()
1072 queue_id = dpaa_tx_fq_to_id(priv, &dpaa_fq->fq_base); in dpaa_fq_init()
1092 (dpaa_fq->fq_type == FQ_TYPE_RX_DEFAULT || in dpaa_fq_init()
1093 dpaa_fq->fq_type == FQ_TYPE_RX_ERROR || in dpaa_fq_init()
1094 dpaa_fq->fq_type == FQ_TYPE_RX_PCD)) { in dpaa_fq_init()
1110 if (dpaa_fq->flags & QMAN_FQ_FLAG_NO_ENQUEUE) { in dpaa_fq_init()
1131 dpaa_fq->fqid = qman_fq_fqid(fq); in dpaa_fq_init()
1133 if (dpaa_fq->fq_type == FQ_TYPE_RX_DEFAULT || in dpaa_fq_init()
1134 dpaa_fq->fq_type == FQ_TYPE_RX_PCD) { in dpaa_fq_init()
1135 err = xdp_rxq_info_reg(&dpaa_fq->xdp_rxq, dpaa_fq->net_dev, in dpaa_fq_init()
1136 dpaa_fq->fqid, 0); in dpaa_fq_init()
1142 err = xdp_rxq_info_reg_mem_model(&dpaa_fq->xdp_rxq, in dpaa_fq_init()
1147 xdp_rxq_info_unreg(&dpaa_fq->xdp_rxq); in dpaa_fq_init()
1158 struct dpaa_fq *dpaa_fq; in dpaa_fq_free_entry() local
1163 dpaa_fq = container_of(fq, struct dpaa_fq, fq_base); in dpaa_fq_free_entry()
1164 priv = netdev_priv(dpaa_fq->net_dev); in dpaa_fq_free_entry()
1166 if (dpaa_fq->init) { in dpaa_fq_free_entry()
1181 if ((dpaa_fq->fq_type == FQ_TYPE_RX_DEFAULT || in dpaa_fq_free_entry()
1182 dpaa_fq->fq_type == FQ_TYPE_RX_PCD) && in dpaa_fq_free_entry()
1183 xdp_rxq_info_is_reg(&dpaa_fq->xdp_rxq)) in dpaa_fq_free_entry()
1184 xdp_rxq_info_unreg(&dpaa_fq->xdp_rxq); in dpaa_fq_free_entry()
1187 list_del(&dpaa_fq->list); in dpaa_fq_free_entry()
1194 struct dpaa_fq *dpaa_fq, *tmp; in dpaa_fq_free() local
1198 list_for_each_entry_safe(dpaa_fq, tmp, list, list) { in dpaa_fq_free()
1199 error = dpaa_fq_free_entry(dev, (struct qman_fq *)dpaa_fq); in dpaa_fq_free()
1207 static int dpaa_eth_init_tx_port(struct fman_port *port, struct dpaa_fq *errq, in dpaa_eth_init_tx_port()
1208 struct dpaa_fq *defq, in dpaa_eth_init_tx_port()
1248 struct dpaa_fq *errq, in dpaa_eth_init_rx_port()
1249 struct dpaa_fq *defq, struct dpaa_fq *pcdq, in dpaa_eth_init_rx_port()
2455 struct dpaa_fq *dpaa_fq = container_of(fq, struct dpaa_fq, fq_base); in rx_error_dqrr() local
2461 net_dev = dpaa_fq->net_dev; in rx_error_dqrr()
2552 struct dpaa_fq *dpaa_fq, unsigned int *xdp_meta_len) in dpaa_run_xdp() argument
2566 &dpaa_fq->xdp_rxq); in dpaa_run_xdp()
2658 struct dpaa_fq *dpaa_fq; in rx_default_dqrr() local
2667 dpaa_fq = container_of(fq, struct dpaa_fq, fq_base); in rx_default_dqrr()
2670 net_dev = dpaa_fq->net_dev; in rx_default_dqrr()
2740 dpaa_fq, &xdp_meta_len); in rx_default_dqrr()
2808 net_dev = ((struct dpaa_fq *)fq)->net_dev; in conf_error_dqrr()
2830 net_dev = ((struct dpaa_fq *)fq)->net_dev; in conf_dflt_dqrr()
2856 net_dev = ((struct dpaa_fq *)fq)->net_dev; in egress_ern()
3312 struct dpaa_fq *dpaa_fq, *tmp; in dpaa_eth_probe() local
3467 list_for_each_entry_safe(dpaa_fq, tmp, &priv->dpaa_fq_list, list) { in dpaa_eth_probe()
3468 err = dpaa_fq_init(dpaa_fq, false); in dpaa_eth_probe()