#define IAVF_MAX_NUM_QUEUES_DFLT 16
#define IAVF_MAX_NUM_QUEUES_LV 256
+#define IAVF_CFG_Q_NUM_PER_BUF 32
#define IAVF_NUM_MACADDR_MAX 64
int iavf_disable_queues(struct iavf_adapter *adapter);
int iavf_configure_rss_lut(struct iavf_adapter *adapter);
int iavf_configure_rss_key(struct iavf_adapter *adapter);
-int iavf_configure_queues(struct iavf_adapter *adapter);
+int iavf_configure_queues(struct iavf_adapter *adapter,
+ uint16_t num_queue_pairs, uint16_t index);
int iavf_get_supported_rxdid(struct iavf_adapter *adapter);
int iavf_config_irq_map(struct iavf_adapter *adapter);
void iavf_add_del_all_mac_addr(struct iavf_adapter *adapter, bool add);
IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
struct rte_intr_handle *intr_handle = dev->intr_handle;
+ uint16_t num_queue_pairs;
+ uint16_t index = 0;
PMD_INIT_FUNC_TRACE();
vf->max_pkt_len = dev->data->dev_conf.rxmode.max_rx_pkt_len;
vf->num_queue_pairs = RTE_MAX(dev->data->nb_rx_queues,
dev->data->nb_tx_queues);
+ num_queue_pairs = vf->num_queue_pairs;
if (iavf_init_queues(dev) != 0) {
PMD_DRV_LOG(ERR, "failed to do Queue init");
return -1;
}
- if (iavf_configure_queues(adapter) != 0) {
+ /* If needed, send configure queues msg multiple times to make the
+ * adminq buffer length smaller than the 4K limitation.
+ */
+ while (num_queue_pairs > IAVF_CFG_Q_NUM_PER_BUF) {
+ if (iavf_configure_queues(adapter,
+ IAVF_CFG_Q_NUM_PER_BUF, index) != 0) {
+ PMD_DRV_LOG(ERR, "configure queues failed");
+ goto err_queue;
+ }
+ num_queue_pairs -= IAVF_CFG_Q_NUM_PER_BUF;
+ index += IAVF_CFG_Q_NUM_PER_BUF;
+ }
+
+ if (iavf_configure_queues(adapter, num_queue_pairs, index) != 0) {
PMD_DRV_LOG(ERR, "configure queues failed");
goto err_queue;
}
}
int
-iavf_configure_queues(struct iavf_adapter *adapter)
+iavf_configure_queues(struct iavf_adapter *adapter,
+ uint16_t num_queue_pairs, uint16_t index)
{
struct iavf_rx_queue **rxq =
(struct iavf_rx_queue **)adapter->eth_dev->data->rx_queues;
int err;
size = sizeof(*vc_config) +
- sizeof(vc_config->qpair[0]) * vf->num_queue_pairs;
+ sizeof(vc_config->qpair[0]) * num_queue_pairs;
vc_config = rte_zmalloc("cfg_queue", size, 0);
if (!vc_config)
return -ENOMEM;
vc_config->vsi_id = vf->vsi_res->vsi_id;
- vc_config->num_queue_pairs = vf->num_queue_pairs;
+ vc_config->num_queue_pairs = num_queue_pairs;
- for (i = 0, vc_qp = vc_config->qpair;
- i < vf->num_queue_pairs;
+ for (i = index, vc_qp = vc_config->qpair;
+ i < index + num_queue_pairs;
i++, vc_qp++) {
vc_qp->txq.vsi_id = vf->vsi_res->vsi_id;
vc_qp->txq.queue_id = i;