]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/spdk/dpdk/app/test/test_event_eth_tx_adapter.c
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / spdk / dpdk / app / test / test_event_eth_tx_adapter.c
index c26c5152c2a4b9a4e59d7edca78da11075bf1f69..3af749280a0e2bc31062c156f590fb06d2a84da4 100644 (file)
@@ -84,8 +84,10 @@ port_init_common(uint8_t port, const struct rte_eth_conf *port_conf,
                return retval;
 
        /* Display the port MAC address. */
-       struct ether_addr addr;
-       rte_eth_macaddr_get(port, &addr);
+       struct rte_ether_addr addr;
+       retval = rte_eth_macaddr_get(port, &addr);
+       if (retval < 0)
+               return retval;
        printf("Port %u MAC: %02" PRIx8 " %02" PRIx8 " %02" PRIx8
                           " %02" PRIx8 " %02" PRIx8 " %02" PRIx8 "\n",
                        (unsigned int)port,
@@ -94,7 +96,9 @@ port_init_common(uint8_t port, const struct rte_eth_conf *port_conf,
                        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;
 }