/* use master core for command line ? */
uint8_t interactive = 0;
uint8_t auto_start = 0;
+uint8_t tx_first;
char cmdline_filename[PATH_MAX] = {0};
/*
* NIC bypass mode configuration options.
*/
-#ifdef RTE_LIBRTE_IXGBE_BYPASS
+#if defined RTE_LIBRTE_IXGBE_PMD && defined RTE_LIBRTE_IXGBE_BYPASS
/* The NIC bypass watchdog timeout. */
uint32_t bypass_timeout = RTE_PMD_IXGBE_BYPASS_TMT_OFF;
#endif
/* Forward function declarations */
static void map_port_queue_stats_mapping_registers(uint8_t pi, struct rte_port *port);
static void check_all_ports_link_status(uint32_t port_mask);
-static void eth_event_callback(uint8_t port_id,
- enum rte_eth_event_type type,
- void *param);
+static int eth_event_callback(uint8_t port_id,
+ enum rte_eth_event_type type,
+ void *param, void *ret_param);
/*
* Check if all the ports are started.
static int all_ports_started(void);
/*
- * Helper function to check if socket is allready discovered.
+ * Helper function to check if socket is already discovered.
* If yes, return positive value. If not, return zero.
*/
int
else if (da->type == RTE_DEVTYPE_WHITELISTED_PCI)
rte_pci_device_name(&da->pci.addr, name, sizeof(name));
printf("removing device %s\n", name);
- rte_eal_dev_detach(name);
+ rte_eal_dev_detach(dev->device);
dev->state = RTE_ETH_DEV_UNUSED;
}
/* This function is used by the interrupt thread */
-static void
-eth_event_callback(uint8_t port_id, enum rte_eth_event_type type, void *param)
+static int
+eth_event_callback(uint8_t port_id, enum rte_eth_event_type type, void *param,
+ void *ret_param)
{
static const char * const event_desc[] = {
[RTE_ETH_EVENT_UNKNOWN] = "Unknown",
};
RTE_SET_USED(param);
+ RTE_SET_USED(ret_param);
if (type >= RTE_ETH_EVENT_MAX) {
fprintf(stderr, "\nPort %" PRIu8 ": %s called upon invalid event %d\n",
default:
break;
}
+ return 0;
}
static int
rte_eth_macaddr_get(pid, &port->eth_addr);
map_port_queue_stats_mapping_registers(pid, port);
-#ifdef RTE_LIBRTE_IXGBE_BYPASS
+#if defined RTE_LIBRTE_IXGBE_PMD && defined RTE_LIBRTE_IXGBE_BYPASS
rte_pmd_ixgbe_bypass_init(pid);
#endif
if (argc > 1)
launch_args_parse(argc, argv);
+ if (tx_first && interactive)
+ rte_exit(EXIT_FAILURE, "--tx-first cannot be used on "
+ "interactive mode.\n");
if (!nb_rxq && !nb_txq)
printf("Warning: Either rx or tx queues should be non-zero\n");
int rc;
printf("No commandline core given, start packet forwarding\n");
- start_packet_forwarding(0);
+ start_packet_forwarding(tx_first);
printf("Press enter to exit\n");
rc = read(0, &c, 1);
pmd_test_exit();