[dpdk-dev] [PATCH v8 3/4] ethdev: redesign link speed config API

Marc marcdevel at gmail.com
Mon Feb 15 12:00:02 CET 2016


On 15 February 2016 at 09:46, Nélio Laranjeiro <nelio.laranjeiro at 6wind.com>
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, struct
> rte_eth_dev_info *info)
> >       if (priv_get_ifname(priv, &ifname) == 0)
> >               info->if_index = if_nametoindex(ifname);
> >
> > -     info->speed_capa = ETH_SPEED_CAP_10G |ETH_SPEED_CAP_40G |
> > -                                     ETH_SPEED_CAP_56G;
> > +     info->speed_capa = 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 = link_speed;
> >       dev_link.link_duplex = ((edata.duplex == DUPLEX_HALF) ?
> >                               ETH_LINK_HALF_DUPLEX :
> ETH_LINK_FULL_DUPLEX);
> > +     dev_link.link_autoneg = ~(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 = 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élio Laranjeiro
> 6WIND
>


More information about the dev mailing list