summaryrefslogtreecommitdiff
path: root/examples/vmdq
diff options
context:
space:
mode:
authorBruce Richardson <bruce.richardson@intel.com>2014-02-11 15:35:19 +0000
committerDavid Marchand <david.marchand@6wind.com>2014-02-26 10:47:59 +0100
commit13c4ebd65a77fae2d6c5a08a2a2f3498758b68d2 (patch)
tree8ea58d1bfd778e41c312bebcf7ac0a6356c86117 /examples/vmdq
parent3ce690d3d56dfd5cb3345185d4e02b75063186bb (diff)
downloaddpdk-13c4ebd65a77fae2d6c5a08a2a2f3498758b68d2.zip
dpdk-13c4ebd65a77fae2d6c5a08a2a2f3498758b68d2.tar.gz
dpdk-13c4ebd65a77fae2d6c5a08a2a2f3498758b68d2.tar.xz
examples: minor changes
A series of minor changes to example applications included in the Intel DPDK 1.6 release. * changes to NIC configuration flags, e.g. specifying RSS * replacing local "DIM" macro with common "RTE_DIM" macro * minor whitespace changes for alignment. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Diffstat (limited to 'examples/vmdq')
-rw-r--r--examples/vmdq/main.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/examples/vmdq/main.c b/examples/vmdq/main.c
index 6bd85c0..fac24aa 100644
--- a/examples/vmdq/main.c
+++ b/examples/vmdq/main.c
@@ -130,6 +130,7 @@ static const struct rte_eth_rxconf rx_conf_default = {
.hthresh = RX_HTHRESH,
.wthresh = RX_WTHRESH,
},
+ .rx_drop_en = 1,
};
/*
@@ -472,7 +473,7 @@ sighup_handler(int signum)
* Main thread that does the work, reading from INPUT_PORT
* and writing to OUTPUT_PORT
*/
-static __attribute__((noreturn)) int
+static int
lcore_main(__attribute__((__unused__)) void* dummy)
{
const uint16_t lcore_id = (uint16_t)rte_lcore_id();
@@ -504,6 +505,11 @@ lcore_main(__attribute__((__unused__)) void* dummy)
printf("core %u(lcore %u) reading queues %i-%i\n", (unsigned)core_id,
(unsigned)lcore_id, startQueue, endQueue - 1);
+ if (startQueue == endQueue) {
+ printf("lcore %u has nothing to do\n", lcore_id);
+ return (0);
+ }
+
for (;;) {
struct rte_mbuf *buf[MAX_PKT_BURST];
const uint16_t buf_size = sizeof(buf) / sizeof(buf[0]);