<?php
/*
 * Copyright 2014 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */

namespace Google\Service\Container;

class NodeVfioConfig extends \Google\Model
{
  /**
   * Optional. Specifies the maximum number of DMA entries (pages) that can be
   * mapped by the VFIO IOMMU type 1 driver for a container. This limit affects
   * the total amount of host memory that can be pinned for direct device
   * access, which is often critical for high-performance devices like TPUs and
   * GPUs. This setting corresponds to the kernel parameter at:
   * `/sys/module/vfio_iommu_type1/parameters/dma_entry_limit`. The default
   * value in the kernel is `65535`. Higher values may be needed for workloads
   * mapping large memory regions. Supported values are integers between `65535`
   * and `4194304`.
   *
   * @var int
   */
  public $dmaEntryLimit;

  /**
   * Optional. Specifies the maximum number of DMA entries (pages) that can be
   * mapped by the VFIO IOMMU type 1 driver for a container. This limit affects
   * the total amount of host memory that can be pinned for direct device
   * access, which is often critical for high-performance devices like TPUs and
   * GPUs. This setting corresponds to the kernel parameter at:
   * `/sys/module/vfio_iommu_type1/parameters/dma_entry_limit`. The default
   * value in the kernel is `65535`. Higher values may be needed for workloads
   * mapping large memory regions. Supported values are integers between `65535`
   * and `4194304`.
   *
   * @param int $dmaEntryLimit
   */
  public function setDmaEntryLimit($dmaEntryLimit)
  {
    $this->dmaEntryLimit = $dmaEntryLimit;
  }
  /**
   * @return int
   */
  public function getDmaEntryLimit()
  {
    return $this->dmaEntryLimit;
  }
}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(NodeVfioConfig::class, 'Google_Service_Container_NodeVfioConfig');
