Skip to contentSkip to conversation

net/ice/base: fix parser runtime reset logic

PATCH Applied Junfeng Guo 2 participants 2 messages Oct 11, 2021 – Oct 12, 2021 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/ice/base: fix parser runtime reset logic

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")
---
 drivers/net/ice/base/ice_parser_rt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ice/base/ice_parser_rt.c +2 -2
index eb35ad0bc0..22cd748248 100644
@@ -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;
 }
 
 /**
Signature · 1 line
2.25.1
Acked-by on v1 1/1 Applied
#1 lore raw
Quoted 11 lines

-----Original Message-----
From: Guo, Junfeng <[email protected]>
Sent: Monday, October 11, 2021 9:30 PM
To: Zhang, Qi Z <[email protected]>; Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>
Cc: [email protected]; [email protected]; Yigit, Ferruh <[email protected]>; Guo, Junfeng <[email protected]>
Subject: [PATCH] net/ice/base: fix parser runtime reset logic

Quoted 6 lines

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")

Applied to dpdk-next-net-intel.

Thanks
Qi