Re: [PATCH rfc 2/6] mlx5: move affinity hints assignments to generic code

2017-04-06 Thread Sagi Grimberg
static int mlx5e_get_cpu(struct mlx5e_priv *priv, int ix) { - return cpumask_first(priv->mdev->priv.irq_info[ix].mask); + return cpumask_first(pci_irq_get_affinity(priv->mdev->pdev, + MLX5_EQ_VEC_COMP_BASE + ix)); This looks ok for now, but if we look at the c

Re: [PATCH rfc 2/6] mlx5: move affinity hints assignments to generic code

2017-04-03 Thread Christoph Hellwig
> @@ -1375,7 +1375,8 @@ static void mlx5e_close_cq(struct mlx5e_cq *cq) > > static int mlx5e_get_cpu(struct mlx5e_priv *priv, int ix) > { > - return cpumask_first(priv->mdev->priv.irq_info[ix].mask); > + return cpumask_first(pci_irq_get_affinity(priv->mdev->pdev, > +

[PATCH rfc 2/6] mlx5: move affinity hints assignments to generic code

2017-04-02 Thread Sagi Grimberg
generic api takes care of spreading affinity similar to what mlx5 open coded (and even handles better asymmetric configurations). Ask the generic API to spread affinity for us, and feed him pre_vectors that do not participate in affinity settings (which is an improvement to what we had before). Th