[2/2] rcu: use correct value of acked token in debug print
Checks
Commit Message
Debug print should use acked token value that was used for comparison.
Fixes: bf386ae377aa ("rcu: add additional debug logs")
Cc: stable@dpdk.org
Reported-by: Nathan Brown <nathan.brown@arm.com>
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Nathan Brown <nathan.brown@arm.com>
---
lib/rcu/rte_rcu_qsbr.h | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
Comments
05/02/2024 05:59, Honnappa Nagarahalli:
> Debug print should use acked token value that was used for comparison.
>
> Fixes: bf386ae377aa ("rcu: add additional debug logs")
> Cc: stable@dpdk.org
>
> Reported-by: Nathan Brown <nathan.brown@arm.com>
> Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
> Reviewed-by: Nathan Brown <nathan.brown@arm.com>
We trust you about RCU :)
Series applied, thanks.
@@ -664,17 +664,20 @@ __rte_rcu_qsbr_check_all(struct rte_rcu_qsbr *v, uint64_t t, bool wait)
static __rte_always_inline int
rte_rcu_qsbr_check(struct rte_rcu_qsbr *v, uint64_t t, bool wait)
{
+ uint64_t acked_token;
+
RTE_ASSERT(v != NULL);
/* Check if all the readers have already acknowledged this token */
- if (likely(t <= rte_atomic_load_explicit(&v->acked_token,
- rte_memory_order_relaxed))) {
+ acked_token = rte_atomic_load_explicit(&v->acked_token,
+ rte_memory_order_relaxed);
+ if (likely(t <= acked_token)) {
__RTE_RCU_DP_LOG(DEBUG,
"%s: check: token = %" PRIu64 ", wait = %d",
__func__, t, wait);
__RTE_RCU_DP_LOG(DEBUG,
"%s: status: least acked token = %" PRIu64,
- __func__, v->acked_token);
+ __func__, acked_token);
return 1;
}