Add mofed mode to nvcdi API

Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
Evan Lezar
2023-03-06 14:41:07 +02:00
parent ebe18fbb7f
commit 868393b7ed
3 changed files with 89 additions and 0 deletions

View File

@@ -94,6 +94,11 @@ func New(opts ...Option) Interface {
l.class = "gds"
}
lib = (*gdslib)(l)
case ModeMofed:
if l.class == "" {
l.class = "mofed"
}
lib = (*mofedlib)(l)
default:
// TODO: We would like to return an error here instead of panicking
panic("Unknown mode")