summaryrefslogtreecommitdiff
path: root/examples/skeleton
diff options
context:
space:
mode:
authorIvan Ilchenko <ivan.ilchenko@oktetlabs.ru>2019-09-14 12:37:33 +0100
committerFerruh Yigit <ferruh.yigit@intel.com>2019-10-07 15:00:54 +0200
commitf430bbcecf3eed93916f45654f51dd19d6955aa2 (patch)
tree6f3d4fa543270b06044f7a5da747bcf3cc3b0459 /examples/skeleton
parent70e51a0ea2e00d369508a6b08a272118c857031e (diff)
downloaddpdk-f430bbcecf3eed93916f45654f51dd19d6955aa2.zip
dpdk-f430bbcecf3eed93916f45654f51dd19d6955aa2.tar.gz
dpdk-f430bbcecf3eed93916f45654f51dd19d6955aa2.tar.xz
examples: take promiscuous mode switch result into account
rte_eth_promiscuous_enable()/rte_eth_promiscuous_disable() return value was changed from void to int, so this patch modify usage of these functions across examples according to new return type. Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Diffstat (limited to 'examples/skeleton')
-rw-r--r--examples/skeleton/basicfwd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/skeleton/basicfwd.c b/examples/skeleton/basicfwd.c
index 171ebde..8f1805a 100644
--- a/examples/skeleton/basicfwd.c
+++ b/examples/skeleton/basicfwd.c
@@ -98,7 +98,9 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
addr.addr_bytes[4], addr.addr_bytes[5]);
/* Enable RX in promiscuous mode for the Ethernet device. */
- rte_eth_promiscuous_enable(port);
+ retval = rte_eth_promiscuous_enable(port);
+ if (retval != 0)
+ return retval;
return 0;
}