Skip to contentSkip to conversation

lspci: Decode VF 10-Bit Tag Requester

PATCH Applied Dongdong Liu 2 participants 5 messages Mar 9, 2021 – Jan 21, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v2 cover lspci: Decode VF 10-Bit Tag Requester

The patchset is to decode VF 10-Bit Tag Requester and update the tests files.

V1->V2: Fix comments suggested by Krzysztof Wilczyński.

Dongdong Liu (2):
lspci: Decode VF 10-Bit Tag Requester
lspci: Update tests files with VF 10-Bit Tag Requester

 lib/header.h        | 2 ++
 ls-ecaps.c          | 8 ++++----
 tests/cap-dvsec-cxl | 4 ++--
 tests/cap-ea-1      | 4 ++--
 tests/cap-pcie-2    | 4 ++--
 5 files changed, 12 insertions(+), 10 deletions(-)

--
1.9.1

#1 lore raw

PATCH v2 1/2 lspci: Decode VF 10-Bit Tag Requester

Decode VF 10-Bit Tag Requester Supported and Enable bit in SR-IOV Capabilities Register.

Sample output:
IOVCap: Migration- 10BitTagReq- Interrupt Message Number: 000
IOVCtl: Enable+ Migration- Interrupt- MSE+ ARIHierarchy- 10BitTagReq-

---
 lib/header.h | 2 ++
 ls-ecaps.c   | 8 ++++----
 2 files changed, 6 insertions(+), 4 deletions(-)
lib/header.h +2 -0
index 170e5c1..bff49c2 100644
@@ -1126,6 +1126,7 @@
 /* Single Root I/O Virtualization */
 #define PCI_IOV_CAP		0x04	/* SR-IOV Capability Register */
 #define  PCI_IOV_CAP_VFM	0x00000001 /* VF Migration Capable */
+#define  PCI_IOV_CAP_VF_10BIT_TAG_REQ 0x00000004 /* VF 10-Bit Tag Requester Supported */
 #define  PCI_IOV_CAP_IMN(x)	((x) >> 21) /* VF Migration Interrupt Message Number */
 #define PCI_IOV_CTRL		0x08	/* SR-IOV Control Register */
 #define  PCI_IOV_CTRL_VFE	0x0001	/* VF Enable */
@@ -1133,6 +1134,7 @@
 #define  PCI_IOV_CTRL_VFMIE	0x0004	/* VF Migration Interrupt Enable */
 #define  PCI_IOV_CTRL_MSE	0x0008	/* VF MSE */
 #define  PCI_IOV_CTRL_ARI	0x0010	/* ARI Capable Hierarchy */
+#define  PCI_IOV_CTRL_VF_10BIT_TAG_REQ_EN 0x0020 /* VF 10-Bit Tag Requester Enable */
 #define PCI_IOV_STATUS		0x0a	/* SR-IOV Status Register */
 #define  PCI_IOV_STATUS_MS	0x0001	/* VF Migration Status */
 #define PCI_IOV_INITIALVF	0x0c	/* Number of VFs that are initially associated */
ls-ecaps.c +4 -4
index 99c55ff..1cea315 100644
@@ -369,13 +369,13 @@ cap_sriov(struct device *d, int where)
     return;
 
   l = get_conf_long(d, where + PCI_IOV_CAP);
-  printf("\t\tIOVCap:\tMigration%c, Interrupt Message Number: %03x\n",
-	FLAG(l, PCI_IOV_CAP_VFM), PCI_IOV_CAP_IMN(l));
+  printf("\t\tIOVCap:\tMigration%c 10BitTagReq%c Interrupt Message Number: %03x\n",
+	FLAG(l, PCI_IOV_CAP_VFM), FLAG(l, PCI_IOV_CAP_VF_10BIT_TAG_REQ), PCI_IOV_CAP_IMN(l));
   w = get_conf_word(d, where + PCI_IOV_CTRL);
-  printf("\t\tIOVCtl:\tEnable%c Migration%c Interrupt%c MSE%c ARIHierarchy%c\n",
+  printf("\t\tIOVCtl:\tEnable%c Migration%c Interrupt%c MSE%c ARIHierarchy%c 10BitTagReq%c\n",
 	FLAG(w, PCI_IOV_CTRL_VFE), FLAG(w, PCI_IOV_CTRL_VFME),
 	FLAG(w, PCI_IOV_CTRL_VFMIE), FLAG(w, PCI_IOV_CTRL_MSE),
-	FLAG(w, PCI_IOV_CTRL_ARI));
+	FLAG(w, PCI_IOV_CTRL_ARI), FLAG(w, PCI_IOV_CTRL_VF_10BIT_TAG_REQ_EN));
   w = get_conf_word(d, where + PCI_IOV_STATUS);
   printf("\t\tIOVSta:\tMigration%c\n", FLAG(w, PCI_IOV_STATUS_MS));
   w = get_conf_word(d, where + PCI_IOV_INITIALVF);
