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
examples/ipsec-secgw: add check for unprotected port mask
[dpdk.git]
/
examples
/
l2fwd-event
/
l2fwd_poll.c
diff --git
a/examples/l2fwd-event/l2fwd_poll.c
b/examples/l2fwd-event/l2fwd_poll.c
index
cc96b14
..
73fefac
100644
(file)
--- a/
examples/l2fwd-event/l2fwd_poll.c
+++ b/
examples/l2fwd-event/l2fwd_poll.c
@@
-1,3
+1,7
@@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(C) 2019 Marvell International Ltd.
+ */
+
#include "l2fwd_poll.h"
static inline void
#include "l2fwd_poll.h"
static inline void
@@
-57,6
+61,7
@@
l2fwd_poll_main_loop(struct l2fwd_resources *rsrc)
while (!rsrc->force_quit) {
while (!rsrc->force_quit) {
+ /* Draining TX queue in main loop. 8< */
cur_tsc = rte_rdtsc();
/*
cur_tsc = rte_rdtsc();
/*
@@
-75,10
+80,11
@@
l2fwd_poll_main_loop(struct l2fwd_resources *rsrc)
prev_tsc = cur_tsc;
}
prev_tsc = cur_tsc;
}
+ /* >8 End of draining TX queue in main loop. */
- /*
- * Read packet from RX queues
- */
+ /*
Reading ingress packets. 8< */
+
+
/* Read packet from RX queues
*/
for (i = 0; i < qconf->n_rx_port; i++) {
port_id = qconf->rx_port_list[i];
for (i = 0; i < qconf->n_rx_port; i++) {
port_id = qconf->rx_port_list[i];
@@
-93,6
+99,7
@@
l2fwd_poll_main_loop(struct l2fwd_resources *rsrc)
l2fwd_poll_simple_forward(rsrc, m, port_id);
}
}
l2fwd_poll_simple_forward(rsrc, m, port_id);
}
}
+ /* >8 End of reading ingress packets. */
}
}
}
}
@@
-112,6
+119,7
@@
l2fwd_poll_lcore_config(struct l2fwd_resources *rsrc)
/* get the lcore_id for this port */
while (rte_lcore_is_enabled(rx_lcore_id) == 0 ||
/* get the lcore_id for this port */
while (rte_lcore_is_enabled(rx_lcore_id) == 0 ||
+ rx_lcore_id == rte_get_main_lcore() ||
poll_rsrc->lcore_queue_conf[rx_lcore_id].n_rx_port ==
rsrc->rx_queue_per_lcore) {
rx_lcore_id++;
poll_rsrc->lcore_queue_conf[rx_lcore_id].n_rx_port ==
rsrc->rx_queue_per_lcore) {
rx_lcore_id++;