From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B325541DB3; Thu, 2 Mar 2023 07:31:00 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5D12040E09; Thu, 2 Mar 2023 07:31:00 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 0B1D240DFB for ; Thu, 2 Mar 2023 07:30:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1677738658; x=1709274658; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=Kl7tX37eYpczC3tjdFkZhWTT0CxyxuJzqN9nxKvT4kE=; b=k8Z7BrqQ5rI530bsq1lgmmLiOdBStoB7uPiCiQpN+AQRPnemXuDTk1Rn MfAsk8Sf5B4/4iWe9lFBxN+r5uB3Q1rjMT1rl+lIB/KCUsGBTbgP59lPz TZh12zAEw+RdGuHrurRQESyTLZcu2H0q13db1RexePo4Z5K5M+uzSw93c 4KjjiKVSsae55vihfEqm2ft7sviIQuy2TkQrY/Z/k+Zi83sXwi06P7zyM bsrfUApSXW/a+5pYmGzlC75W3keqH8esceHQc026RWbuwBqTOFGH/12f+ nYqriqlFKx5xyxZo2Du/Cc/erbAGG4ymwuTCRkHvIXzdP+5affp9jz3pF w==; X-IronPort-AV: E=McAfee;i="6500,9779,10636"; a="336132034" X-IronPort-AV: E=Sophos;i="5.98,226,1673942400"; d="scan'208";a="336132034" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Mar 2023 22:30:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10636"; a="652290391" X-IronPort-AV: E=Sophos;i="5.98,226,1673942400"; d="scan'208";a="652290391" Received: from ena3-s2600wft.iind.intel.com ([10.235.221.73]) by orsmga006.jf.intel.com with ESMTP; 01 Mar 2023 22:30:54 -0800 From: Yogesh Jangra To: dev@dpdk.org Cc: cristian.dumitrescu@intel.com, kamalakannan.r@intel.com, harshad.suresh.narayane@intel.com, yogesh.jangra@intel.com, R@dpdk.org Subject: [PATCH] pipeline: fix rss configuration Date: Thu, 2 Mar 2023 12:00:45 +0530 Message-Id: <20230302063045.1790290-1-yogesh.jangra@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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) Signed-off-by: Yogesh Jangra Signed-off-by: R, Kamalakannan Acked-by: Cristian Dumitrescu --- lib/pipeline/rte_swx_pipeline_spec.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/pipeline/rte_swx_pipeline_spec.c b/lib/pipeline/rte_swx_pipeline_spec.c index a164275526..006b24082a 100644 --- a/lib/pipeline/rte_swx_pipeline_spec.c +++ b/lib/pipeline/rte_swx_pipeline_spec.c @@ -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]; -- 2.34.1