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 31207A034F; Mon, 11 Oct 2021 07:44:59 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E83A040E01; Mon, 11 Oct 2021 07:44:58 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 6CA2840142; Mon, 11 Oct 2021 07:44:57 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10133"; a="250185804" X-IronPort-AV: E=Sophos;i="5.85,363,1624345200"; d="scan'208";a="250185804" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Oct 2021 22:44:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,363,1624345200"; d="scan'208";a="441308418" Received: from dpdk-junfengguo-v1.sh.intel.com ([10.67.119.231]) by orsmga003.jf.intel.com with ESMTP; 10 Oct 2021 22:44:54 -0700 From: Junfeng Guo To: qi.z.zhang@intel.com, jingjing.wu@intel.com, beilei.xing@intel.com Cc: dev@dpdk.org, stable@dpdk.org, ferruh.yigit@intel.com, junfeng.guo@intel.com Date: Mon, 11 Oct 2021 13:30:13 +0000 Message-Id: <20211011133013.3848139-1-junfeng.guo@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] net/ice/base: fix parser runtime reset logic 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 Sender: "dev" Adjust the codeline order of the parser runtime reset, since the struct rt->psr is used in function _rt_flag_set before assignment. Fixes: c84f8aa2100c ("net/ice/base: add parser runtime skeleton") Signed-off-by: Junfeng Guo Cc: stable@dpdk.org --- drivers/net/ice/base/ice_parser_rt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ice/base/ice_parser_rt.c b/drivers/net/ice/base/ice_parser_rt.c index eb35ad0bc0..22cd748248 100644 --- a/drivers/net/ice/base/ice_parser_rt.c +++ b/drivers/net/ice/base/ice_parser_rt.c @@ -87,12 +87,12 @@ void ice_parser_rt_reset(struct ice_parser_rt *rt) _rt_np_set(rt, mi->pc); _rt_nn_set(rt, mi->pg_rn); + rt->psr = psr; + for (i = 0; i < 64; i++) { if ((mi->flags & (1ul << i)) != 0ul) _rt_flag_set(rt, i, true); } - - rt->psr = psr; } /** -- 2.25.1