[dpdk-dev] [PATCH v3 4/4] regex/mlx5: prevent wrong calculation of free sqs in umr mode

Thomas Monjalon thomas at monjalon.net
Tue Apr 6 18:22:34 CEST 2021


30/03/2021 03:39, Suanming Mou:
> From: John Hurley <jhurley at nvidia.com>
> 
> A recent change adds support for scattered mbuf and UMR support for regex.
> Part of this commit makes the pi and ci counters of the regex_sq a quarter
> of the length in non umr mode, effectively moving them from 16 bits to
> 14. The new get_free method casts the difference in pi and ci to a 16 bit
> value when calculating the free send queues, accounting for any wrapping
> when pi has looped back to 0 but ci has not yet. However, the move to 14
> bits while still casting to 16 can now lead to corrupted, large values
> returned.
> 
> Modify the get_free function to take in the has_umr flag and, accordingly,
> account for wrapping on either 14 or 16 bit pi/ci difference.
> 
> Fixes: d55c9f637263 ("regex/mlx5: add data path scattered mbuf process")

It is fixing a patch in this series, right?
Why not squashing them?





More information about the dev mailing list