Skip to contentSkip to conversation

fpga: altera-cvp: Increase the credit timeout

PATCH In review [email protected] 3 participants 5 messages Feb 21, 2022 – Mar 11, 2022 FPGA manager framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fpga: altera-cvp: Increase the credit timeout

From: Ang Tien Sung <[email protected]>

Increase the timeout for SDM (Secure device manager) data credits from 20ms to 40ms. Internal stress tests running at 500 loops failed with the current timeout of 20ms. At the start of a FPGA configuration, the CVP host driver reads the transmit credits from SDM. It then sends bitstream FPGA data to SDM based on the total credits. Each credit allows the CVP host driver to send 4kBytes of data. There are situations whereby, the SDM did not respond in time during testing.

---
 drivers/fpga/altera-cvp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/fpga/altera-cvp.c +1 -1
index 4ffb9da537d8..5295ff90482b 100644
@@ -52,7 +52,7 @@
 /* V2 Defines */
 #define VSE_CVP_TX_CREDITS		0x49	/* 8bit */
 
-#define V2_CREDIT_TIMEOUT_US		20000
+#define V2_CREDIT_TIMEOUT_US		40000
 #define V2_CHECK_CREDIT_US		10
 #define V2_POLL_TIMEOUT_US		1000000
 #define V2_USER_TIMEOUT_US		500000
Signature · 1 line
2.25.1
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 20 lines · On Mon, Feb 21, 2022 at 10:11:27PM +0800, [email protected] wrote:

From: Ang Tien Sung <[email protected]>

Increase the timeout for SDM (Secure device manager) data credits from 20ms to 40ms. Internal stress tests running at 500 loops failed with the current timeout of 20ms. At the start of a FPGA configuration, the CVP host driver reads the transmit credits from SDM. It then sends bitstream FPGA data to SDM based on the total credits. Each credit allows the CVP host driver to send 4kBytes of data. There are situations whereby, the SDM did not respond in time during testing.

---
 drivers/fpga/altera-cvp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/fpga/altera-cvp.c +0 -0
index 4ffb9da537d8..5295ff90482b 100644

drivers/fpga/altera-cvp.c line 58

Quoted 8 lines
drivers/fpga/altera-cvp.c +1 -1
@@ -52,7 +52,7 @@
 /* V2 Defines */
 #define VSE_CVP_TX_CREDITS		0x49	/* 8bit */
 
-#define V2_CREDIT_TIMEOUT_US		20000
+#define V2_CREDIT_TIMEOUT_US		40000
 #define V2_CHECK_CREDIT_US		10
 #define V2_POLL_TIMEOUT_US		1000000
 #define V2_USER_TIMEOUT_US		500000
Quoted 2 lines
Signature · 1 line
2.25.1
#2 lore raw
Quoted 12 lines

Subject: Re: [PATCH] fpga: altera-cvp: Increase the credit timeout

Quoted 9 lines · On Mon, Feb 21, 2022 at 10:11:27PM +0800, [email protected] wrote:

From: Ang Tien Sung <[email protected]>

Increase the timeout for SDM (Secure device manager) data credits from 20ms to 40ms. Internal stress tests running at 500 loops failed with the current timeout of 20ms. At the start of a FPGA configuration, the CVP host driver reads the transmit credits from SDM. It then sends bitstream FPGA data to SDM based on the total credits. Each credit allows the CVP host driver to send 4kBytes of data. There are situations whereby, the SDM did not respond in time during testing.

Why this timeout is changed to 40ms not 50ms or 60ms? What's the time we expected from SDM?
I hope we don't need to change this again.

Thanks
Hao

Quoted 24 lines
Quoted 11 lines
---
 drivers/fpga/altera-cvp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/fpga/altera-cvp.c +0 -0
index 4ffb9da537d8..5295ff90482b 100644

drivers/fpga/altera-cvp.c line 58

Quoted 8 lines
drivers/fpga/altera-cvp.c +1 -1
@@ -52,7 +52,7 @@
 /* V2 Defines */
 #define VSE_CVP_TX_CREDITS		0x49	/* 8bit */
 
-#define V2_CREDIT_TIMEOUT_US		20000
+#define V2_CREDIT_TIMEOUT_US		40000
 #define V2_CHECK_CREDIT_US		10
 #define V2_POLL_TIMEOUT_US		1000000
 #define V2_USER_TIMEOUT_US		500000
Quoted 2 lines

--
2.25.1

#3 lore raw

Hi Hao,

We have tested the 40ms change with 500 loops and deem this satisfying based on the recommendations by the Intel FPGA SDM HW team. SDM was expected to respond within a maximum time of 20ms +-error margin. However, there were cases this weren't the case during tests. After many rounds of tests, they conclude that 40ms is doable. And, this is double the previous time-out of 20ms.
There is a bigger margin added this time.
Overall, we don't intend to increase the time-out any further. Thanks
Tien Sung

