[dpdk-dev] [PATCH v1 48/72] net/mlx5/windows: support link update
Narcisa Ana Maria Vasile
navasile at linux.microsoft.com
Wed Nov 11 01:06:14 CET 2020
On Tue, Oct 27, 2020 at 11:23:11PM +0000, Ophir Munk wrote:
> From: Tal Shnaiderman <talshn at nvidia.com>
>
> Add support for mlx5_link_update() to get link speed and link state.
> Other parameters are currently hard-coded.
>
> Signed-off-by: Tal Shnaiderman <talshn at nvidia.com>
> ---
> drivers/net/mlx5/windows/mlx5_ethdev_os.c | 39 +++++++++++++++++++++++++++++++
> 1 file changed, 39 insertions(+)
>
> diff --git a/drivers/net/mlx5/windows/mlx5_ethdev_os.c b/drivers/net/mlx5/windows/mlx5_ethdev_os.c
> index 4925fd8..0c45101 100644
> --- a/drivers/net/mlx5/windows/mlx5_ethdev_os.c
> +++ b/drivers/net/mlx5/windows/mlx5_ethdev_os.c
> @@ -171,6 +171,45 @@ mlx5_os_read_dev_counters(struct rte_eth_dev *dev, uint64_t *stats)
> }
>
> /**
> + * @return
> + * 0 if link status was not updated, positive if it was, a negative errno
> + * value otherwise and rte_errno is set.
> + */
> +int
> +mlx5_link_update(struct rte_eth_dev *dev, int wait_to_complete)
> +{
> + RTE_SET_USED(wait_to_complete);
> + struct mlx5_priv *priv;
> + mlx5_context_st *context_obj;
> + struct rte_eth_link dev_link;
> + int ret;
> +
> + ret = 0;
> + if (!dev) {
> + rte_errno = EINVAL;
> + return rte_errno;
Should this be "return -rte_errno", as per the function descriptiona above?
> + }
> + priv = dev->data->dev_private;
> + context_obj = (mlx5_context_st *)priv->sh->ctx;
> 2.8.4
More information about the dev
mailing list