[ewg] RAW ETH support for Mellanox v1 [PATCH 1/1]

Eli Cohen eli at dev.mellanox.co.il
Wed Jun 9 07:34:16 PDT 2010


On Wed, Jun 09, 2010 at 02:29:57PM +0300, Aleksey Senin wrote:
>  
>  	err = mlx4_multicast_attach(mdev->dev, &mqp->mqp, gid->raw, !!(mqp->flags &
> -				    MLX4_IB_QP_BLOCK_MULTICAST_LOOPBACK));
> +				    MLX4_IB_QP_BLOCK_MULTICAST_LOOPBACK),
> +					(ibqp->qp_type == IB_QPT_RAW_ETH) ?
> +					MLX4_PROT_EN : MLX4_PROT_IB);
>  	if (err)
>  		return err;

Usage of MLX4_PROT_EN and MLX4_PROT_IB is wrong in this context since
they are used for a totally different purpose. You need to define a
new enum and explicitly set values for it to reflect hardware
definitions.

> @@ -1237,12 +1240,16 @@ static int __mlx4_ib_modify_qp(struct ib_qp *ibqp,
>  	if (cur_state == IB_QPS_INIT &&
>  	    new_state == IB_QPS_RTR  &&
>  	    (ibqp->qp_type == IB_QPT_GSI || ibqp->qp_type == IB_QPT_SMI ||
> -	     ibqp->qp_type == IB_QPT_UD || ibqp->qp_type == IB_QPT_RAW_ETY)) {
> +	     ibqp->qp_type == IB_QPT_UD || ibqp->qp_type == IB_QPT_RAW_ETY ||
> +		ibqp->qp_type == IB_QPT_RAW_ETH)) {
>  		context->pri_path.sched_queue = (qp->port - 1) << 6;
>  		if (is_qp0(dev, qp))
>  			context->pri_path.sched_queue |= MLX4_IB_DEFAULT_QP0_SCHED_QUEUE;
>  		else
>  			context->pri_path.sched_queue |= MLX4_IB_DEFAULT_SCHED_QUEUE;
> +
> +		/* Default counter for non-RC QPs */
> +		context->pri_path.counter_index = 0xff;

Looks like this breaks hardware counters. Why are you using this
statement? Also it appears that the patches were not created against
latest OFED 1.5.2 sources.

Did you check that counters are still working for RoCEE after this
patch?




More information about the ewg mailing list