port - NIC Port Representation
NIC port model.
Basic port information, such as location (the port are identified by their PCI address on a node), drivers and address.
- DriverKind
The driver kind.
alias of
Literal
[‘kernel’, ‘dpdk’]
- class PortInfo
Bases:
NamedTuple
Port information.
- mac_address
The MAC address of the port.
- Type:
str
- logical_name
The logical name of the port.
- Type:
str
- driver
The name of the port’s driver.
- Type:
str
- mac_address: str
Alias for field number 0
- logical_name: str
Alias for field number 1
- driver: str
Alias for field number 2
- is_link_up: bool
Alias for field number 3
- static __new__(_cls, mac_address: str, logical_name: str, driver: str, is_link_up: bool)
Create new instance of PortInfo(mac_address, logical_name, driver, is_link_up)
- class Port
Bases:
object
Physical port on a node.
- node
The port’s node.
- Type:
Final[Node]
- config
The port’s configuration.
- Type:
Final[framework.config.node.PortConfig]
- __init__(node: Node, config: PortConfig)
Initialize the port from node and config.
- Parameters:
node (Node) – The port’s node.
config (PortConfig) – The test run configuration of the port.
- driver_by_kind(kind: Literal['kernel', 'dpdk']) str
Retrieve the driver name by kind.
- Raises:
InternalError – If the given kind is invalid.
- property name: str
The name of the port.
- property pci: str
The PCI address of the port.
- property info: PortInfo
The port’s current system information.
When this is accessed for the first time, the port’s original driver is stored.
- property mac_address: str
The MAC address of the port.
- property logical_name: str
The logical name of the port.
- property is_link_up: bool
Is the port link up?
- property current_driver: str
The current driver of the port.
- property original_driver: str | None
The original driver of the port prior to DTS startup.
- property bound_for_dpdk: bool
Is the port bound to the driver for DPDK?
- configure_mtu(mtu: int)
Configure the port’s MTU value.
- Parameters:
mtu (int) – Desired MTU value.
- to_dict() dict[str, Any]
Convert to a dictionary.