net/mlx5: add ConnectX6-DX device ID
[dpdk.git] / drivers / net / mlx5 / mlx5_trigger.c
index a4fcdb3..cafab25 100644 (file)
@@ -269,6 +269,12 @@ mlx5_dev_start(struct rte_eth_dev *dev)
        int ret;
 
        DRV_LOG(DEBUG, "port %u starting device", dev->data->port_id);
+       ret = mlx5_dev_configure_rss_reta(dev);
+       if (ret) {
+               DRV_LOG(ERR, "port %u reta config failed: %s",
+                       dev->data->port_id, strerror(rte_errno));
+               return -rte_errno;
+       }
        ret = mlx5_txq_start(dev);
        if (ret) {
                DRV_LOG(ERR, "port %u Tx queue allocation failed: %s",
@@ -396,6 +402,24 @@ mlx5_traffic_enable(struct rte_eth_dev *dev)
        unsigned int j;
        int ret;
 
+       /*
+        * Hairpin txq default flow should be created no matter if it is
+        * isolation mode. Or else all the packets to be sent will be sent
+        * out directly without the TX flow actions, e.g. encapsulation.
+        */
+       for (i = 0; i != priv->txqs_n; ++i) {
+               struct mlx5_txq_ctrl *txq_ctrl = mlx5_txq_get(dev, i);
+               if (!txq_ctrl)
+                       continue;
+               if (txq_ctrl->type == MLX5_TXQ_TYPE_HAIRPIN) {
+                       ret = mlx5_ctrl_flow_source_queue(dev, i);
+                       if (ret) {
+                               mlx5_txq_release(dev, i);
+                               goto error;
+                       }
+               }
+               mlx5_txq_release(dev, i);
+       }
        if (priv->config.dv_esw_en && !priv->config.vf)
                if (!mlx5_flow_create_esw_table_zero_flow(dev))
                        goto error;