net/ice: enable Rx timestamp on flex descriptor
[dpdk.git] / drivers / net / mlx5 / mlx5.c
index f68c769..02ea2e7 100644 (file)
@@ -1254,6 +1254,8 @@ error:
        MLX5_ASSERT(sh);
        if (sh->cnt_id_tbl)
                mlx5_l3t_destroy(sh->cnt_id_tbl);
+       if (sh->share_cache.cache.table)
+               mlx5_mr_btree_free(&sh->share_cache.cache);
        if (sh->tis)
                claim_zero(mlx5_devx_cmd_destroy(sh->tis));
        if (sh->td)
@@ -1580,6 +1582,11 @@ mlx5_dev_close(struct rte_eth_dev *dev)
                priv->rxqs_n = 0;
                priv->rxqs = NULL;
        }
+       if (priv->representor) {
+               /* Each representor has a dedicated interrupts handler */
+               mlx5_free(dev->intr_handle);
+               dev->intr_handle = NULL;
+       }
        if (priv->txqs != NULL) {
                /* XXX race condition if mlx5_tx_burst() is still running. */
                rte_delay_us_sleep(1000);
@@ -2292,7 +2299,8 @@ rte_pmd_mlx5_get_dyn_flag_names(char *names[], unsigned int n)
  */
 int
 mlx5_dev_check_sibling_config(struct mlx5_priv *priv,
-                             struct mlx5_dev_config *config)
+                             struct mlx5_dev_config *config,
+                             struct rte_device *dpdk_dev)
 {
        struct mlx5_dev_ctx_shared *sh = priv->sh;
        struct mlx5_dev_config *sh_conf = NULL;
@@ -2303,7 +2311,7 @@ mlx5_dev_check_sibling_config(struct mlx5_priv *priv,
        if (sh->refcnt == 1)
                return 0;
        /* Find the device with shared context. */
-       MLX5_ETH_FOREACH_DEV(port_id, NULL) {
+       MLX5_ETH_FOREACH_DEV(port_id, dpdk_dev) {
                struct mlx5_priv *opriv =
                        rte_eth_devices[port_id].data->dev_private;
 
@@ -2378,7 +2386,7 @@ mlx5_eth_find_next(uint16_t port_id, struct rte_device *odev)
  * @return
  *   0 on success, the function cannot fail.
  */
-static int
+int
 mlx5_net_remove(struct rte_device *dev)
 {
        uint16_t port_id;