Hi Michal,

>>     for ( i = 0; i < mem->nr_banks; i++ )
>>     {
>>         /*
>>          * Meet the following check:
>> -         * 1) The shm ID matches and the region exactly match
>> -         * 2) The shm ID doesn't match and the region doesn't overlap
>> -         * with an existing one
>> +         * - when host address is provided:
>> +         *   1) The shm ID matches and the region exactly match
>> +         *   2) The shm ID doesn't match and the region doesn't overlap
>> +         *      with an existing one
>> +         * - when host address is not provided:
>> +         *   1) The shm ID matches and the region size exactly match
>>          */
>> -        if ( paddr == mem->bank[i].start && size == mem->bank[i].size )
>> +        bool paddr_assigned = (INVALID_PADDR == paddr);
> Shouldn't it be INVALID_PADDR != paddr to indicate that paddr was assigned? 
> Otherwise, looking at the
> code belowe you would allow a configuration where the shm_id matches but the 
> phys addresses don't.

You are right, good catch, somehow it escaped testing, I’ll fix in the next push

> 
> ~Michal

Reply via email to