printf("# Initialising port %u... ", port);
fflush(stdout);
- rte_eth_dev_info_get(port, &info);
+ retval = rte_eth_dev_info_get(port, &info);
+ if (retval != 0) {
+ printf("Error during getting device (port %u) info: %s\n",
+ port, strerror(-retval));
+ return retval;
+ }
+
info.default_rxconf.rx_drop_en = 1;
if (info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
assign_ports_to_cores(void)
{
- const unsigned lcores = rte_eal_get_configuration()->lcore_count;
+ const unsigned int lcores = rte_lcore_count();
const unsigned port_pairs = num_ports / 2;
const unsigned pairs_per_lcore = port_pairs / lcores;
unsigned extra_pairs = port_pairs % lcores;