use resource name for the socket
Currently, we use the product and vendor id for the socket name.
However, we could use the same device plugin for multiple devices with
different product and vendor id.
@@ -71,8 +71,7 @@ type PCIDevicePlugin struct {
}
func NewPCIDevicePlugin(pciDevices []*PCIDevice, resourceName string) *PCIDevicePlugin {
- deviceIDStr := strings.Replace(pciDevices[0].pciID, ":", "-", -1)
- serverSock := SocketPath(deviceIDStr)
+ serverSock := SocketPath(strings.Replace(resourceName, "/", "-", -1))
iommuToPCIMap := make(map[string]string)
initHandler()
