summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2019-08-29 10:36:22 -0700
committerAaron Plattner <aplattner@nvidia.com>2019-08-29 10:36:22 -0700
commit56c030822b998d0797096d58faebfb1026ccddd5 (patch)
treebe696b2a76957881f61589ac0ff68f416b65a390 /src
parentdb68628db1afeba5a333884e0d59ca059012df1c (diff)
435.21435.21
Diffstat (limited to 'src')
-rw-r--r--src/gtk+-2.x/ctkgridlicense.c51
-rw-r--r--src/libXNVCtrl/version.mk2
-rw-r--r--src/version.h2
-rw-r--r--src/version.mk2
4 files changed, 38 insertions, 19 deletions
diff --git a/src/gtk+-2.x/ctkgridlicense.c b/src/gtk+-2.x/ctkgridlicense.c
index 8e6a189..540767f 100644
--- a/src/gtk+-2.x/ctkgridlicense.c
+++ b/src/gtk+-2.x/ctkgridlicense.c
@@ -188,6 +188,34 @@ typedef struct ConfigFileLinesRec
int nLines;
} ConfigFileLines;
+/*
+ * updateFeatureTypeFromGriddConfig() - Update feature type from gridd.conf or virtualization mode
+ *
+ */
+static void updateFeatureTypeFromGriddConfig(gpointer user_data, NvGriddConfigParams *griddConfig)
+{
+ CtkManageGridLicense *ctk_manage_grid_license = CTK_MANAGE_GRID_LICENSE(user_data);
+
+ if (strcmp(griddConfig->str[NV_GRIDD_FEATURE_TYPE], "4") == 0)
+ {
+ ctk_manage_grid_license->feature_type = NV_GRID_LICENSE_FEATURE_TYPE_VCOMPUTE;
+ }
+ else if (strcmp(griddConfig->str[NV_GRIDD_FEATURE_TYPE], "2") == 0)
+ {
+ ctk_manage_grid_license->feature_type = NV_GRID_LICENSE_FEATURE_TYPE_QDWS;
+ }
+ else
+ {
+ ctk_manage_grid_license->feature_type = NV_GRID_LICENSE_FEATURE_TYPE_VAPP;
+ }
+
+ // Override feature type when on vGPU
+ if (ctk_manage_grid_license->license_edition_state == NV_CTRL_ATTR_NVML_GPU_VIRTUALIZATION_MODE_VGPU)
+ {
+ ctk_manage_grid_license->feature_type = NV_GRID_LICENSE_FEATURE_TYPE_VGPU;
+ }
+}
+
static void FreeConfigFileLines(ConfigFileLines *pLines)
{
int i;
@@ -1225,22 +1253,7 @@ static void update_gui_from_griddconfig(gpointer user_data)
gtk_entry_set_text(GTK_ENTRY(ctk_manage_grid_license->txt_secondary_server_port),
griddConfig->str[NV_GRIDD_BACKUP_SERVER_PORT]);
/* set default value for feature type based on the user configured parameter or virtualization mode */
- /* Check Feature type "2" for Quadro Virtual Data Center Workstation. */
- if (strcmp(griddConfig->str[NV_GRIDD_FEATURE_TYPE], "4") == 0) {
- ctk_manage_grid_license->feature_type = NV_GRID_LICENSE_FEATURE_TYPE_VCOMPUTE;
- }
- else if (strcmp(griddConfig->str[NV_GRIDD_FEATURE_TYPE], "2") == 0) {
- ctk_manage_grid_license->feature_type = NV_GRID_LICENSE_FEATURE_TYPE_QDWS;
- }
- else {
- ctk_manage_grid_license->feature_type = NV_GRID_LICENSE_FEATURE_TYPE_VAPP;
- }
-
- /* Override feature type when on vGPU */
- if (ctk_manage_grid_license->license_edition_state == NV_CTRL_ATTR_NVML_GPU_VIRTUALIZATION_MODE_VGPU)
- {
- ctk_manage_grid_license->feature_type = NV_GRID_LICENSE_FEATURE_TYPE_VGPU;
- }
+ updateFeatureTypeFromGriddConfig(ctk_manage_grid_license, griddConfig);
/* Set license edition toggle button active */
if (ctk_manage_grid_license->radio_btn_vcompute && ctk_manage_grid_license->feature_type == NV_GRID_LICENSE_FEATURE_TYPE_VCOMPUTE) {
@@ -1617,6 +1630,12 @@ GtkWidget* ctk_manage_grid_license_new(CtrlTarget *target,
gtk_box_set_spacing(GTK_BOX(ctk_manage_grid_license), 5);
+ // Set feature type based on user configured parameter or virtualization mode
+ if (griddConfig != NULL)
+ {
+ updateFeatureTypeFromGriddConfig(ctk_manage_grid_license, griddConfig);
+ }
+
get_licensable_feature_information(ctk_manage_grid_license);
/* banner */
diff --git a/src/libXNVCtrl/version.mk b/src/libXNVCtrl/version.mk
index 160bbfd..a566622 100644
--- a/src/libXNVCtrl/version.mk
+++ b/src/libXNVCtrl/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 435.17
+NVIDIA_VERSION = 435.21
diff --git a/src/version.h b/src/version.h
index 4d22ba6..d902256 100644
--- a/src/version.h
+++ b/src/version.h
@@ -1 +1 @@
-#define NVIDIA_VERSION "435.17"
+#define NVIDIA_VERSION "435.21"
diff --git a/src/version.mk b/src/version.mk
index 160bbfd..a566622 100644
--- a/src/version.mk
+++ b/src/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 435.17
+NVIDIA_VERSION = 435.21