In the legacy mem mode, when the fb_array is being populated, if there are 
holes in between, the ms_idx could go backward and there will be an overlap of 
the region starting from the ms_idx returned later. i.e. it's being mapped to 
two different physical regions in PA space to a contiguous region in VA space. 
this would result in the allocator assuming that the memory is contiguous even 
though there is a hole in between. In legacy mem, allocator assumes that PA 
contiguous are VA contiguous as well.

Cc: [email protected]

Signed-off-by: Vipin P R <[email protected]>
Acked-by: Kumara Parameshwaran <[email protected]>
---
 .mailmap                            | 1 +
 lib/eal/common/eal_common_fbarray.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/.mailmap b/.mailmap
index 75884b6..3707bf5 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1391,6 +1391,7 @@ Vincent Guo <[email protected]>
 Vincent Jardin <[email protected]>
 Vincent Li <[email protected]>
 Vincent S. Cojot <[email protected]>
+Vipin P R <[email protected]> <[email protected]>
 Vipin Varghese <[email protected]> <[email protected]>
 Vipul Ashri <[email protected]>
 Vishal Kulkarni <[email protected]>
diff --git a/lib/eal/common/eal_common_fbarray.c 
b/lib/eal/common/eal_common_fbarray.c
index f11f879..551bd87 100644
--- a/lib/eal/common/eal_common_fbarray.c
+++ b/lib/eal/common/eal_common_fbarray.c
@@ -236,7 +236,7 @@ find_next_n(const struct rte_fbarray *arr, unsigned int 
start, unsigned int n,
                                 * as well, so skip that on next iteration.
                                 */
                                ignore_msk = ~((1ULL << need) - 1);
-                               msk_idx = lookahead_idx;
+                               msk_idx = lookahead_idx - 1;
                                break;
                        }
 
-- 
2.7.4

Reply via email to