Signature · 1 line
1.9.1
#2 lore raw

PATCH v2 2/2 lspci: Update tests files with VF 10-Bit Tag Requester

In reply to Dongdong Liu

Update the tests files with the new field 10BitTagReq in SR-IOV Capabilities Register.

---
 tests/cap-dvsec-cxl | 4 ++--
 tests/cap-ea-1      | 4 ++--
 tests/cap-pcie-2    | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)
tests/cap-dvsec-cxl +2 -2
index c499d0e..a24e3fb 100644
@@ -79,8 +79,8 @@
                 PTMControl: Enabled:- RootSelected:-
                 PTMEffectiveGranularity: Unknown
         Capabilities: [b80 v1] Single Root I/O Virtualization (SR-IOV)
-                IOVCap: Migration-, Interrupt Message Number: 000
-                IOVCtl: Enable- Migration- Interrupt- MSE- ARIHierarchy-
+                IOVCap: Migration- 10BitTagReq- Interrupt Message Number: 000
+                IOVCtl: Enable- Migration- Interrupt- MSE- ARIHierarchy- 10BitTagReq-
                 IOVSta: Migration-
                 Initial VFs: 6, Total VFs: 6, Number of VFs: 0, Function Dependency Link: 00
                 VF offset: 16, stride: 2, Device ID: 0d52
tests/cap-ea-1 +2 -2
index df88ba9..776839d 100644
@@ -57,8 +57,8 @@
 		ARICtl:	MFVC- ACS-, Function Group: 0
 	Capabilities: [108 v1] Vendor Specific Information: ID=00a0 Rev=1 Len=040 <?>
 	Capabilities: [180 v1] Single Root I/O Virtualization (SR-IOV)
-		IOVCap:	Migration-, Interrupt Message Number: 000
-		IOVCtl:	Enable+ Migration- Interrupt- MSE+ ARIHierarchy+
+		IOVCap:	Migration- 10BitTagReq- Interrupt Message Number: 000
+		IOVCtl:	Enable+ Migration- Interrupt- MSE+ ARIHierarchy+ 10BitTagReq-
 		IOVSta:	Migration-
 		Initial VFs: 128, Total VFs: 128, Number of VFs: 128, Function Dependency Link: 00
 		VF offset: 1, stride: 1, Device ID: a034
tests/cap-pcie-2 +2 -2
index 47c8953..9bde139 100644
@@ -48,8 +48,8 @@
 		ARICap:	MFVC- ACS-, Next Function: 1
 		ARICtl:	MFVC- ACS-, Function Group: 0
 	Capabilities: [160] Single Root I/O Virtualization (SR-IOV)
-		IOVCap:	Migration-, Interrupt Message Number: 000
-		IOVCtl:	Enable+ Migration- Interrupt- MSE+ ARIHierarchy-
+		IOVCap:	Migration- 10BitTagReq- Interrupt Message Number: 000
+		IOVCtl:	Enable+ Migration- Interrupt- MSE+ ARIHierarchy- 10BitTagReq-
 		IOVSta:	Migration-
 		Initial VFs: 8, Total VFs: 8, Number of VFs: 1, Function Dependency Link: 00
 		VF offset: 384, stride: 2, Device ID: 10ca
Signature · 1 line
1.9.1
#3 lore raw
In reply to Dongdong Liu

kindly ping...

Quoted 21 lines · Dongdong Liu

The patchset is to decode VF 10-Bit Tag Requester and update the tests files.

V1->V2: Fix comments suggested by Krzysztof Wilczyński.

Dongdong Liu (2):
lspci: Decode VF 10-Bit Tag Requester
lspci: Update tests files with VF 10-Bit Tag Requester

 lib/header.h        | 2 ++
 ls-ecaps.c          | 8 ++++----
 tests/cap-dvsec-cxl | 4 ++--
 tests/cap-ea-1      | 4 ++--
 tests/cap-pcie-2    | 4 ++--
 5 files changed, 12 insertions(+), 10 deletions(-)

--
1.9.1

.

#4 lore raw
In reply to Dongdong Liu

Hello!

Quoted 9 lines

The patchset is to decode VF 10-Bit Tag Requester and update the tests files.

V1->V2: Fix comments suggested by Krzysztof Wilczyński.

Dongdong Liu (2):
lspci: Decode VF 10-Bit Tag Requester
lspci: Update tests files with VF 10-Bit Tag Requester

Quoted 6 lines
 lib/header.h        | 2 ++
 ls-ecaps.c          | 8 ++++----
 tests/cap-dvsec-cxl | 4 ++--
 tests/cap-ea-1      | 4 ++--
 tests/cap-pcie-2    | 4 ++--
 5 files changed, 12 insertions(+), 10 deletions(-)

Applied, sorry for the delay.

Martin