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 ABF7A41DB5; Thu, 2 Mar 2023 08:08:43 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 40E9340E09; Thu, 2 Mar 2023 08:08:43 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id A5A7B40DFB for ; Thu, 2 Mar 2023 08:08:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1677740920; x=1709276920; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=ILu3sNcHMZUchrhnQ/AdX+En+5Ou2AqBo45rdi/c+cA=; b=ZbCEzu5jqJkU5snHK+NTchxwi/VEGobeFFtcWwbWInLaKWQsp/0Dz4Bs uP1c1T/bAvrh7vWXZ0rtLicTJOGfkxO+ieMNgqBqa8IxY37GUb3BM4TD7 l2J3d2znbeBFCKySxrnQCljUcfJHsF6Eflch3HQw9RWIccSRCUAAaXK+x 5eJSWSZ5oXopoWcmYk6Z4S3l7ZxlSLxE7NH1/bcJRAzd6xcjszfxUPRN+ 2ByasN+iSpDH+ptcD360v0ML4GA+nbh8C+qIlJij38dVa/G7daKqLKpPk DTyd2nXGs8ujI6H5AAZkjRVYnDdQ55wmlGjzLshuXwevw/10sniUSCQ/l Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10636"; a="322914031" X-IronPort-AV: E=Sophos;i="5.98,226,1673942400"; d="scan'208";a="322914031" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Mar 2023 23:08:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10636"; a="707308973" X-IronPort-AV: E=Sophos;i="5.98,226,1673942400"; d="scan'208";a="707308973" Received: from ena3-s2600wft.iind.intel.com ([10.235.221.73]) by orsmga001.jf.intel.com with ESMTP; 01 Mar 2023 23:08:38 -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 Subject: [PATCH] pipeline: fix rss configuration Date: Thu, 2 Mar 2023 12:38:03 +0530 Message-Id: <20230302070803.1790851-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: Kamalakannan R 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