summaryrefslogtreecommitdiff
path: root/examples/ip_fragmentation
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/ip_fragmentation
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/ip_fragmentation')
-rw-r--r--examples/ip_fragmentation/main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/ip_fragmentation/main.c b/examples/ip_fragmentation/main.c
index 6b83244..70139ee 100644
--- a/examples/ip_fragmentation/main.c
+++ b/examples/ip_fragmentation/main.c
@@ -1038,7 +1038,11 @@ main(int argc, char **argv)
rte_exit(EXIT_FAILURE, "rte_eth_dev_start: err=%d, port=%d\n",
ret, portid);
- rte_eth_promiscuous_enable(portid);
+ ret = rte_eth_promiscuous_enable(portid);
+ if (ret != 0)
+ rte_exit(EXIT_FAILURE,
+ "rte_eth_promiscuous_enable: err=%s, port=%d\n",
+ rte_strerror(-ret), portid);
if (check_ptype(portid) == 0) {
rte_eth_add_rx_callback(portid, 0, cb_parse_ptype, NULL);