+ /*
+ * Allocate primary process only TxQ control from heap
+ * since it should not be shared.
+ */
+ rc = ENOMEM;
+ sa->txq_ctrl = calloc(nb_txq_total, sizeof(sa->txq_ctrl[0]));
+ if (sa->txq_ctrl == NULL)
+ goto fail_txqs_ctrl_alloc;
+ } else {
+ struct sfc_txq_info *new_txq_info;
+ struct sfc_txq *new_txq_ctrl;
+
+ reconfigure = true;
+
+ if (nb_tx_queues < sas->ethdev_txq_count)
+ sfc_tx_fini_queues(sa, nb_tx_queues);
+
+ new_txq_info =
+ rte_realloc(sas->txq_info,
+ nb_txq_total * sizeof(sas->txq_info[0]), 0);
+ if (new_txq_info == NULL && nb_txq_total > 0)
+ goto fail_txqs_realloc;
+
+ new_txq_ctrl = realloc(sa->txq_ctrl,
+ nb_txq_total * sizeof(sa->txq_ctrl[0]));
+ if (new_txq_ctrl == NULL && nb_txq_total > 0)
+ goto fail_txqs_ctrl_realloc;
+
+ sas->txq_info = new_txq_info;
+ sa->txq_ctrl = new_txq_ctrl;
+ if (nb_txq_total > sas->txq_count) {
+ memset(&sas->txq_info[sas->txq_count], 0,
+ (nb_txq_total - sas->txq_count) *
+ sizeof(sas->txq_info[0]));
+ memset(&sa->txq_ctrl[sas->txq_count], 0,
+ (nb_txq_total - sas->txq_count) *
+ sizeof(sa->txq_ctrl[0]));
+ }
+ }
+
+ while (sas->ethdev_txq_count < nb_tx_queues) {
+ sfc_sw_index_t sw_index;
+
+ sw_index = sfc_txq_sw_index_by_ethdev_tx_qid(sas,
+ sas->ethdev_txq_count);