-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
- Loading branch information
Showing
4 changed files
with
66 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Using vDPA devices in Kubernetes | ||
|
||
vDPA-capable devices can be used to expose an accelerated, yet standard interface to pods. These devices implement the virtIO ring layout that is used for the data-plane. | ||
The control plane, however, is translated by the vDPA kernel framework which takes care of configuring the virtio devices and virtqueues. | ||
|
||
The vDPA kernel framework is composed of a vdpa bus (/sys/bus/vdpa), vdpa devices (/sys/bus/vdpa/devices) and vdpa drivers (/sys/bus/vdpa/drivers). Currently, two vdpa drivers are implemented: | ||
* virtio_vdpa: Exposes the device as a virtio-net netdev | ||
* vhost_vdpa: Exposes the device as a vhost-vdpa device. This device uses an extension of the vhost-net protocol to allow userspace applications access the rings directly | ||
|
||
## Supported NICs: | ||
* Mellanox ConnectX®-6 DX | ||
|
||
## vDPA device creation | ||
Each NIC might require different steps to create vDPA devices on top of the VFs. | ||
|
||
## Bind the desired vdpa driver | ||
The vdpa bus works similar to the pci bus. To unbind a driver from a device, run: | ||
``echo ${DEV_NAME} > /sys/bus/vdpa/devices/${DEV_NAME}/driver/unbind`` | ||
|
||
To bind a driver to a device, run: | ||
``echo ${DEV_NAME} > /sys/bus/vdpa/drivers/${DRIVER_NAME}/bind`` | ||
|
||
## Priviledges | ||
IPC_LOCK capability privilege is required for "vhost" mode to be used in a Kubernetes Pod. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: sriovdp-config | ||
namespace: kube-system | ||
data: | ||
config.json: | | ||
{ | ||
"resourceList": [{ | ||
{ | ||
"resourceName": "vdpa_mlx_virtio", | ||
"selectors": { | ||
"vendors": ["15b3"], | ||
"devices": ["101e"], | ||
"drivers": ["mlx5_core"], | ||
"vdpaType": "virtio" | ||
} | ||
}, | ||
{ | ||
"resourceName": "vdpa_mlx_vhost", | ||
"selectors": { | ||
"vendors": ["15b3"], | ||
"devices": ["101e"], | ||
"drivers": ["mlx5_core"], | ||
"vdpaType": "vhost" | ||
} | ||
} | ||
] | ||
} | ||