[v3,01/12] dts: fix default device error handling mode

Message ID 20240821145315.97974-2-juraj.linkes@pantheon.tech (mailing list archive)
State Superseded
Delegated to: Juraj Linkeš
Headers
Series dts: add test skipping based on capabilities |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation warning apply patch failure
ci/iol-testing warning apply patch failure

Commit Message

Juraj Linkeš Aug. 21, 2024, 2:53 p.m. UTC
The device_error_handling_mode of testpmd port 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

Jeremy Spewock Aug. 26, 2024, 4:42 p.m. UTC | #1
On Wed, Aug 21, 2024 at 10:53 AM Juraj Linkeš
<juraj.linkes@pantheon.tech> wrote:
>
> The device_error_handling_mode of testpmd port 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>

Reviewed-by: Jeremy Spewock <jspewock@iol.unh.edu>
  
Dean Marx Aug. 27, 2024, 4:15 p.m. UTC | #2
On Wed, Aug 21, 2024 at 10:53 AM Juraj Linkeš <juraj.linkes@pantheon.tech>
wrote:

> The device_error_handling_mode of testpmd port 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>
>

Reviewed-by: Dean Marx <dmarx@iol.unh.edu>
  
Nicholas Pratte Aug. 27, 2024, 8:09 p.m. UTC | #3
On Wed, Aug 21, 2024 at 10:53 AM Juraj Linkeš
<juraj.linkes@pantheon.tech> wrote:
>
> The device_error_handling_mode of testpmd port 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>
> ---

Reviewed-by: Nicholas Pratte <npratte@iol.unh.edu>
  

Patch

diff --git a/dts/framework/remote_session/testpmd_shell.py b/dts/framework/remote_session/testpmd_shell.py
index a5347b07dc..b4ad253020 100644
--- a/dts/framework/remote_session/testpmd_shell.py
+++ b/dts/framework/remote_session/testpmd_shell.py
@@ -465,8 +465,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(