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 B956541DB3; Thu, 2 Mar 2023 06:35:45 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9799940E09; Thu, 2 Mar 2023 06:35:45 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id ADDD940DFB for ; Thu, 2 Mar 2023 06:35:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1677735343; x=1709271343; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=M/bFD8e7PQQ4K1ZmytGAtQxViJ9IqyhUwfvw4hnUhlM=; b=FSWHry0Ss4LwBixExVH1uOdotmbTW1tTBzmgIyGDNqDRSfMyDV4mQX2t WtWHsm7nCcZBY8mGOfng4Co8za0Bc3YTFhvxynuyDzh4mTceYwLXKzygk 9Nx7WYjdwYsTJtV8cZsb+4fY89ObFhyegUyP0dXInhiiwQbJe/UQCFlF7 Wdiyum+O5qi18kb7ULiHJZsB/3RbvwAEOg9A/PAPOdHaMx1dMy3py0cmH GGLXOLXi2zIxanRJZf+5AV/EE1vbMLlE0WDZAdGkhzRxOY7AUkHQ+B+Ja YeJuHT2u1lv6Re1psgo0JXDd6A8Fs2Xfr5BoqMojs48lz/SBOrfn9R18I A==; X-IronPort-AV: E=McAfee;i="6500,9779,10636"; a="399411780" X-IronPort-AV: E=Sophos;i="5.98,226,1673942400"; d="scan'208";a="399411780" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Mar 2023 21:35:42 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10636"; a="677051010" X-IronPort-AV: E=Sophos;i="5.98,226,1673942400"; d="scan'208";a="677051010" Received: from ena3-s2600wft.iind.intel.com (HELO localhost.localdomain) ([10.235.221.73]) by fmsmga007.fm.intel.com with ESMTP; 01 Mar 2023 21:35:40 -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 10:59:42 +0530 Message-Id: <20230302052942.1282634-1-yogesh.jangra@intel.com> X-Mailer: git-send-email 2.25.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 From: yjangra 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.25.1