net/mlx5: fix input register for ASO object
[dpdk.git] / drivers / net / mlx5 / mlx5_flow.c
index ad891d6..5dc0832 100644 (file)
@@ -777,6 +777,7 @@ mlx5_flow_get_reg_id(struct rte_eth_dev *dev,
                        return priv->mtr_color_reg != REG_C_2 ? REG_C_2 :
                               REG_C_3;
        case MLX5_MTR_COLOR:
+       case MLX5_ASO_FLOW_HIT: /* Both features use the same REG_C. */
                MLX5_ASSERT(priv->mtr_color_reg != REG_NON);
                return priv->mtr_color_reg;
        case MLX5_COPY_MARK:
@@ -7819,6 +7820,11 @@ mlx5_flow_tunnel_get_restore_info(struct rte_eth_dev *dev,
        const struct mlx5_flow_tbl_data_entry *tble;
        const uint64_t mask = PKT_RX_FDIR | PKT_RX_FDIR_ID;
 
+       if (!is_tunnel_offload_active(dev)) {
+               info->flags = 0;
+               return 0;
+       }
+
        if ((ol_flags & mask) != mask)
                goto err;
        tble = tunnel_mark_decode(dev, m->hash.fdir.hi);