Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Nov 2016 15:39:46 +0000
From:      =?utf-8?B?Vmluw61jaXVzIEZlcnLDo28=?= <ferrao@vmio.com.br>
To:        Meny Yossefi <menyy@mellanox.com>
Cc:        "freebsd-infiniband@freebsd.org" <freebsd-infiniband@freebsd.org>, "Mark Bloch" <markb@mellanox.com>, Yuval Bason <yuvalba@mellanox.com>, "Hans Petter Selasky" <hanss@mellanox.com>
Subject:   Re: Device hints to put mlx4 on IB mode
Message-ID:  <D2621C85-E6C0-4A2B-8E6D-A32655DE5ABA@vmio.com.br>
In-Reply-To: <DB5PR05MB176572180CC2D5143694F8B7C3B80@DB5PR05MB1765.eurprd05.prod.outlook.com>
References:  <B1D279B3-FD90-4997-84D2-605D7B4AE967@vmio.com.br> <fabc0ffda5574d729360cacca6650267@AM5PR0502MB2916.eurprd05.prod.outlook.com> <DB5PR05MB176572180CC2D5143694F8B7C3B80@DB5PR05MB1765.eurprd05.prod.outlook.com>

next in thread | previous in thread | raw e-mail | index | archive | help

Hello Meny,

Thanks for the input. You’re recommending a driver code change to start always on IB mode. This appears to be OK, but it's little dangerous. I will need to keep the patches for the drivers/modules if anything changes, right?

Another question, changing the starting mode cannot be done in other place? Like the Connect-X3 firmware? If not, since you’re on Mellanox can we recommend a better approach from the upstream (mlx) or this would be inviable?

Thanks for your attention and time, it was really helpful.

V.

> On 10 Nov 2016, at 10:21, Meny Yossefi <menyy@mellanox.com> wrote:
> 
> Hi, 
> 
> I'm not familiar of any hints passed from the bootloader.
> 
> We do have some FW tools to identify number of NIC ports, but I guess that won't serve your purpose.
> 
> The only option I can think of at the moment is to force all ports to come up in IB mode.
> 
> Try using this as reference: 
> 
> sys/ofed/drivers/net/mlx4/main.c:
> 
> 
> static struct param_data port_type_array = {
>        .dbdf2val = {
>                .name           = "port_type_array param",
>                .num_vals       = 2,
> -           .def_val        = {MLX4_PORT_TYPE_NONE, MLX4_PORT_TYPE_NONE},
> +         .def_val    = {MLX4_PORT_TYPE_IB, MLX4_PORT_TYPE_IB},
>                .range          = {MLX4_PORT_TYPE_IB, MLX4_PORT_TYPE_NA}
>        }
> };
> @@ -759,6 +759,9 @@ static int mlx4_dev_cap(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap)
>                         (dev->caps.flags & MLX4_DEV_CAP_FLAG_DPDP) &&
>                         (dev->caps.flags & MLX4_DEV_CAP_FLAG_SENSE_SUPPORT));
> 
> +         /* MY: disablling auto sense for default IB/Eth ports support */
> +         mlx4_priv(dev)->sense.sense_allowed[i] = 0;
> +
>                /*
>                 * If "default_sense" bit is set, we move the port to "AUTO" mode
>                 * and perform sense_port FW command to try and set the correct
> 
> -Meny
> 
> 
> -----Original Message-----
> From: freebsd-commits-tracker 
> Sent: Wednesday, November 09, 2016 1:55 PM
> To: Mark Bloch <markb@mellanox.com>; Meny Yossefi <menyy@mellanox.com>; Yuval Bason <yuvalba@mellanox.com>
> Subject: FW: Device hints to put mlx4 on IB mode
> 
> 
> 
> 
> ________________________________________
> From: owner-freebsd-infiniband@freebsd.orgOn Behalf OfVinícius Ferrão
> Sent: Tuesday, November 8, 2016 4:27:13 PM (UTC+00:00) Monrovia, Reykjavik
> To: freebsd-infiniband@freebsd.org
> Subject: Device hints to put mlx4 on IB mode
> 
> Hello guys,
> 
> I would like to put my Connect-X3 card in IB mode during boot time using device hints instead of sysctl's.
> 
> Today we have this dirty workarround on /etc/sysctl.conf:
> sys.device.mlx4_core0.mlx4_port1=ib
> sys.device.mlx4_core0.mlx4_port2=ib
> 
> It's fine when we use a Connect-X3 card with two Infiniband interfaces, but if a ConnectX-3 card with only one interface is used an error message is dumped on the console about failing to set the "sys.device.mlx4_core0.mlx4_port2=ib" sysctl.
> 
> To solve this I would like to use device hints passed from the GRUB2 bootloader, but I was unable to find which hints I should use for the mlx4 drivers. I don't even know if this is supported.
> 
> The problem is purely cosmetic, I just want to get rid of the error message during the boot process.
> 
> Thanks in advance,
> V.
> 
> 
> 
> 
> _______________________________________________
> freebsd-infiniband@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-infiniband
> To unsubscribe, send any mail to "freebsd-infiniband-unsubscribe@freebsd.org"
> _______________________________________________
> freebsd-infiniband@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-infiniband
> To unsubscribe, send any mail to "freebsd-infiniband-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D2621C85-E6C0-4A2B-8E6D-A32655DE5ABA>