From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marc Subject: Re: [PATCH v8 3/4] ethdev: redesign link speed config API Date: Mon, 15 Feb 2016 12:00:02 +0100 Message-ID: References: <1454028127-10401-1-git-send-email-marcdevel@gmail.com> <1455488259-1000-1-git-send-email-marcdevel@gmail.com> <1455488259-1000-4-git-send-email-marcdevel@gmail.com> <20160215084639.GL14424@autoinstall.dev.6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: dev@dpdk.org To: =?UTF-8?Q?N=C3=A9lio_Laranjeiro?= Return-path: Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by dpdk.org (Postfix) with ESMTP id 56C095938 for ; Mon, 15 Feb 2016 12:00:22 +0100 (CET) Received: by mail-wm0-f68.google.com with SMTP id a4so9913279wme.3 for ; Mon, 15 Feb 2016 03:00:22 -0800 (PST) In-Reply-To: <20160215084639.GL14424@autoinstall.dev.6wind.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 15 February 2016 at 09:46, N=C3=A9lio Laranjeiro wrote: > On Sun, Feb 14, 2016 at 11:17:38PM +0100, Marc Sune wrote: > > This patch redesigns the API to set the link speed/s configure > > for an ethernet port. Specifically: > > > > - it allows to define a set of advertised speeds for > > auto-negociation. > > - it allows to disable link auto-negociation (single fixed speed). > > - default: auto-negociate all supported speeds. > > > >[...] > > diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c > > index c5688a7..01c3a5c 100644 > > --- a/drivers/net/mlx4/mlx4.c > > +++ b/drivers/net/mlx4/mlx4.c > > @@ -4265,8 +4265,8 @@ mlx4_dev_infos_get(struct rte_eth_dev *dev, struc= t > rte_eth_dev_info *info) > > if (priv_get_ifname(priv, &ifname) =3D=3D 0) > > info->if_index =3D if_nametoindex(ifname); > > > > - info->speed_capa =3D ETH_SPEED_CAP_10G |ETH_SPEED_CAP_40G | > > - ETH_SPEED_CAP_56G; > > + info->speed_capa =3D ETH_LINK_SPEED_10G |ETH_LINK_SPEED_40G | > > + ETH_LINK_SPEED_56G; > > > > priv_unlock(priv); > > } > > @@ -4636,6 +4636,8 @@ mlx4_link_update_unlocked(struct rte_eth_dev *dev= , > int wait_to_complete) > > dev_link.link_speed =3D link_speed; > > dev_link.link_duplex =3D ((edata.duplex =3D=3D DUPLEX_HALF) ? > > ETH_LINK_HALF_DUPLEX : > ETH_LINK_FULL_DUPLEX); > > + dev_link.link_autoneg =3D ~(dev->data->dev_conf.link_speeds & > > + ETH_LINK_SPEED_NO_AUTONEG= ); > > if (memcmp(&dev_link, &dev->data->dev_link, sizeof(dev_link))) { > > /* Link status changed. */ > > dev->data->dev_link =3D dev_link; > >[...] > > The same modification are missing in mlx5. > > Damn.. are the required closed-source libraries for MLX4/5 available somewhere or is there a chance automatic builds can also compile drivers that require external dependencies (like this MLX)? It is very prone to errors having to guess what is going to happen without being able to compile these drivers. Marc -- > N=C3=A9lio Laranjeiro > 6WIND >