/* Chech if offload couldn't be disabled. */
if (offload & set_offloads) {
RTE_ETHDEV_LOG(DEBUG,
- "Port %u failed to disable %s offload %s\n",
+ "Port %u %s offload %s is not requested but enabled\n",
port_id, offload_type, offload_name(offload));
}
* Copy the dev_conf parameter into the dev structure.
* rte_eth_dev_info_get() requires dev_conf, copy it before dev_info get
*/
- memcpy(&dev->data->dev_conf, dev_conf, sizeof(dev->data->dev_conf));
+ if (dev_conf != &dev->data->dev_conf)
+ memcpy(&dev->data->dev_conf, dev_conf,
+ sizeof(dev->data->dev_conf));
ret = rte_eth_dev_info_get(port_id, &dev_info);
if (ret != 0)
return eth_err(port_id, diag);
}
+ /* Maximum number of queues should be <= RTE_MAX_QUEUES_PER_PORT */
+ dev_info->max_rx_queues = RTE_MIN(dev_info->max_rx_queues,
+ RTE_MAX_QUEUES_PER_PORT);
+ dev_info->max_tx_queues = RTE_MIN(dev_info->max_tx_queues,
+ RTE_MAX_QUEUES_PER_PORT);
+
dev_info->driver_name = dev->device->driver->name;
dev_info->nb_rx_queues = dev->data->nb_rx_queues;
dev_info->nb_tx_queues = dev->data->nb_tx_queues;