if (ret == 0)
printf("\t -- mtu (%d)\n", mtu);
- rte_eth_dev_info_get(i, &dev_info);
+ ret = rte_eth_dev_info_get(i, &dev_info);
+ if (ret != 0) {
+ printf("Error during getting device (port %u) info: %s\n",
+ i, strerror(-ret));
+ return;
+ }
printf(" - queue\n");
for (j = 0; j < dev_info.nb_rx_queues; j++) {
memset(&cap, 0, sizeof(cap));
memset(&error, 0, sizeof(error));
- rte_eth_dev_info_get(i, &dev_info);
+ ret = rte_eth_dev_info_get(i, &dev_info);
+ if (ret != 0) {
+ printf("Error during getting device (port %u) info: %s\n",
+ i, strerror(-ret));
+ return;
+ }
+
printf(" - Generic for port (%u)\n"
"\t -- driver name %s\n"
"\t -- max vf (%u)\n"
perf_ethdev_setup(struct evt_test *test, struct evt_options *opt)
{
uint16_t i;
+ int ret;
struct test_perf *t = evt_test_priv(test);
struct rte_eth_conf port_conf = {
.rxmode = {
struct rte_eth_dev_info dev_info;
struct rte_eth_conf local_port_conf = port_conf;
- rte_eth_dev_info_get(i, &dev_info);
+ ret = rte_eth_dev_info_get(i, &dev_info);
+ if (ret != 0) {
+ evt_err("Error during getting device (port %u) info: %s\n",
+ i, strerror(-ret));
+ return ret;
+ }
local_port_conf.rx_adv_conf.rss_conf.rss_hf &=
dev_info.flow_type_rss_offloads;
pipeline_ethdev_setup(struct evt_test *test, struct evt_options *opt)
{
uint16_t i;
+ int ret;
uint8_t nb_queues = 1;
struct test_pipeline *t = evt_test_priv(test);
struct rte_eth_rxconf rx_conf;
if (!(caps & RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT))
t->internal_port = 0;
- rte_eth_dev_info_get(i, &dev_info);
+ ret = rte_eth_dev_info_get(i, &dev_info);
+ if (ret != 0) {
+ evt_err("Error during getting device (port %u) info: %s\n",
+ i, strerror(-ret));
+ return ret;
+ }
+
rx_conf = dev_info.default_rxconf;
rx_conf.offloads = port_conf.rxmode.offloads;
retval = rte_eth_dev_configure(port, 0, 0, port_conf);
- rte_eth_dev_info_get(port, &dev_info);
+ retval = rte_eth_dev_info_get(port, &dev_info);
+ if (retval != 0)
+ return retval;
default_params.rx_rings = RTE_MIN(dev_info.max_rx_queues,
MAX_NUM_RX_QUEUE);
memset(&info, 0, sizeof(info));
memset(&ops, 0, sizeof(ops));
- rte_eth_dev_info_get(port_id, &info);
+ ret = rte_eth_dev_info_get(port_id, &info);
+ if (ret != 0) {
+ printf("Error during getting device (port %u) info: %s\n",
+ port_id, strerror(-ret));
+ return -1;
+ }
+
if (info.device)
bus = rte_bus_find_by_device(info.device);
if (bus && !strcmp(bus->name, "pci")) {
memset(&info, 0, sizeof(info));
memset(&conf, 0, sizeof(conf));
memset(&ops, 0, sizeof(ops));
- rte_eth_dev_info_get(port_id, &info);
+
+ ret = rte_eth_dev_info_get(port_id, &info);
+ if (ret != 0) {
+ printf("Error during getting device (port %u) info: %s\n",
+ port_id, strerror(-ret));
+ return -1;
+ }
+
if (info.device)
bus = rte_bus_find_by_device(info.device);
else
memset(&conf, 0, sizeof(conf));
memset(&info, 0, sizeof(info));
memset(&ops, 0, sizeof(ops));
- rte_eth_dev_info_get(port_id, &info);
+
+ ret = rte_eth_dev_info_get(port_id, &info);
+ if (ret != 0) {
+ printf("Error during getting device (port %u) info: %s\n",
+ port_id, strerror(-ret));
+ ret = -1;
+ goto fail;
+ }
+
if (info.device)
bus = rte_bus_find_by_device(info.device);
else
uint64_t rss_hf = 0;
uint64_t default_rss_hf = 0;
- rte_eth_dev_info_get(test_params.bond_port_id, &test_params.bond_dev_info);
+ retval = rte_eth_dev_info_get(test_params.bond_port_id,
+ &test_params.bond_dev_info);
+ TEST_ASSERT((retval == 0),
+ "Error during getting device (port %u) info: %s\n",
+ test_params.bond_port_id, strerror(-retval));
/*
* Test hash function propagation
/**
* Configure bonding port in RSS mq mode
*/
+ int ret;
+
TEST_ASSERT_SUCCESS(configure_ethdev(test_params.bond_port_id,
&rss_pmd_conf, 0), "Failed to configure bonding device\n");
- rte_eth_dev_info_get(test_params.bond_port_id, &test_params.bond_dev_info);
+ ret = rte_eth_dev_info_get(test_params.bond_port_id,
+ &test_params.bond_dev_info);
+ TEST_ASSERT((ret == 0),
+ "Error during getting device (port %u) info: %s\n",
+ test_params.bond_port_id, strerror(-ret));
TEST_ASSERT_SUCCESS(bond_slaves(), "Bonding slaves failed");
static int
test_rss_lazy(void)
{
+ int ret;
+
TEST_ASSERT_SUCCESS(configure_ethdev(test_params.bond_port_id,
&default_pmd_conf, 0), "Failed to configure bonding device\n");
- rte_eth_dev_info_get(test_params.bond_port_id, &test_params.bond_dev_info);
+ ret = rte_eth_dev_info_get(test_params.bond_port_id,
+ &test_params.bond_dev_info);
+ TEST_ASSERT((ret == 0),
+ "Error during getting device (port %u) info: %s\n",
+ test_params.bond_port_id, strerror(-ret));
TEST_ASSERT_SUCCESS(bond_slaves(), "Bonding slaves failed");
rte_eth_dev_default_mac_addr_set(port->port_id, &mac_addr);
rte_eth_dev_info_get(port->port_id, &port->dev_info);
+ retval = rte_eth_dev_info_get(port->port_id, &port->dev_info);
+ TEST_ASSERT((retval == 0),
+ "Error during getting device (port %u) info: %s\n",
+ test_params.bond_port_id, strerror(-retval));
}
if (test_params.bond_port_id == INVALID_PORT_ID) {
TEST_ASSERT_SUCCESS(configure_ethdev(test_params.bond_port_id,
&default_pmd_conf, 0), "Failed to configure bonding device\n");
- rte_eth_dev_info_get(test_params.bond_port_id,
- &test_params.bond_dev_info);
+ retval = rte_eth_dev_info_get(test_params.bond_port_id,
+ &test_params.bond_dev_info);
+ TEST_ASSERT((retval == 0),
+ "Error during getting device (port %u) info: %s\n",
+ test_params.bond_port_id, strerror(-retval));
}
return TEST_SUCCESS;
test_command_line_ring_port(void)
{
int port, cmdl_port0 = -1;
+ int ret;
+
/* find a port created with the --vdev=net_ring0 command line option */
RTE_ETH_FOREACH_DEV(port) {
struct rte_eth_dev_info dev_info;
- rte_eth_dev_info_get(port, &dev_info);
+
+ ret = rte_eth_dev_info_get(port, &dev_info);
+ TEST_ASSERT((ret == 0),
+ "Error during getting device (port %d) info: %s\n",
+ port, strerror(-ret));
+
if (!strcmp(dev_info.driver_name, "Rings PMD")) {
printf("found a command line ring port=%d\n", port);
cmdl_port0 = port;