]> git.droids-corp.org - dpdk.git/blobdiff - examples/ipsec-secgw/ipsec-secgw.c
examples/ipsec-secgw: check status of getting ethdev info
[dpdk.git] / examples / ipsec-secgw / ipsec-secgw.c
index 345c8e51b11822a367ec1a1a6070cd3cddc72194..5ed41312eb5c7d4d3668508e874e2130e74e69bd 100644 (file)
@@ -1914,7 +1914,11 @@ port_init(uint16_t portid, uint64_t req_rx_offloads, uint64_t req_tx_offloads)
        struct rte_ether_addr ethaddr;
        struct rte_eth_conf local_port_conf = port_conf;
 
-       rte_eth_dev_info_get(portid, &dev_info);
+       ret = rte_eth_dev_info_get(portid, &dev_info);
+       if (ret != 0)
+               rte_exit(EXIT_FAILURE,
+                       "Error during getting device (port %u) info: %s\n",
+                       portid, strerror(-ret));
 
        /* limit allowed HW offloafs, as user requested */
        dev_info.rx_offload_capa &= dev_rx_offload;