+ /*
+ * Allocate primary process only TxQ control from heap
+ * since it should not be shared.
+ */
+ rc = ENOMEM;
+ sa->txq_ctrl = calloc(nb_tx_queues, 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;
+
+ if (nb_tx_queues < sas->txq_count)
+ sfc_tx_fini_queues(sa, nb_tx_queues);
+
+ new_txq_info =
+ rte_realloc(sas->txq_info,
+ nb_tx_queues * sizeof(sas->txq_info[0]), 0);
+ if (new_txq_info == NULL && nb_tx_queues > 0)
+ goto fail_txqs_realloc;
+
+ new_txq_ctrl = realloc(sa->txq_ctrl,
+ nb_tx_queues * sizeof(sa->txq_ctrl[0]));
+ if (new_txq_ctrl == NULL && nb_tx_queues > 0)
+ goto fail_txqs_ctrl_realloc;
+
+ sas->txq_info = new_txq_info;
+ sa->txq_ctrl = new_txq_ctrl;
+ if (nb_tx_queues > sas->txq_count) {
+ memset(&sas->txq_info[sas->txq_count], 0,
+ (nb_tx_queues - sas->txq_count) *
+ sizeof(sas->txq_info[0]));
+ memset(&sa->txq_ctrl[sas->txq_count], 0,
+ (nb_tx_queues - sas->txq_count) *
+ sizeof(sa->txq_ctrl[0]));
+ }
+ }
+
+ while (sas->txq_count < nb_tx_queues) {
+ rc = sfc_tx_qinit_info(sa, sas->txq_count);