net/mlx5: map UAR address around huge pages
[dpdk.git] / drivers / net / mlx5 / mlx5_trigger.c
index 6f5c799..c397b9b 100644 (file)
@@ -33,7 +33,7 @@
 #include <unistd.h>
 
 #include <rte_ether.h>
-#include <rte_ethdev.h>
+#include <rte_ethdev_driver.h>
 #include <rte_interrupts.h>
 #include <rte_alarm.h>
 
@@ -76,10 +76,13 @@ priv_txq_start(struct priv *priv)
                        goto error;
                }
        }
-       return -ret;
+       ret = priv_tx_uar_remap(priv, priv->ctx->cmd_fd);
+       if (ret)
+               goto error;
+       return ret;
 error:
        priv_txq_stop(priv);
-       return -ret;
+       return ret;
 }
 
 static void
@@ -166,7 +169,13 @@ mlx5_dev_start(struct rte_eth_dev *dev)
        priv_xstats_init(priv);
        /* Update link status and Tx/Rx callbacks for the first time. */
        memset(&dev->data->dev_link, 0, sizeof(struct rte_eth_link));
-       priv_link_update(priv, 1);
+       INFO("Forcing port %u link to be up", dev->data->port_id);
+       err = priv_force_link_status_change(priv, ETH_LINK_UP);
+       if (err) {
+               DEBUG("Failed to set port %u link to be up",
+                     dev->data->port_id);
+               goto error;
+       }
        priv_dev_interrupt_handler_install(priv, dev);
        priv_unlock(priv);
        return 0;
@@ -181,7 +190,7 @@ error:
        priv_rxq_stop(priv);
        priv_flow_delete_drop_queue(priv);
        priv_unlock(priv);
-       return -err;
+       return err;
 }
 
 /**