* Destroy excess queues that are no longer needed after reconfiguration * or complete close. */
| 354 | * or complete close. |
| 355 | */ |
| 356 | static void |
| 357 | sfc_tx_fini_queues(struct sfc_adapter *sa, unsigned int nb_tx_queues) |
| 358 | { |
| 359 | struct sfc_adapter_shared * const sas = sfc_sa2shared(sa); |
| 360 | sfc_sw_index_t sw_index; |
| 361 | sfc_ethdev_qid_t ethdev_qid; |
| 362 | |
| 363 | SFC_ASSERT(nb_tx_queues <= sas->ethdev_txq_count); |
| 364 | |
| 365 | /* |
| 366 | * Finalize only ethdev queues since other ones are finalized only |
| 367 | * on device close and they may require additional deinitialization. |
| 368 | */ |
| 369 | ethdev_qid = sas->ethdev_txq_count; |
| 370 | while (--ethdev_qid >= (int)nb_tx_queues) { |
| 371 | struct sfc_txq_info *txq_info; |
| 372 | |
| 373 | sw_index = sfc_txq_sw_index_by_ethdev_tx_qid(sas, ethdev_qid); |
| 374 | txq_info = sfc_txq_info_by_ethdev_qid(sas, ethdev_qid); |
| 375 | if (txq_info->state & SFC_TXQ_INITIALIZED) |
| 376 | sfc_tx_qfini(sa, sw_index); |
| 377 | } |
| 378 | |
| 379 | sas->ethdev_txq_count = nb_tx_queues; |
| 380 | } |
| 381 | |
| 382 | int |
| 383 | sfc_tx_configure(struct sfc_adapter *sa) |
no test coverage detected