diff options
author | Luca Boccassi <luca.boccassi@gmail.com> | 2018-07-24 16:52:29 +0100 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@gmail.com> | 2018-07-24 16:53:31 +0100 |
commit | 43192222b329b3c984687235b0081c7fbfe484ba (patch) | |
tree | 8e74c04b227d5386d40bbd987ddf132b43ddb313 /drivers/net/mlx5 | |
parent | 18af4227fa5eee002b1a79207935620f6112803e (diff) |
New upstream version 16.11.7upstream/16.11.7
Change-Id: I1dbe85956ca329c829b0066d16b3f902c237fbd3
Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
Diffstat (limited to 'drivers/net/mlx5')
-rw-r--r-- | drivers/net/mlx5/mlx5.c | 11 | ||||
-rw-r--r-- | drivers/net/mlx5/mlx5_vlan.c | 6 |
2 files changed, 12 insertions, 5 deletions
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index 86d1e44c..eb266b2c 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -422,17 +422,16 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) break; } if (attr_ctx == NULL) { - ibv_free_device_list(list); switch (err) { case 0: ERROR("cannot access device, is mlx5_ib loaded?"); - return -ENODEV; + err = ENODEV; + break; case EINVAL: ERROR("cannot use device, are drivers up to date?"); - return -EINVAL; + break; } - assert(err > 0); - return -err; + goto error; } ibv_dev = list[i]; @@ -685,6 +684,8 @@ port_error: claim_zero(ibv_dealloc_pd(pd)); if (ctx) claim_zero(ibv_close_device(ctx)); + if (eth_dev && rte_eal_process_type() == RTE_PROC_PRIMARY) + rte_eth_dev_release_port(eth_dev); break; } diff --git a/drivers/net/mlx5/mlx5_vlan.c b/drivers/net/mlx5/mlx5_vlan.c index 1b0fa40a..4e11eadb 100644 --- a/drivers/net/mlx5/mlx5_vlan.c +++ b/drivers/net/mlx5/mlx5_vlan.c @@ -36,6 +36,12 @@ #include <assert.h> #include <stdint.h> +/* + * Not needed by this file; included to work around the lack of off_t + * definition for mlx5dv.h with unpatched rdma-core versions. + */ +#include <sys/types.h> + /* DPDK headers don't like -pedantic. */ #ifdef PEDANTIC #pragma GCC diagnostic ignored "-Wpedantic" |