X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fmlx4%2Fmlx4_mr.c;h=2274b5df195016f318960c421a6d33f9ed6959c1;hb=891f8260dd49d4bc683cffaca79b7f7d5247b968;hp=6b2f0cf1877ea571746066cc58d65bfadfc35879;hpb=8e08df22f0ab07c44efcdd2ee5d867d30af77028;p=dpdk.git diff --git a/drivers/net/mlx4/mlx4_mr.c b/drivers/net/mlx4/mlx4_mr.c index 6b2f0cf187..2274b5df19 100644 --- a/drivers/net/mlx4/mlx4_mr.c +++ b/drivers/net/mlx4/mlx4_mr.c @@ -948,18 +948,13 @@ mlx4_mr_mem_event_free_cb(struct rte_eth_dev *dev, const void *addr, size_t len) if (rebuild) { mr_rebuild_dev_cache(dev); /* - * Flush local caches by propagating invalidation across cores. - * rte_smp_wmb() is enough to synchronize this event. If one of - * freed memsegs is seen by other core, that means the memseg - * has been allocated by allocator, which will come after this - * free call. Therefore, this store instruction (incrementing - * generation below) will be guaranteed to be seen by other core - * before the core sees the newly allocated memory. + * No explicit wmb is needed after updating dev_gen due to + * store-release ordering in unlock that provides the + * implicit barrier at the software visible level. */ ++priv->mr.dev_gen; DEBUG("broadcasting local cache flush, gen=%d", priv->mr.dev_gen); - rte_smp_wmb(); } rte_rwlock_write_unlock(&priv->mr.rwlock); #ifdef RTE_LIBRTE_MLX4_DEBUG