Revert "Remove Nova prefix from constants"

Reason for revert: The functionality added here will
be a part of a different application, and the code
here is now obsolete.

This reverts commit 889011:
Remove Nova prefix from constants
https://review.opendev.org/c/starlingx/config/+/889011

Test Plan:
PASS: Bootstrap is Success
PASS: system host-unlock with no alarms
PASS: Designer build of debian AIO-SX and deployment without QAT and
      GPU functionality code.

Reference to the application where these functionalities will be added: https://opendev.org/starlingx/app-intel-device-plugins
The same storyboard can be tracked for further updates.

Story: 2010604
Task: 48739

Change-Id: Ia210cd5dff472d26f5f2b2311a838799d585e2bf
Signed-off-by: Aman Pandae <amanpandae.mothukuri@windriver.com>
(cherry picked from commit 54030223e5)
This commit is contained in:
amothuku1 2023-09-12 13:13:44 -04:00 committed by Thales Elero Cervi
parent a58ae1cf81
commit 721f4a1d39
3 changed files with 41 additions and 41 deletions

View File

@ -32,23 +32,23 @@ LOG = logging.getLogger(__name__)
ETHERNET_PCI_CLASSES = ['ethernet controller', 'network controller'] ETHERNET_PCI_CLASSES = ['ethernet controller', 'network controller']
# Look for other devices we may want to inventory. # Look for other devices we may want to inventory.
KNOWN_PCI_DEVICES = [{"vendor_id": constants.PCI_ALIAS_QAT_PF_VENDOR, KNOWN_PCI_DEVICES = [{"vendor_id": constants.NOVA_PCI_ALIAS_QAT_PF_VENDOR,
"device_id": constants.PCI_ALIAS_QAT_DH895XCC_PF_DEVICE, "device_id": constants.NOVA_PCI_ALIAS_QAT_DH895XCC_PF_DEVICE,
"class_id": constants.PCI_ALIAS_QAT_CLASS}, "class_id": constants.NOVA_PCI_ALIAS_QAT_CLASS},
{"vendor_id": constants.PCI_ALIAS_QAT_PF_VENDOR, {"vendor_id": constants.NOVA_PCI_ALIAS_QAT_PF_VENDOR,
"device_id": constants.PCI_ALIAS_QAT_C62X_PF_DEVICE, "device_id": constants.NOVA_PCI_ALIAS_QAT_C62X_PF_DEVICE,
"class_id": constants.PCI_ALIAS_QAT_CLASS}, "class_id": constants.NOVA_PCI_ALIAS_QAT_CLASS},
{"class_id": constants.PCI_ALIAS_GPU_CLASS}, {"class_id": constants.NOVA_PCI_ALIAS_GPU_CLASS},
{"class_id": dconstants.PCI_DEVICE_CLASS_FPGA}] {"class_id": dconstants.PCI_DEVICE_CLASS_FPGA}]
# Look for QAT PF and VF devices for k8s device plugin enabling. # Look for QAT PF and VF devices for k8s device plugin enabling.
QAT_PF_VF_DEVICES_PCI_DEVICE_ID = [ QAT_PF_VF_DEVICES_PCI_DEVICE_ID = [
constants.PCI_ALIAS_QAT_DH895XCC_VF_DEVICE, constants.NOVA_PCI_ALIAS_QAT_DH895XCC_VF_DEVICE,
constants.PCI_ALIAS_QAT_C62X_VF_DEVICE, constants.NOVA_PCI_ALIAS_QAT_C62X_VF_DEVICE,
constants.PCI_ALIAS_QAT_C3XXX_VF_DEVICE, constants.NOVA_PCI_ALIAS_QAT_C3XXX_VF_DEVICE,
constants.PCI_ALIAS_QAT_D15XX_VF_DEVICE, constants.NOVA_PCI_ALIAS_QAT_D15XX_VF_DEVICE,
constants.PCI_ALIAS_QAT_CO_PROC_4940_PF_DEVICE, constants.NOVA_PCI_ALIAS_QAT_CO_PROC_4940_PF_DEVICE,
constants.PCI_ALIAS_QAT_CO_PROC_4942_PF_DEVICE] constants.NOVA_PCI_ALIAS_QAT_CO_PROC_4942_PF_DEVICE]
# PCI-SIG 0x06 bridge devices to not inventory. # PCI-SIG 0x06 bridge devices to not inventory.
IGNORE_BRIDGE_PCI_CLASSES = ['bridge', 'isa bridge', 'host bridge'] IGNORE_BRIDGE_PCI_CLASSES = ['bridge', 'isa bridge', 'host bridge']
@ -218,7 +218,7 @@ class IntelQATDp(DevicePlugin):
# look for qat pf and vf devices # look for qat pf and vf devices
for device in pci_device_list: for device in pci_device_list:
if (device['pdevice_id'] in QAT_PF_VF_DEVICES_PCI_DEVICE_ID and if (device['pdevice_id'] in QAT_PF_VF_DEVICES_PCI_DEVICE_ID and
device['pvendor_id'] == constants.PCI_ALIAS_QAT_VENDOR and device['pvendor_id'] == constants.NOVA_PCI_ALIAS_QAT_VENDOR and
device['driver'] is not None): device['driver'] is not None):
return constants.KUBE_INTEL_QAT_DEVICE_PLUGIN return constants.KUBE_INTEL_QAT_DEVICE_PLUGIN
return None return None

