Configuration File
The controller service has an optional JSON format configuration file which allows users to customize several parameters. The configuration file should be defined on the DPU at /opt/mellanox/mlnx_virtnet/virtnet.conf
. This file is read every time the controller starts.
Controller systemd
service should be restarted when there is configuration file change. Dynamic change of virtnet.conf
is not supported.
Parameter |
Default Value |
Type |
Description |
||||||||||||||||||||||||||||
|
|
String |
RDMA device (e.g., |
||||||||||||||||||||||||||||
|
|
String |
RDMA device (e.g., |
||||||||||||||||||||||||||||
|
|
String |
The RDMA device (e.g., |
||||||||||||||||||||||||||||
|
|
String |
RDMA LAG device (e.g., |
||||||||||||||||||||||||||||
|
|
List |
The following sub-parameters can be used to configure the static PF:
|
||||||||||||||||||||||||||||
|
|
Number |
Specifies whether LAG is used Note
If LAG is used, make sure to use the correct IB dev for static PF
|
||||||||||||||||||||||||||||
|
|
Number |
Specifies whether the DPU is a single port device. It is mutually exclusive with |
||||||||||||||||||||||||||||
|
|
Number |
Specifies whether recovery is enabled. If unspecified, recovery is enabled by default. To disable it, set |
||||||||||||||||||||||||||||
|
|
Number |
Determines the initial SF pool size as the percentage of Note
|
||||||||||||||||||||||||||||
|
|
Number |
Specifies whether to destroy the SF pool. When set to 1, the controller destroys the SF pool when stopped/restarted (and the SF pool is recreated if |
||||||||||||||||||||||||||||
|
|
Number |
Specifies whether packed VQ mode is enabled. If unspecified, packed VQ is disabled by default. To enable, set
Note
The virtio driver on the guest OS must be unloaded when restarting the controller if the
|
||||||||||||||||||||||||||||
|
|
Number |
When enabled, the mergeable buffers feature is negotiated with the host driver. This feature allows the guest driver to use multiple RX descriptor chains to receive a single receive packet, hence increase bandwidth. Note
The virtio driver on the guest OS must be unloaded when restarting the controller if the
|
||||||||||||||||||||||||||||
|
|
Number |
Specifies the start DPA core for virtnet application. Valid only for NVIDIA® BlueField®-3 and up. Value must be greater than 0 and less than 11. Together with Note
This is advanced options when there are multiple DPA applications running at the same time. Regular user should keep this option as default.
|
||||||||||||||||||||||||||||
|
|
Number |
Specifies the end DPA core for virtnet application. Valid only for BlueField-3 and up. Value must be greater than |
||||||||||||||||||||||||||||
|
|
List |
The following sub-parameters can be used to configure the VF:
|
Validate the JSON format of the configuration file before restarting the controller, especially the syntax and symbols. Otherwise, the controller may fail to start.
Configuring LAG on Dual Port BlueField
Refer to the "Link Aggregation" page in NVIDIA BlueField BSP documentation for information on configuring BlueField in LAG mode.
Refer to the "Link Aggregation" page for information on configuring virtio-net in LAG mode.
Configuring Static PF on Dual Port BlueField
The following configures all static PFs to use mlx5_0
(port 0) as the data path device in a non-LAG configuration, and the default MAC and features for the PF:
{
"ib_dev_p0": "mlx5_0",
"ib_dev_p1": "mlx5_1",
"ib_dev_for_static_pf": "mlx5_0",
"is_lag": 0,
"static_pf": {
"mac_base": "08:11:22:33:44:55",
"features": "0x230047082b"
}
}
Configuring VF Specific Options
The following configures VFs with default parameters. With this configuration, each PF assigns the MAC based on mac_base
up to 126 VFs. Each VF creates 4 queue pairs, with each queue having a depth of 256.
If vfs_per_pf
is less than the VIRTIO_NET_EMULATION_NUM_VF
in mlxconfig, and more VFs are created, duplicated MACs would be assigned to different VFs.
{
"vf": {
"mac_base": "06:11:22:33:44:55",
"features": "0x230047082b",
"vfs_per_pf": 126,
"max_queue_pairs": 4,
"max_queue_size": 256
}
}