diff options
author | 2017-07-03 15:11:03 +0100 | |
---|---|---|
committer | 2017-07-03 15:13:07 +0100 | |
commit | bf7567fd2a5b0b28ab724046143c24561d38d015 (patch) | |
tree | d3fecf7bb6da55e6ee81f8d42110bd51c6e93631 /drivers/net/ark/ark_ethdev.c | |
parent | 7595afa4d30097c1177b69257118d8ad89a539be (diff) |
New upstream version 17.05.1
Change-Id: I8a23679edd6c9c593ceebecf7d2bf1b489e14ccb
Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
Diffstat (limited to 'drivers/net/ark/ark_ethdev.c')
-rw-r--r-- | drivers/net/ark/ark_ethdev.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/drivers/net/ark/ark_ethdev.c b/drivers/net/ark/ark_ethdev.c index 995c93d3..017817e2 100644 --- a/drivers/net/ark/ark_ethdev.c +++ b/drivers/net/ark/ark_ethdev.c @@ -516,11 +516,7 @@ eth_ark_dev_uninit(struct rte_eth_dev *dev) dev->dev_ops = NULL; dev->rx_pkt_burst = NULL; dev->tx_pkt_burst = NULL; - if (dev->data->mac_addrs) - rte_free(dev->data->mac_addrs); - if (dev->data) - rte_free(dev->data); - + rte_free(dev->data->mac_addrs); return 0; } @@ -588,7 +584,11 @@ eth_ark_dev_start(struct rte_eth_dev *dev) /* Delay packet generatpr start allow the hardware to be ready * This is only used for sanity checking with internal generator */ - pthread_create(&thread, NULL, delay_pg_start, ark); + if (pthread_create(&thread, NULL, delay_pg_start, ark)) { + PMD_DRV_LOG(ERR, "Could not create pktgen " + "starter thread\n"); + return -1; + } } if (ark->user_ext.dev_start) @@ -899,6 +899,12 @@ process_file_args(const char *key, const char *value, void *extra_args) int size = 0; int first = 1; + if (file == NULL) { + PMD_DRV_LOG(ERR, "Unable to open " + "config file %s\n", value); + return -1; + } + while (fgets(line, sizeof(line), file)) { size += strlen(line); if (size >= ARK_MAX_ARG_LEN) { |