Skip to contentSkip to conversation

pipeline: fix rss configuration

PATCH New yjangra 1 participant 1 message Mar 2, 2023

lore
Share & tools
lore

yjangra

author
#0 lore raw

PATCH 1/1 pipeline: fix rss configuration

Currently, the rss object is configured after action, which leads to rss instruction failure, when rss instruction is called from action block. To resolve the error, rss object is configured before action and apply block.

Fixes 8ba342ce6f0 (pipeline: add RSS)
---
 lib/pipeline/rte_swx_pipeline_spec.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)
lib/pipeline/rte_swx_pipeline_spec.c +12 -12
index a164275526..006b24082a 100644
@@ -3557,6 +3557,18 @@ pipeline_spec_configure(struct rte_swx_pipeline *p,
 		}
 	}
 
+	/* rss. */
+	for (i = 0; i < s->n_rss; i++) {
+		struct rss_spec *rss_spec = &s->rss[i];
+
+		status = rte_swx_pipeline_rss_config(p, rss_spec->name);
+		if (status) {
+			if (err_msg)
+				*err_msg = "rss object configuration error.";
+			return status;
+		}
+	}
+
 	/* metarray. */
 	for (i = 0; i < s->n_metarrays; i++) {
 		struct metarray_spec *metarray_spec = &s->metarrays[i];
@@ -3678,18 +3690,6 @@ pipeline_spec_configure(struct rte_swx_pipeline *p,
 		}
 	}
 
-	/* rss. */
-	for (i = 0; i < s->n_rss; i++) {
-		struct rss_spec *rss_spec = &s->rss[i];
-
-		status = rte_swx_pipeline_rss_config(p, rss_spec->name);
-		if (status) {
-			if (err_msg)
-				*err_msg = "rss object configuration error.";
-			return status;
-		}
-	}
-
 	/* apply. */
 	for (i = 0; i < s->n_apply; i++) {
 		struct apply_spec *apply_spec = &s->apply[i];
Signature · 1 line
2.25.1