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 728B041DB3; Thu, 2 Mar 2023 06:28:47 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4F98541151; Thu, 2 Mar 2023 06:28:47 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id A70EF40DFB for ; Thu, 2 Mar 2023 06:28:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1677734925; x=1709270925; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=DJVyOqj6VfdMeMDnRjvIshvirwewpGswAEKYKsdY/fU=; b=AeEiYKmd2IoTAShL6b6RqAKc24WvA7S5/A0eiWDSvpHCyde/cyUn0zdh /SjGnCPlLafLTjMj61TY6Nlb0eti+ZBTQnAZ38oL54MPpHbI3Onhunxc1 73FkUduH0kAANwxDG9mV/ZMVK5sM6IYhoqKBdxOI3oR+ZQlrhfCZS5UDU 2GCHHPm8usmq/C8sdSSPtdpO5Q+GWqJemVMu36p8V4re7I8e2ws+kZpg0 cA6a91WSVtm4ImgdLSyCUe/vrlMePL6930fTFuU6FzYmwdUvhMp9j5zeX 92OkDF3ehHSkHUJJ98BL+oW0CNb6Tppb22GeG5nR/DRkaWpu4l8ksM3Vp Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10636"; a="318422342" X-IronPort-AV: E=Sophos;i="5.98,226,1673942400"; d="scan'208";a="318422342" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Mar 2023 21:28:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10636"; a="668112116" X-IronPort-AV: E=Sophos;i="5.98,226,1673942400"; d="scan'208";a="668112116" Received: from ena3-s2600wft.iind.intel.com (HELO localhost.localdomain) ([10.235.221.73]) by orsmga007.jf.intel.com with ESMTP; 01 Mar 2023 21:28:42 -0800 From: yjangra 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:52:34 +0530 Message-Id: <20230302052234.1282452-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 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