X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_ethdev%2Frte_ethdev.c;h=6e9cb243ea8088e946e771ee58ff8abe4a12706d;hb=a09f61159ad0f4449a61c6325eb5bda4be1bb5cd;hp=c43f9f5d141f1eec60ca62673ca1ca64f43958ce;hpb=dc258e4ab9115fbc98405dc0dc19c1912e2968aa;p=dpdk.git diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c index c43f9f5d14..6e9cb243ea 100644 --- a/lib/librte_ethdev/rte_ethdev.c +++ b/lib/librte_ethdev/rte_ethdev.c @@ -1204,8 +1204,8 @@ validate_offloads(uint16_t port_id, uint64_t req_offloads, /* Chech if offload couldn't be disabled. */ if (offload & set_offloads) { - RTE_ETHDEV_LOG(INFO, - "Port %u failed to disable %s offload %s\n", + RTE_ETHDEV_LOG(DEBUG, + "Port %u %s offload %s is not requested but enabled\n", port_id, offload_type, offload_name(offload)); } @@ -1245,7 +1245,9 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q, * 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) @@ -1404,7 +1406,7 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q, if (((dev_conf->rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG) == 0) && (dev_conf->rxmode.offloads & DEV_RX_OFFLOAD_RSS_HASH)) { RTE_ETHDEV_LOG(ERR, - "Ethdev port_id=%u config invalid Rx mq_mode without RSS but %s offload is requested", + "Ethdev port_id=%u config invalid Rx mq_mode without RSS but %s offload is requested\n", port_id, rte_eth_dev_rx_offload_name(DEV_RX_OFFLOAD_RSS_HASH)); ret = -EINVAL; @@ -2984,6 +2986,12 @@ rte_eth_dev_info_get(uint16_t port_id, struct rte_eth_dev_info *dev_info) 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;