}
priv = dev->data->dev_private;
sh = priv->sh;
- rte_rwlock_read_lock(&sh->share_cache.rwlock);
+ rte_rwlock_write_lock(&sh->share_cache.rwlock);
mr = mlx5_mr_lookup_list(&sh->share_cache, &entry, (uintptr_t)addr);
if (!mr) {
- rte_rwlock_read_unlock(&sh->share_cache.rwlock);
+ rte_rwlock_write_unlock(&sh->share_cache.rwlock);
DRV_LOG(WARNING, "address 0x%" PRIxPTR " wasn't registered "
"to PCI device %p", (uintptr_t)addr,
(void *)pdev);
++sh->share_cache.dev_gen;
DRV_LOG(DEBUG, "broadcasting local cache flush, gen=%d",
sh->share_cache.dev_gen);
- rte_rwlock_read_unlock(&sh->share_cache.rwlock);
+ rte_rwlock_write_unlock(&sh->share_cache.rwlock);
return 0;
}