git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net: add rte prefix to ether defines
[dpdk.git]
/
examples
/
eventdev_pipeline
/
main.c
diff --git
a/examples/eventdev_pipeline/main.c
b/examples/eventdev_pipeline/main.c
index
92e08bc
..
f4e57f5
100644
(file)
--- a/
examples/eventdev_pipeline/main.c
+++ b/
examples/eventdev_pipeline/main.c
@@
-253,7
+253,7
@@
port_init(uint8_t port, struct rte_mempool *mbuf_pool)
static const struct rte_eth_conf port_conf_default = {
.rxmode = {
.mq_mode = ETH_MQ_RX_RSS,
static const struct rte_eth_conf port_conf_default = {
.rxmode = {
.mq_mode = ETH_MQ_RX_RSS,
- .max_rx_pkt_len = ETHER_MAX_LEN,
+ .max_rx_pkt_len =
RTE_
ETHER_MAX_LEN,
},
.rx_adv_conf = {
.rss_conf = {
},
.rx_adv_conf = {
.rss_conf = {
@@
-316,13
+316,8
@@
port_init(uint8_t port, struct rte_mempool *mbuf_pool)
return retval;
}
return retval;
}
- /* Start the Ethernet port. */
- retval = rte_eth_dev_start(port);
- if (retval < 0)
- return retval;
-
/* Display the port MAC address. */
/* Display the port MAC address. */
- struct ether_addr addr;
+ struct
rte_
ether_addr addr;
rte_eth_macaddr_get(port, &addr);
printf("Port %u MAC: %02" PRIx8 " %02" PRIx8 " %02" PRIx8
" %02" PRIx8 " %02" PRIx8 " %02" PRIx8 "\n",
rte_eth_macaddr_get(port, &addr);
printf("Port %u MAC: %02" PRIx8 " %02" PRIx8 " %02" PRIx8
" %02" PRIx8 " %02" PRIx8 " %02" PRIx8 "\n",
@@
-421,6
+416,7
@@
signal_handler(int signum)
rte_eth_dev_close(portid);
}
rte_eth_dev_close(portid);
}
+ rte_event_dev_stop(0);
rte_event_dev_close(0);
}
if (signum == SIGTSTP)
rte_event_dev_close(0);
}
if (signum == SIGTSTP)
@@
-440,6
+436,7
@@
main(int argc, char **argv)
{
struct worker_data *worker_data;
uint16_t num_ports;
{
struct worker_data *worker_data;
uint16_t num_ports;
+ uint16_t portid;
int lcore_id;
int err;
int lcore_id;
int err;
@@
-507,6
+504,14
@@
main(int argc, char **argv)
init_ports(num_ports);
fdata->cap.adptr_setup(num_ports);
init_ports(num_ports);
fdata->cap.adptr_setup(num_ports);
+ /* Start the Ethernet port. */
+ RTE_ETH_FOREACH_DEV(portid) {
+ err = rte_eth_dev_start(portid);
+ if (err < 0)
+ rte_exit(EXIT_FAILURE, "Error starting ethdev %d\n",
+ portid);
+ }
+
int worker_idx = 0;
RTE_LCORE_FOREACH_SLAVE(lcore_id) {
if (lcore_id >= MAX_NUM_CORE)
int worker_idx = 0;
RTE_LCORE_FOREACH_SLAVE(lcore_id) {
if (lcore_id >= MAX_NUM_CORE)