-----Original Message-----
From: Wu, Hao <[email protected]>
Sent: Monday, 28 February, 2022 5:54 PM
To: Xu, Yilun <[email protected]>; Ang, Tien Sung <[email protected]>
Cc: Moritz Fischer <[email protected]>; Tom Rix <[email protected]>; [email protected]
Subject: RE: [PATCH] fpga: altera-cvp: Increase the credit timeout

Quoted 12 lines

Subject: Re: [PATCH] fpga: altera-cvp: Increase the credit timeout

Quoted 9 lines · On Mon, Feb 21, 2022 at 10:11:27PM +0800, [email protected] wrote:

From: Ang Tien Sung <[email protected]>

Increase the timeout for SDM (Secure device manager) data credits
from 20ms to 40ms. Internal stress tests running at 500 loops failed with the current timeout of 20ms. At the start of a FPGA configuration, the CVP host driver reads the transmit credits from SDM. It then sends bitstream FPGA data to SDM based on the total credits. Each credit allows the CVP host driver to send 4kBytes of data. There are situations whereby, the SDM did not respond in time during testing.

Why this timeout is changed to 40ms not 50ms or 60ms? What's the time we expected from SDM?
I hope we don't need to change this again.

Thanks
Hao

Quoted 24 lines
Quoted 11 lines
---
 drivers/fpga/altera-cvp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/fpga/altera-cvp.c +0 -0
index 4ffb9da537d8..5295ff90482b 100644

drivers/fpga/altera-cvp.c line 58

Quoted 8 lines
drivers/fpga/altera-cvp.c +1 -1
@@ -52,7 +52,7 @@
 /* V2 Defines */
 #define VSE_CVP_TX_CREDITS		0x49	/* 8bit */
 
-#define V2_CREDIT_TIMEOUT_US		20000
+#define V2_CREDIT_TIMEOUT_US		40000
 #define V2_CHECK_CREDIT_US		10
 #define V2_POLL_TIMEOUT_US		1000000
 #define V2_USER_TIMEOUT_US		500000
Quoted 2 lines

--
2.25.1

Acked-by
#4 lore raw
Quoted 10 lines

-----Original Message-----
From: Ang, Tien Sung <[email protected]>
Sent: Friday, March 4, 2022 4:45 PM
To: Wu, Hao <[email protected]>; Xu, Yilun <[email protected]>
Cc: Moritz Fischer <[email protected]>; Tom Rix <[email protected]>; linux- [email protected]
Subject: RE: [PATCH] fpga: altera-cvp: Increase the credit timeout

Hi Hao,

Quoted 8 lines

We have tested the 40ms change with 500 loops and deem this satisfying based on the recommendations by the Intel FPGA SDM HW team. SDM was expected to respond within a maximum time of 20ms +-error margin. However, there were cases this weren't the case during tests. After many rounds of tests, they conclude that 40ms is doable. And, this is double the previous time-out of 20ms.
There is a bigger margin added this time.
Overall, we don't intend to increase the time-out any further.

I see. Thanks.

Hao

Quoted 56 lines

Thanks
Tien Sung

-----Original Message-----
From: Wu, Hao <[email protected]>
Sent: Monday, 28 February, 2022 5:54 PM
To: Xu, Yilun <[email protected]>; Ang, Tien Sung <[email protected]>
Cc: Moritz Fischer <[email protected]>; Tom Rix <[email protected]>; linux- [email protected]
Subject: RE: [PATCH] fpga: altera-cvp: Increase the credit timeout

Quoted 12 lines

Subject: Re: [PATCH] fpga: altera-cvp: Increase the credit timeout

Quoted 9 lines · On Mon, Feb 21, 2022 at 10:11:27PM +0800, [email protected] wrote:

From: Ang Tien Sung <[email protected]>

Increase the timeout for SDM (Secure device manager) data credits from 20ms to 40ms. Internal stress tests running at 500 loops failed with the current timeout of 20ms. At the start of a FPGA configuration, the CVP host driver reads the transmit credits from SDM. It then sends bitstream FPGA data to SDM based on the total credits. Each credit allows the CVP host driver to send 4kBytes of data. There are situations whereby, the SDM did not respond in time during

testing.

Why this timeout is changed to 40ms not 50ms or 60ms? What's the time we expected from SDM?
I hope we don't need to change this again.

Thanks
Hao

Quoted 24 lines
Quoted 11 lines
---
 drivers/fpga/altera-cvp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/fpga/altera-cvp.c +0 -0
index 4ffb9da537d8..5295ff90482b 100644

drivers/fpga/altera-cvp.c line 58

Quoted 8 lines
drivers/fpga/altera-cvp.c +1 -1
@@ -52,7 +52,7 @@
 /* V2 Defines */
 #define VSE_CVP_TX_CREDITS		0x49	/* 8bit */
 
-#define V2_CREDIT_TIMEOUT_US		20000
+#define V2_CREDIT_TIMEOUT_US		40000
 #define V2_CHECK_CREDIT_US		10
 #define V2_POLL_TIMEOUT_US		1000000
 #define V2_USER_TIMEOUT_US		500000
Quoted 2 lines

--
2.25.1