[ofa-general][PATCH] mlx4: Moving db management to mlx4_core (MP support, Patch 1)

Roland Dreier rdreier at cisco.com
Fri Apr 18 09:19:35 PDT 2008


 > +	INIT_LIST_HEAD(&priv->pgdir_list);
 > +	mutex_init(&priv->pgdir_mutex);

Your patch adds pgdir_list to core but doesn't remove it from mlx4_ib.

 > -		err = mlx4_ib_db_alloc(dev, &cq->db, 1);
 > +		err = mlx4_db_alloc(dev->dev, dev->ib_dev.dma_device, &cq->db, 1);

 > +int mlx4_db_alloc(struct mlx4_dev *dev, struct device *dma_device,
 > +		  struct mlx4_db *db, int order)

I must be missing something but why do you add the dma_device parameter
here?  When would a consumer ever want to pass something other than
dev->pdev->dev?

 > +int mlx4_alloc_hwq_res(struct mlx4_dev *dev, struct mlx4_hwq_resources *wqres,
 > +		       struct device *dma_device, int size, int max_direct)

This is adding a separate API beyond just moving the doorbell stuff to
mlx4_core.  Please separate this still further into another patch.

Can mlx4_ib use this interface too?

 - R.



More information about the general mailing list