[PATCH] pipeline: fix code generation for the recirculation ID instruction

Cristian Dumitrescu cristian.dumitrescu at intel.com
Mon Jul 18 14:59:53 CEST 2022


The "offset" and "n_bits" fields were generated incorrectly, hence the
output C file was producing compilation errors when the "recircid"
instruction was used.

Fixes: 5ec76d29dc6 ("pipeline: support packet recirculation")
Cc: stable at dpdk.org

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu at intel.com>
---
 lib/pipeline/rte_swx_pipeline.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/pipeline/rte_swx_pipeline.c b/lib/pipeline/rte_swx_pipeline.c
index 732a064a60..3e1c6e9edb 100644
--- a/lib/pipeline/rte_swx_pipeline.c
+++ b/lib/pipeline/rte_swx_pipeline.c
@@ -11095,8 +11095,10 @@ instr_recircid_export(struct instruction *instr, FILE *f)
 		"\t{\n"
 		"\t\t.type = %s,\n"
 		"\t\t.io = {\n"
-		"\t\t\t.offset = %u,\n"
-		"\t\t\t.n_bits = %u,\n"
+		"\t\t\t.io = {\n"
+		"\t\t\t\t.offset = %u,\n"
+		"\t\t\t\t.n_bits = %u,\n"
+		"\t\t\t},\n"
 		"\t\t},\n"
 		"\t},\n",
 		instr_type_to_name(instr),
-- 
2.34.1



More information about the stable mailing list