| 4097 | } |
| 4098 | |
| 4099 | static void |
| 4100 | rxtx_port_config(portid_t pid) |
| 4101 | { |
| 4102 | uint16_t qid; |
| 4103 | uint64_t offloads; |
| 4104 | struct rte_port *port = &ports[pid]; |
| 4105 | |
| 4106 | for (qid = 0; qid < nb_rxq; qid++) { |
| 4107 | offloads = port->rxq[qid].conf.offloads; |
| 4108 | port->rxq[qid].conf = port->dev_info.default_rxconf; |
| 4109 | |
| 4110 | if (rxq_share > 0 && |
| 4111 | (port->dev_info.dev_capa & RTE_ETH_DEV_CAPA_RXQ_SHARE)) { |
| 4112 | /* Non-zero share group to enable RxQ share. */ |
| 4113 | port->rxq[qid].conf.share_group = pid / rxq_share + 1; |
| 4114 | port->rxq[qid].conf.share_qid = qid; /* Equal mapping. */ |
| 4115 | } |
| 4116 | |
| 4117 | if (offloads != 0) |
| 4118 | port->rxq[qid].conf.offloads = offloads; |
| 4119 | |
| 4120 | /* Check if any Rx parameters have been passed */ |
| 4121 | if (rx_pthresh != RTE_PMD_PARAM_UNSET) |
| 4122 | port->rxq[qid].conf.rx_thresh.pthresh = rx_pthresh; |
| 4123 | |
| 4124 | if (rx_hthresh != RTE_PMD_PARAM_UNSET) |
| 4125 | port->rxq[qid].conf.rx_thresh.hthresh = rx_hthresh; |
| 4126 | |
| 4127 | if (rx_wthresh != RTE_PMD_PARAM_UNSET) |
| 4128 | port->rxq[qid].conf.rx_thresh.wthresh = rx_wthresh; |
| 4129 | |
| 4130 | if (rx_free_thresh != RTE_PMD_PARAM_UNSET) |
| 4131 | port->rxq[qid].conf.rx_free_thresh = rx_free_thresh; |
| 4132 | |
| 4133 | if (rx_drop_en != RTE_PMD_PARAM_UNSET) |
| 4134 | port->rxq[qid].conf.rx_drop_en = rx_drop_en; |
| 4135 | |
| 4136 | port->nb_rx_desc[qid] = nb_rxd; |
| 4137 | } |
| 4138 | |
| 4139 | for (qid = 0; qid < nb_txq; qid++) { |
| 4140 | offloads = port->txq[qid].conf.offloads; |
| 4141 | port->txq[qid].conf = port->dev_info.default_txconf; |
| 4142 | if (offloads != 0) |
| 4143 | port->txq[qid].conf.offloads = offloads; |
| 4144 | |
| 4145 | /* Check if any Tx parameters have been passed */ |
| 4146 | if (tx_pthresh != RTE_PMD_PARAM_UNSET) |
| 4147 | port->txq[qid].conf.tx_thresh.pthresh = tx_pthresh; |
| 4148 | |
| 4149 | if (tx_hthresh != RTE_PMD_PARAM_UNSET) |
| 4150 | port->txq[qid].conf.tx_thresh.hthresh = tx_hthresh; |
| 4151 | |
| 4152 | if (tx_wthresh != RTE_PMD_PARAM_UNSET) |
| 4153 | port->txq[qid].conf.tx_thresh.wthresh = tx_wthresh; |
| 4154 | |
| 4155 | if (tx_rs_thresh != RTE_PMD_PARAM_UNSET) |
| 4156 | port->txq[qid].conf.tx_rs_thresh = tx_rs_thresh; |
no outgoing calls
no test coverage detected