Skip to content

Commit 09ead3a

Browse files
AshwinKumarKulkarnirwmcguir
authored andcommitted
Fix for vf telemetry APIsFix for vf telemetry APIs
Signed-off-by: Kulkarni, Ashwin Kumar <[email protected]>
1 parent cc3b589 commit 09ead3a

File tree

3 files changed

+48
-8
lines changed

3 files changed

+48
-8
lines changed

scripts/sysman/EXT_Exp_VirtualFunctionManagement.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ API
2424
* ${s}DeviceEnumEnabledVFExp
2525
* ${s}DeviceEnumActiveVFExp
2626
* ${s}VFManagementGetVFCapabilitiesExp
27+
* ${s}VFManagementGetVFCapabilitiesExp2
2728
* ${s}VFManagementGetVFMemoryUtilizationExp2
2829
* ${s}VFManagementGetVFEngineUtilizationExp2
2930
* ${s}VFManagementGetVFPropertiesExp
@@ -46,6 +47,7 @@ API
4647
* ${s}_vf_exp_properties_t
4748
* ${s}_vf_util_mem_exp_t
4849
* ${s}_vf_util_engine_exp_t
50+
* ${s}_vf_exp2_capabilities_t
4951

5052
Virtual Function Management
5153
~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -67,10 +69,10 @@ The following pseudo-code demonstrates a sequence for obtaining the engine activ
6769
std::vector<${s}_vf_handle_t> vfs(numVf, nullptr);
6870
${s}DeviceEnumEnabledVFExp(hDevice, &numVf, vfs.data());
6971
70-
// Gather VF properties
71-
std::vector <${s}_vf_exp_capabilities_t> vfCapabs(numVf);
72+
// Gather VF capabilities
73+
std::vector <${s}_vf_exp2_capabilities_t> vfCapabs(numVf);
7274
for (uint32_t i = 0; i < numVf; i++) {
73-
${s}VFManagementGetVFCapabilitiesExp(vfs[i], &vfCapabs[i]);
75+
${s}VFManagementGetVFCapabilitiesExp2(vfs[i], &vfCapabs[i]);
7476
}
7577
7678
// Detect the info types a particular VF supports
@@ -85,4 +87,4 @@ The following pseudo-code demonstrates a sequence for obtaining the engine activ
8587
${s}VFManagementGetVFEngineUtilizationExp2(activeVf, &engineStatCount, engineStats0);
8688
sleep(1)
8789
${s}_vf_util_engine_exp2_t* engineStats1 = (${s}_vf_util_engine_exp2_t*) allocate(engineStatCount * sizeof(${s}_vf_util_engine_exp2_t));
88-
${s}VFManagementGetVFEngineUtilizationExp2(activeVf, &engineStatCount, &engineStats1);
90+
${s}VFManagementGetVFEngineUtilizationExp2(activeVf, &engineStatCount, &engineStats1);

scripts/sysman/common.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,11 @@ etors:
256256
- name: VF_UTIL_ENGINE_EXP2
257257
value: "0x00020010"
258258
desc: $s_vf_util_engine_exp2_t
259-
version: "1.10"
259+
version: "1.10"
260+
- name: VF_EXP2_CAPABILITIES
261+
value: "0x00020011"
262+
desc: $s_vf_exp2_capabilities_t
263+
version: "1.12"
260264
--- #-------------------------------------------------------------------------
261265
type: struct
262266
desc: "Base for all properties types"

scripts/sysman/virtualFunctionManagement.yml

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ members:
115115
desc: "[out] Wall clock time when the activeCounterValue was sampled."
116116
--- #--------------------------------------------------------------------------
117117
type: struct
118-
desc: "Virtual function management capabilities"
118+
desc: "Virtual function management capabilities (deprecated)"
119119
version: "1.10"
120120
class: $sVFManagement
121121
name: $s_vf_exp_capabilities_t
@@ -125,6 +125,23 @@ members:
125125
name: "address"
126126
desc: "[out] Virtual function BDF address"
127127
- type: uint32_t
128+
name: "vfDeviceMemSize"
129+
desc: "[out] Virtual function memory size in kilo bytes"
130+
- type: uint32_t
131+
name: "vfID"
132+
desc: "[out] Virtual Function ID"
133+
--- #--------------------------------------------------------------------------
134+
type: struct
135+
desc: "Virtual function management capabilities"
136+
version: "1.12"
137+
class: $sVFManagement
138+
name: $s_vf_exp2_capabilities_t
139+
base: $s_base_properties_t
140+
members:
141+
- type: $s_pci_address_t
142+
name: "address"
143+
desc: "[out] Virtual function BDF address"
144+
- type: uint64_t
128145
name: "vfDeviceMemSize"
129146
desc: "[out] Virtual function memory size in bytes"
130147
- type: uint32_t
@@ -143,7 +160,7 @@ members:
143160
desc: "[out] Location of this memory (system, device)"
144161
- type: uint64_t
145162
name: "vfMemUtilized"
146-
desc: "[out] Free memory size in bytes."
163+
desc: "[out] Utilized memory size in bytes."
147164
--- #--------------------------------------------------------------------------
148165
type: struct
149166
desc: "Provides engine utilization values for a virtual function"
@@ -330,6 +347,7 @@ version: "1.10"
330347
class: $sVFManagement
331348
name: GetVFCapabilitiesExp
332349
details:
350+
- "1.12": "[DEPRECATED] No longer supported. Use $sVFManagementGetVFCapabilitiesExp2."
333351
- "The application may call this function from simultaneous threads."
334352
- "The implementation of this function should be lock-free."
335353
params:
@@ -392,6 +410,22 @@ params:
392410
- if count is less than the total number of engine stats available, then driver shall only retrieve that number of stats.
393411
- the implementation shall populate the vector pCount-1 number of VF engine stats.
394412
--- #--------------------------------------------------------------------------
413+
type: function
414+
desc: "Get virtual function management capabilities"
415+
version: "1.12"
416+
class: $sVFManagement
417+
name: GetVFCapabilitiesExp2
418+
details:
419+
- "The application may call this function from simultaneous threads."
420+
- "The implementation of this function should be lock-free."
421+
params:
422+
- type: $s_vf_handle_t
423+
name: hVFhandle
424+
desc: "[in] Sysman handle for the VF component."
425+
- type: $s_vf_exp2_capabilities_t*
426+
name: pCapability
427+
desc: "[in,out] Will contain VF capability."
428+
--- #--------------------------------------------------------------------------
395429
type: class
396430
desc: "C++ wrapper for a Sysman virtual function management group"
397431
version: "1.9"
@@ -404,4 +438,4 @@ members:
404438
init: nullptr
405439
- type: $sDevice*
406440
name: pDevice
407-
desc: "[in] pointer to owner object"
441+
desc: "[in] pointer to owner object"

0 commit comments

Comments
 (0)