From: Yogesh Jangra <yogesh.jan...@intel.com>

The exported data structure for the header validate instruction did
not populate its struct_id field, which results in segmentation fault.

Fixes: 216bc906d00 ("pipeline: export pipeline instructions to file")
Cc: sta...@dpdk.org

Signed-off-by: Yogesh Jangra <yogesh.jan...@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitre...@intel.com>
---
 lib/pipeline/rte_swx_pipeline.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/pipeline/rte_swx_pipeline.c b/lib/pipeline/rte_swx_pipeline.c
index 232dafb95e..0e631dea2b 100644
--- a/lib/pipeline/rte_swx_pipeline.c
+++ b/lib/pipeline/rte_swx_pipeline.c
@@ -11793,10 +11793,12 @@ instr_hdr_validate_export(struct instruction *instr, 
FILE *f)
                "\t\t.type = %s,\n"
                "\t\t.valid = {\n"
                "\t\t\t.header_id = %u,\n"
+               "\t\t\t.struct_id = %u,\n"
                "\t\t},\n"
                "\t},\n",
                instr_type_to_name(instr),
-               instr->valid.header_id);
+               instr->valid.header_id,
+               instr->valid.struct_id);
 }
 
 static void
-- 
2.25.1

Reply via email to