View File

@ -1020,31 +1020,31 @@ CEPH_CRUSH_TIER_SUFFIX = "-tier"
# PCI Alias types and names # PCI Alias types and names
PCI_ALIAS_GPU_NAME = "gpu" NOVA_PCI_ALIAS_GPU_NAME = "gpu"
PCI_ALIAS_GPU_CLASS = "030000" NOVA_PCI_ALIAS_GPU_CLASS = "030000"
PCI_ALIAS_GPU_PF_NAME = "gpu-pf" NOVA_PCI_ALIAS_GPU_PF_NAME = "gpu-pf"
PCI_ALIAS_GPU_VF_NAME = "gpu-vf" NOVA_PCI_ALIAS_GPU_VF_NAME = "gpu-vf"
PCI_ALIAS_QAT_CLASS = "0x0b4000" NOVA_PCI_ALIAS_QAT_CLASS = "0x0b4000"
PCI_ALIAS_QAT_DH895XCC_PF_NAME = "qat-dh895xcc-pf" NOVA_PCI_ALIAS_QAT_DH895XCC_PF_NAME = "qat-dh895xcc-pf"
PCI_ALIAS_QAT_C62X_PF_NAME = "qat-c62x-pf" NOVA_PCI_ALIAS_QAT_C62X_PF_NAME = "qat-c62x-pf"
PCI_ALIAS_QAT_PF_VENDOR = "8086" NOVA_PCI_ALIAS_QAT_PF_VENDOR = "8086"
PCI_ALIAS_QAT_DH895XCC_PF_DEVICE = "0435" NOVA_PCI_ALIAS_QAT_DH895XCC_PF_DEVICE = "0435"
PCI_ALIAS_QAT_C62X_PF_DEVICE = "37c8" NOVA_PCI_ALIAS_QAT_C62X_PF_DEVICE = "37c8"
PCI_ALIAS_QAT_DH895XCC_VF_NAME = "qat-dh895xcc-vf" NOVA_PCI_ALIAS_QAT_DH895XCC_VF_NAME = "qat-dh895xcc-vf"
PCI_ALIAS_QAT_C62X_VF_NAME = "qat-c62x-vf" NOVA_PCI_ALIAS_QAT_C62X_VF_NAME = "qat-c62x-vf"
PCI_ALIAS_QAT_C3XXX_VF_NAME = "qat-c3xxx-vf" NOVA_PCI_ALIAS_QAT_C3XXX_VF_NAME = "qat-c3xxx-vf"
PCI_ALIAS_QAT_D15XX_VF_NAME = "qat-d15xx-vf" NOVA_PCI_ALIAS_QAT_D15XX_VF_NAME = "qat-d15xx-vf"
PCI_ALIAS_QAT_CO_PROC_4940_VF_NAME = "qat-4940-vf" NOVA_PCI_ALIAS_QAT_CO_PROC_4940_VF_NAME = "qat-4940-vf"
PCI_ALIAS_QAT_CO_PROC_4942_VF_NAME = "qat-4942-vf" NOVA_PCI_ALIAS_QAT_CO_PROC_4942_VF_NAME = "qat-4942-vf"
PCI_ALIAS_QAT_VF_VENDOR = "8086" NOVA_PCI_ALIAS_QAT_VF_VENDOR = "8086"
PCI_ALIAS_QAT_DH895XCC_VF_DEVICE = "0443" NOVA_PCI_ALIAS_QAT_DH895XCC_VF_DEVICE = "0443"
PCI_ALIAS_QAT_C62X_VF_DEVICE = "37c9" NOVA_PCI_ALIAS_QAT_C62X_VF_DEVICE = "37c9"
PCI_ALIAS_QAT_C3XXX_VF_DEVICE = "19e3" NOVA_PCI_ALIAS_QAT_C3XXX_VF_DEVICE = "19e3"
PCI_ALIAS_QAT_D15XX_VF_DEVICE = "6f55" NOVA_PCI_ALIAS_QAT_D15XX_VF_DEVICE = "6f55"
PCI_ALIAS_QAT_CO_PROC_4940_PF_DEVICE = "4940" NOVA_PCI_ALIAS_QAT_CO_PROC_4940_PF_DEVICE = "4940"
PCI_ALIAS_QAT_CO_PROC_4942_PF_DEVICE = "4942" NOVA_PCI_ALIAS_QAT_CO_PROC_4942_PF_DEVICE = "4942"
PCI_ALIAS_QAT_VENDOR = "8086" NOVA_PCI_ALIAS_QAT_VENDOR = "8086"
PCI_ALIAS_USER_NAME = "user" NOVA_PCI_ALIAS_USER_NAME = "user"
# Service Parameter # Service Parameter
SERVICE_TYPE_IDENTITY = 'identity' SERVICE_TYPE_IDENTITY = 'identity'

