src/dpdk/drivers/net/mlx4/mlx4_mr.c
static void
mr_rebuild_dev_cache(struct rte_eth_dev *dev)
{
	struct mlx4_priv *priv = dev->data->dev_private;
	struct mlx4_mr *mr;

	DEBUG("port %u rebuild dev cache[]", dev->data->port_id);
	/* Flush cache to rebuild. */
	priv->mr.cache.len = 1;
	priv->mr.cache.overflow = 0;
	/* Iterate all the existing MRs. */
	LIST_FOREACH(mr, &priv->mr.mr_list, mr)
		if (mr_insert_dev_cache(dev, mr) < 0)
			return;
}
/**
 * Rebuild the global B-tree cache of device from the original MR list.
 *
 * @param dev
 *   Pointer to Ethernet device.
 */
Rebuild the global B-tree cache of device from the original MR list.
@param dev
Pointer to Ethernet device.
Rebuild the global B - tree cache of device from the original MR list . @param dev Pointer to Ethernet device .
static void
mr_rebuild_dev_cache(struct rte_eth_dev *dev)
{
	struct mlx4_priv *priv = dev->data->dev_private;
	struct mlx4_mr *mr;
	DEBUG("port %u rebuild dev cache[]", dev->data->port_id);
	priv->mr.cache.len = 1;
	priv->mr.cache.overflow = 0;
	LIST_FOREACH(mr, &priv->mr.mr_list, mr)
		if (mr_insert_dev_cache(dev, mr) < 0)
			return;
}
static void mr_rebuild_dev_cache ( struct rte_eth_dev * dev ) { struct mlx4_priv * priv = dev -> data -> dev_private ; struct mlx4_mr * mr ; DEBUG ( " " , dev -> data -> port_id ) ; priv -> mr . cache . len = 1 ; priv -> mr . cache . overflow = 0 ; LIST_FOREACH ( mr , & priv -> mr . mr_list , mr ) if ( mr_insert_dev_cache ( dev , mr ) < 0 ) return ; }
Rebuild the global B-tree cache of device from the original MR list.
Rebuild the global B - tree cache of device from the original MR list .
/* Flush cache to rebuild. */ /* Iterate all the existing MRs. */