Skip to content

Commit

Permalink
Add support for VDPA devices management
Browse files Browse the repository at this point in the history
Current implementation support
following functions:
- VDPANewDev
- VDPADelDev
- VDPAGetDevList
- VDPAGetDevByName
- VDPAGetDevConfigList
- VDPAGetDevConfigByName
- VDPAGetDevVStats
- VDPAGetMGMTDevList
- VDPAGetMGMTDevByBusAndName

Signed-off-by: Yury Kulazhenkov <ykulazhenkov@nvidia.com>
  • Loading branch information
ykulazhenkov authored and root committed Dec 27, 2023
1 parent 65ac9e9 commit 4064b4d
Show file tree
Hide file tree
Showing 3 changed files with 774 additions and 0 deletions.
41 changes: 41 additions & 0 deletions nl/vdpa_linux.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
package nl

const (
VDPA_GENL_NAME = "vdpa"
VDPA_GENL_VERSION = 0x1
)

const (
VDPA_CMD_UNSPEC = iota
VDPA_CMD_MGMTDEV_NEW
VDPA_CMD_MGMTDEV_GET /* can dump */
VDPA_CMD_DEV_NEW
VDPA_CMD_DEV_DEL
VDPA_CMD_DEV_GET /* can dump */
VDPA_CMD_DEV_CONFIG_GET /* can dump */
VDPA_CMD_DEV_VSTATS_GET
)

const (
VDPA_ATTR_UNSPEC = iota
VDPA_ATTR_MGMTDEV_BUS_NAME
VDPA_ATTR_MGMTDEV_DEV_NAME
VDPA_ATTR_MGMTDEV_SUPPORTED_CLASSES
VDPA_ATTR_DEV_NAME
VDPA_ATTR_DEV_ID
VDPA_ATTR_DEV_VENDOR_ID
VDPA_ATTR_DEV_MAX_VQS
VDPA_ATTR_DEV_MAX_VQ_SIZE
VDPA_ATTR_DEV_MIN_VQ_SIZE
VDPA_ATTR_DEV_NET_CFG_MACADDR
VDPA_ATTR_DEV_NET_STATUS
VDPA_ATTR_DEV_NET_CFG_MAX_VQP
VDPA_ATTR_DEV_NET_CFG_MTU
VDPA_ATTR_DEV_NEGOTIATED_FEATURES
VDPA_ATTR_DEV_MGMTDEV_MAX_VQS
VDPA_ATTR_DEV_SUPPORTED_FEATURES
VDPA_ATTR_DEV_QUEUE_INDEX
VDPA_ATTR_DEV_VENDOR_ATTR_NAME
VDPA_ATTR_DEV_VENDOR_ATTR_VALUE
VDPA_ATTR_DEV_FEATURES
)
Loading

0 comments on commit 4064b4d

Please sign in to comment.