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 8165FA0597; Wed, 8 Apr 2020 07:39:53 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 342A71BF44; Wed, 8 Apr 2020 07:39:52 +0200 (CEST) Received: from mail-il1-f194.google.com (mail-il1-f194.google.com [209.85.166.194]) by dpdk.org (Postfix) with ESMTP id 3D4041BF3C for ; Wed, 8 Apr 2020 07:39:50 +0200 (CEST) Received: by mail-il1-f194.google.com with SMTP id t11so5620600ils.1 for ; Tue, 07 Apr 2020 22:39:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=hv0oWE2N8q4HnQdTj0F+wxOeb4suValS4RYpjg9Hw4k=; b=YZIyu+bw4JVdymCJJ2V+quxpd2AojgCKUWyf/xQ+QwQtL5Jj4SOHt9nG1b2v7ALr8H 6+DnQ0Qp7umuRPBKuSfVwvkBKF2/nta1wihglt5uQhOsje1aPjgeH3AgPEXMmekzpMGJ oqC2g3VlJPiHBfFoRF5bx+cvE357pjGOYAbHYXR3oh/H3Upeh9j1IqhVOfnZjCcpZdzP F+QlkwErvA0BfNOQ6WGwE4rQ3zlX1Ah0bxN4A/H36zhKsdJ/mvErsCSiAuF9nzDT4ua8 SNLyQvAsVBB+AALCuYoXO3QiahHJdNmWkAUbsUaIg7Fk7t7Ym6XwF+kGsyNEFU4yqvwd 4taA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=hv0oWE2N8q4HnQdTj0F+wxOeb4suValS4RYpjg9Hw4k=; b=bXRjrOWQIGuCGfZcIuaRsoOkzSg9TyxA5XDymAkkpU5yG4KglBQMKZAWDB02zR3i8J 8l+rwnqXANvK/wja6tvp1bX0FhnWmvX8WkDC1rbDTf4pcu9QXZD8EiFtA2OPzhIFFWex HcbYM0JcCdBvt0/87MWM68nmPy7NONIENouIzcA6NcreI/I44HK+U6UZBvaTZiyIZnZo EEksSiN05ucpFXLC/22Ktbnfy7D/qIaQrssCTg51DO1oWIxF92773k1roTXiHjhVTD27 f9+xAxlgsyEkksoGVZ384rC4tncGX4vFD4lTwotMZKDgz84QkHbHDlf5ci6rQrmW0F7H ky+A== X-Gm-Message-State: AGi0Puaw5JrQ62VPdsJX1K9iwCSu0nBBTy0ATFJybdNqSmeICr4c05Rj ZfqQs+VjymIKv1Qzh2PMnl37Qaa6f62JUuh29k4= X-Google-Smtp-Source: APiQypJrhwdrX8pTyGUYxjZ/e5ZOkTD1OB4ESCZdnTugFPvVlNATGez2wtCqwIv1MPox20sY55yOFjaN/2pxJWv4xrs= X-Received: by 2002:a92:2804:: with SMTP id l4mr6399617ilf.130.1586324389387; Tue, 07 Apr 2020 22:39:49 -0700 (PDT) MIME-Version: 1.0 References: <98CBD80474FA8B44BF855DF32C47DC35C60F3C@smartserver.smartshare.dk> <20200407222637.55289-1-thomas@monjalon.net> <20200407222637.55289-3-thomas@monjalon.net> In-Reply-To: <20200407222637.55289-3-thomas@monjalon.net> From: Jerin Jacob Date: Wed, 8 Apr 2020 11:09:33 +0530 Message-ID: To: Thomas Monjalon Cc: dpdk-dev , =?UTF-8?Q?Morten_Br=C3=B8rup?= , Benoit Ganne , Ferruh Yigit , Andrew Rybchenko Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH 2/2] ethdev: allow unknown link speed 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 Wed, Apr 8, 2020 at 3:57 AM Thomas Monjalon wrote: > > When querying the link informations, the link status is > a mandatory major information. > Other boolean values are supposed to be accurate: > - duplex mode (half/full) > - negotiation (auto/fixed) > > This API update is making explicit that the link speed information > is optional. > The value ETH_SPEED_NUM_NONE (0) was already part of the API. > The value ETH_SPEED_NUM_UNKNOWN (infinite) is added to cover > two different cases: > - speed is not known by the driver > - device is virtual LGTM. > > Suggested-by: Morten Br=C3=B8rup > Suggested-by: Benoit Ganne > Signed-off-by: Thomas Monjalon > --- > lib/librte_ethdev/rte_ethdev.h | 20 ++++++++++---------- > 1 file changed, 10 insertions(+), 10 deletions(-) > > diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethde= v.h > index d1a593ad11..2d51fd3444 100644 > --- a/lib/librte_ethdev/rte_ethdev.h > +++ b/lib/librte_ethdev/rte_ethdev.h > @@ -300,6 +300,7 @@ struct rte_eth_stats { > #define ETH_SPEED_NUM_50G 50000 /**< 50 Gbps */ > #define ETH_SPEED_NUM_56G 56000 /**< 56 Gbps */ > #define ETH_SPEED_NUM_100G 100000 /**< 100 Gbps */ > +#define ETH_SPEED_NUM_UNKNOWN UINT32_MAX /**< Unknown */ IMO, It is better to add the following information in the same or other words under @note in Doxygen comment for the release documentation perspective. The value ETH_SPEED_NUM_UNKNOWN (infinite) is added to cover two different cases: - speed is not known by the driver - device is virtual