10/04/2021 11:37, wangyunjian: > From: Yunjian Wang <wangyunj...@huawei.com> > > Currently, new user mem maps are checked if they are adjacent to > an existing mem map and if so, the mem map entries are merged. > > It doesn't check for duplicate mem maps, so if the API is called
As Kevin suggested, it should be in the past tense: "didn't". > with the same mem map multiple times, they will occupy multiple > mem map entries. This will reduce the amount of entries available > for unique mem maps. > > So check for duplicate mem maps and merge them into one mem map > entry if any found. > > Fixes: 0cbce3a167f1 ("vfio: skip DMA map failure if already mapped") > Cc: sta...@dpdk.org > > Suggested-by: Kevin Traynor <ktray...@redhat.com> > Signed-off-by: Yunjian Wang <wangyunj...@huawei.com> > Acked-by: Anatoly Burakov <anatoly.bura...@intel.com> Applied, thanks.