View File

@ -35,7 +35,7 @@ class DevicePuppet(base.BasePuppet):
devices (compute) puppet resource. devices (compute) puppet resource.
""" """
device_config = {} device_config = {}
qat_c62x_devices = pci_device_list[constants.PCI_ALIAS_QAT_C62X_PF_DEVICE] qat_c62x_devices = pci_device_list[constants.NOVA_PCI_ALIAS_QAT_C62X_PF_DEVICE]
if len(qat_c62x_devices) != 0: if len(qat_c62x_devices) != 0:
for idx, device in enumerate(qat_c62x_devices): for idx, device in enumerate(qat_c62x_devices):
name = 'pci-%s' % device.pciaddr name = 'pci-%s' % device.pciaddr
@ -45,7 +45,7 @@ class DevicePuppet(base.BasePuppet):
} }
device_config.update({name: dev}) device_config.update({name: dev})
qat_dh895xcc_devices = pci_device_list[constants.PCI_ALIAS_QAT_DH895XCC_PF_DEVICE] qat_dh895xcc_devices = pci_device_list[constants.NOVA_PCI_ALIAS_QAT_DH895XCC_PF_DEVICE]
if len(qat_dh895xcc_devices) != 0: if len(qat_dh895xcc_devices) != 0:
for idx, device in enumerate(qat_dh895xcc_devices): for idx, device in enumerate(qat_dh895xcc_devices):
name = 'pci-%s' % device.pciaddr name = 'pci-%s' % device.pciaddr