MCPcopy Create free account
hub / github.com/F-Stack/f-stack / sfc_tx_fini_queues

Function sfc_tx_fini_queues

dpdk/drivers/net/sfc/sfc_tx.c:356–380  ·  view source on GitHub ↗

* Destroy excess queues that are no longer needed after reconfiguration * or complete close. */

Source from the content-addressed store, hash-verified

354 * or complete close.
355 */
356static void
357sfc_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
382int
383sfc_tx_configure(struct sfc_adapter *sa)

Callers 2

sfc_tx_configureFunction · 0.85
sfc_tx_closeFunction · 0.85

Calls 4

sfc_sa2sharedFunction · 0.85
sfc_tx_qfiniFunction · 0.85

Tested by

no test coverage detected