summaryrefslogtreecommitdiff
path: root/examples/l3fwd
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/l3fwd
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/l3fwd')
-rw-r--r--examples/l3fwd/main.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c
index 3294ac2..9ed495e 100644
--- a/examples/l3fwd/main.c
+++ b/examples/l3fwd/main.c
@@ -1035,8 +1035,13 @@ main(int argc, char **argv)
* to itself through 2 cross-connected ports of the
* target machine.
*/
- if (promiscuous_on)
- rte_eth_promiscuous_enable(portid);
+ if (promiscuous_on) {
+ ret = rte_eth_promiscuous_enable(portid);
+ if (ret != 0)
+ rte_exit(EXIT_FAILURE,
+ "rte_eth_promiscuous_enable: err=%s, port=%u\n",
+ rte_strerror(-ret), portid);
+ }
}
printf("\n");