From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D8A19A04E7; Wed, 11 Nov 2020 01:06:17 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A34632B93; Wed, 11 Nov 2020 01:06:16 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by dpdk.org (Postfix) with ESMTP id 24A30DED for ; Wed, 11 Nov 2020 01:06:16 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1059) id 7DA7F20C27FD; Tue, 10 Nov 2020 16:06:14 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 7DA7F20C27FD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1605053174; bh=FJXKBpYQp0POAvLMSQiu1oh7mHjDuTDZV/hEDhhrkpM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=M0M/k0DrRSotMvuuy+alZ90wgsI/Q0WT2DJOJ4HlW7T2yxi59p322vI4lbdyicEON XaRTzaIN/tfTZ8MCAzIDZCphauOla2TCu5IcLjhEl9leL32OmCjpf8ghbD1pvXGCN0 5iodz0KZhueP/0PZ770TuAqeesOHQyMlt8Gyk4A8= Date: Tue, 10 Nov 2020 16:06:14 -0800 From: Narcisa Ana Maria Vasile To: Ophir Munk Cc: dev@dpdk.org, Raslan Darawsheh , Matan Azrad , Tal Shnaiderman , Thomas Monjalon Message-ID: <20201111000614.GD9449@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <20201027232335.31427-1-ophirmu@nvidia.com> <20201027232335.31427-49-ophirmu@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201027232335.31427-49-ophirmu@nvidia.com> User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [dpdk-dev] [PATCH v1 48/72] net/mlx5/windows: support link update X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, Oct 27, 2020 at 11:23:11PM +0000, Ophir Munk wrote: > From: Tal Shnaiderman > > Add support for mlx5_link_update() to get link speed and link state. > Other parameters are currently hard-coded. > > Signed-off-by: Tal Shnaiderman > --- > 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