diff options
author | Luca Boccassi <luca.boccassi@gmail.com> | 2018-11-01 11:59:50 +0000 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@gmail.com> | 2018-11-01 12:00:19 +0000 |
commit | 8d01b9cd70a67cdafd5b965a70420c3bd7fb3f82 (patch) | |
tree | 208e3bc33c220854d89d010e3abf720a2e62e546 /drivers/net/failsafe/failsafe.c | |
parent | b63264c8342e6a1b6971c79550d2af2024b6a4de (diff) |
New upstream version 18.11-rc1upstream/18.11-rc1
Change-Id: Iaa71986dd6332e878d8f4bf493101b2bbc6313bb
Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
Diffstat (limited to 'drivers/net/failsafe/failsafe.c')
-rw-r--r-- | drivers/net/failsafe/failsafe.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/net/failsafe/failsafe.c b/drivers/net/failsafe/failsafe.c index 657919f9..06e859e9 100644 --- a/drivers/net/failsafe/failsafe.c +++ b/drivers/net/failsafe/failsafe.c @@ -71,7 +71,7 @@ failsafe_hotplug_alarm_install(struct rte_eth_dev *dev) return -EINVAL; if (PRIV(dev)->pending_alarm) return 0; - ret = rte_eal_alarm_set(hotplug_poll * 1000, + ret = rte_eal_alarm_set(failsafe_hotplug_poll * 1000, fs_hotplug_alarm, dev); if (ret) { @@ -225,7 +225,7 @@ fs_eth_dev_create(struct rte_vdev_device *vdev) goto unregister_new_callback; } mac = &dev->data->mac_addrs[0]; - if (mac_from_arg) { + if (failsafe_mac_from_arg) { /* * If MAC address was provided as a parameter, * apply to all probed slaves. @@ -280,7 +280,8 @@ free_args: free_subs: fs_sub_device_free(dev); free_dev: - rte_free(PRIV(dev)); + /* mac_addrs must not be freed alone because part of dev_private */ + dev->data->mac_addrs = NULL; rte_eth_dev_release_port(dev); return -1; } @@ -304,7 +305,9 @@ fs_rte_eth_free(const char *name) ret = pthread_mutex_destroy(&PRIV(dev)->hotplug_mutex); if (ret) ERROR("Error while destroying hotplug mutex"); - rte_free(PRIV(dev)); + rte_free(PRIV(dev)->mcast_addrs); + /* mac_addrs must not be freed alone because part of dev_private */ + dev->data->mac_addrs = NULL; rte_eth_dev_release_port(dev); return ret; } |