[v1] dts: fix testpmd port device error handling mode

Message ID 20240823074553.15815-1-juraj.linkes@pantheon.tech (mailing list archive)
State Accepted, archived
Delegated to: Juraj Linkeš
Headers
Series [v1] dts: fix testpmd port device error handling mode |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/github-robot: build success github build: passed
ci/intel-Functional success Functional PASS
ci/iol-marvell-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/iol-sample-apps-testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS

Commit Message

Juraj Linkeš Aug. 23, 2024, 7:45 a.m. UTC
Make device_error_handling_mode of testpmd port optional as it may not
be present, e.g. in VM ports.

Fixes: 61d5bc9bf974 ("dts: add port info command to testpmd shell")

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
---
 dts/framework/remote_session/testpmd_shell.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

Luca Vizzarro Sept. 2, 2024, 1:46 p.m. UTC | #1
Reviewed-by: Luca Vizzarro <luca.vizzarro@arm.com>
  
Jeremy Spewock Sept. 5, 2024, 4:10 p.m. UTC | #2
Reviewed-by: Jeremy Spewock <jspewock@iol.unh.edu>
  
Juraj Linkeš Sept. 9, 2024, 3:51 p.m. UTC | #3
Applied to next-dts, thanks.

On 23. 8. 2024 9:45, Juraj Linkeš wrote:
> Make device_error_handling_mode of testpmd port optional as it may not
> be present, e.g. in VM ports.
> 
> Fixes: 61d5bc9bf974 ("dts: add port info command to testpmd shell")
> 
> Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
> ---
>   dts/framework/remote_session/testpmd_shell.py | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/dts/framework/remote_session/testpmd_shell.py b/dts/framework/remote_session/testpmd_shell.py
> index 43e9f56517..c3df44e7ab 100644
> --- a/dts/framework/remote_session/testpmd_shell.py
> +++ b/dts/framework/remote_session/testpmd_shell.py
> @@ -464,8 +464,8 @@ class TestPmdPort(TextParser):
>           metadata=DeviceCapabilitiesFlag.make_parser(),
>       )
>       #:
> -    device_error_handling_mode: DeviceErrorHandlingMode = field(
> -        metadata=DeviceErrorHandlingMode.make_parser()
> +    device_error_handling_mode: DeviceErrorHandlingMode | None = field(
> +        default=None, metadata=DeviceErrorHandlingMode.make_parser()
>       )
>       #:
>       device_private_info: str | None = field(
  

Patch

diff --git a/dts/framework/remote_session/testpmd_shell.py b/dts/framework/remote_session/testpmd_shell.py
index 43e9f56517..c3df44e7ab 100644
--- a/dts/framework/remote_session/testpmd_shell.py
+++ b/dts/framework/remote_session/testpmd_shell.py
@@ -464,8 +464,8 @@  class TestPmdPort(TextParser):
         metadata=DeviceCapabilitiesFlag.make_parser(),
     )
     #:
-    device_error_handling_mode: DeviceErrorHandlingMode = field(
-        metadata=DeviceErrorHandlingMode.make_parser()
+    device_error_handling_mode: DeviceErrorHandlingMode | None = field(
+        default=None, metadata=DeviceErrorHandlingMode.make_parser()
     )
     #:
     device_private_info: str | None = field(