From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 12F40A0C51; Thu, 10 Jun 2021 07:09:19 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 839A240FDF; Thu, 10 Jun 2021 07:09:18 +0200 (CEST) Received: from mail-io1-f49.google.com (mail-io1-f49.google.com [209.85.166.49]) by mails.dpdk.org (Postfix) with ESMTP id EED8040E64 for ; Thu, 10 Jun 2021 07:09:16 +0200 (CEST) Received: by mail-io1-f49.google.com with SMTP id p66so23547917iod.8 for ; Wed, 09 Jun 2021 22:09:16 -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; bh=2p32jbXXku+JvuGAuTYFEY88Mux2UOM7SXwSFrWE4Ks=; b=utIFiqHbXRjtJ/PuQCCpTQHf5qTj+1Ryh8+9BIVY3g9fWgEzxwolPr4cjCwtWd+PA7 Uw4aABgBpJKCj2bGlKCEg+ok6leRcGmFOUGlpMu3M2SxF1GRCA71x2Hz8jpoxkavfY99 +mJ9XYE6ttrjwNBK3oMNhWSlovWgkzVpxsJyquv5CZnqymAMMB21JGjbiR6qkljhLaBq oRpo1/+fJc2aRlTuSOv6KUFuoy31+0ImdPZ4bHJEo/vnYoripTDWJuRtkzRSUVTW3SwM +KGdE80WNnR7ltkFdso/fK0Nef1OH+3YuyBLxgH+TLcBYLvrSJd5rZUbolam71hXzChv yXBg== 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; bh=2p32jbXXku+JvuGAuTYFEY88Mux2UOM7SXwSFrWE4Ks=; b=fefpXB/LweyrQeZdAGDsvIkvC6CtgyD2/xBgRaDp2ykQ/4A7DPZzhnhc56e30WIYbB FRLr9OfIf4t3D9qY9KQi/SrcFbINBjdvkoKHi558tunQdF7P5nSwDTf/1SK7YMy/sC9f M7BSKeHzmM72E/PiQ+QvAC0bYWdG3PfmX4UOqRUg+yTFKItmAdIUc5k2ePtp4w7xPujy iOs/II1uV6PdNycZfv1NLnyK/IG+ZWq002g6g5ufz9bgPLN91R++E+pbYintPWZBreUL Z3pfIpI9d2w61y25ImZvUaETbCsXypKz+NaCndBikL4BcrmoIFDrWHEcFCp6knTA6EI4 nEeA== X-Gm-Message-State: AOAM530Wz7Pt9mn0NkWtL7P3CwD8v2ysn0LzhkjeG6WlngIe7iQPlxNE RIFASZDVUyqmmPsRq6CcPXOEiICqDqYiJAaf0bs= X-Google-Smtp-Source: ABdhPJxZappM/+5IXsckO/i6KPeOo7NCwaOFna+AqqmRUnKXc2GSNp6DAbuzUK9XGPBX48INj/b4Jjtd7/wdKhMnapQ= X-Received: by 2002:a05:6638:12cd:: with SMTP id v13mr2933596jas.104.1623301756175; Wed, 09 Jun 2021 22:09:16 -0700 (PDT) MIME-Version: 1.0 References: <20210531214142.30167-1-tduszynski@marvell.com> <20210531214142.30167-4-tduszynski@marvell.com> In-Reply-To: <20210531214142.30167-4-tduszynski@marvell.com> From: Jerin Jacob Date: Thu, 10 Jun 2021 10:39:00 +0530 Message-ID: To: Tomasz Duszynski Cc: dpdk-dev , jpalider@marvell.com, Jerin Jacob , Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao , Ray Kinsella , Neil Horman Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH 03/28] common/cnxk: add support for getting link information X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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, Jun 1, 2021 at 3:12 AM Tomasz Duszynski wrote: > > Add support for retrieving link information. > > Signed-off-by: Tomasz Duszynski > Signed-off-by: Jakub Palider > --- > +enum roc_bphy_cgx_eth_link_speed { > + ROC_BPHY_CGX_ETH_LINK_SPEED_NONE, > + ROC_BPHY_CGX_ETH_LINK_SPEED_10M, > + ROC_BPHY_CGX_ETH_LINK_SPEED_100M, > + ROC_BPHY_CGX_ETH_LINK_SPEED_1G, > + ROC_BPHY_CGX_ETH_LINK_SPEED_2HG, > + ROC_BPHY_CGX_ETH_LINK_SPEED_5G, > + ROC_BPHY_CGX_ETH_LINK_SPEED_10G, > + ROC_BPHY_CGX_ETH_LINK_SPEED_20G, > + ROC_BPHY_CGX_ETH_LINK_SPEED_25G, > + ROC_BPHY_CGX_ETH_LINK_SPEED_40G, > + ROC_BPHY_CGX_ETH_LINK_SPEED_50G, > + ROC_BPHY_CGX_ETH_LINK_SPEED_80G, > + ROC_BPHY_CGX_ETH_LINK_SPEED_100G, > + __MAX_ROC_BPHY_CGX_ETH_LINK_SPEED Better to change to __ROC_BPHY_CGX_ETH_LINK_SPEED_MAX > +}; > + > +enum roc_bphy_cgx_eth_link_fec { > + ROC_BPHY_CGX_ETH_LINK_FEC_NONE, > + ROC_BPHY_CGX_ETH_LINK_FEC_BASE_R, > + ROC_BPHY_CGX_ETH_LINK_FEC_RS, > + __MAX_ROC_BPHY_CGX_ETH_LINK_FEC Same as above. > +}; > + > +enum roc_bphy_cgx_eth_link_mode { > + ROC_BPHY_CGX_ETH_LINK_MODE_SGMII_BIT, > + ROC_BPHY_CGX_ETH_LINK_MODE_1000_BASEX_BIT, > + ROC_BPHY_CGX_ETH_LINK_MODE_QSGMII_BIT, > + ROC_BPHY_CGX_ETH_LINK_MODE_10G_C2C_BIT, > + ROC_BPHY_CGX_ETH_LINK_MODE_10G_C2M_BIT, > + ROC_BPHY_CGX_ETH_LINK_MODE_10G_KR_BIT, > + ROC_BPHY_CGX_ETH_LINK_MODE_20G_C2C_BIT, > + ROC_BPHY_CGX_ETH_LINK_MODE_25G_C2C_BIT, > + ROC_BPHY_CGX_ETH_LINK_MODE_25G_C2M_BIT, > + ROC_BPHY_CGX_ETH_LINK_MODE_25G_2_C2C_BIT, > + ROC_BPHY_CGX_ETH_LINK_MODE_25G_CR_BIT, > + ROC_BPHY_CGX_ETH_LINK_MODE_25G_KR_BIT, > + ROC_BPHY_CGX_ETH_LINK_MODE_40G_C2C_BIT, > + ROC_BPHY_CGX_ETH_LINK_MODE_40G_C2M_BIT, > + ROC_BPHY_CGX_ETH_LINK_MODE_40G_CR4_BIT, > + ROC_BPHY_CGX_ETH_LINK_MODE_40G_KR4_BIT, > + ROC_BPHY_CGX_ETH_LINK_MODE_40GAUI_C2C_BIT, > + ROC_BPHY_CGX_ETH_LINK_MODE_50G_C2C_BIT, > + ROC_BPHY_CGX_ETH_LINK_MODE_50G_C2M_BIT, > + ROC_BPHY_CGX_ETH_LINK_MODE_50G_4_C2C_BIT, > + ROC_BPHY_CGX_ETH_LINK_MODE_50G_CR_BIT, > + ROC_BPHY_CGX_ETH_LINK_MODE_50G_KR_BIT, > + ROC_BPHY_CGX_ETH_LINK_MODE_80GAUI_C2C_BIT, > + ROC_BPHY_CGX_ETH_LINK_MODE_100G_C2C_BIT, > + ROC_BPHY_CGX_ETH_LINK_MODE_100G_C2M_BIT, > + ROC_BPHY_CGX_ETH_LINK_MODE_100G_CR4_BIT, > + ROC_BPHY_CGX_ETH_LINK_MODE_100G_KR4_BIT, > + __MAX_ROC_BPHY_CGX_ETH_LINK_MODE Same as above. > +}; > + > +struct roc_bphy_cgx_link_info { > + bool link_up; > + bool full_duplex; > + enum roc_bphy_cgx_eth_link_speed speed; > + bool an; > + enum roc_bphy_cgx_eth_link_fec fec; > + enum roc_bphy_cgx_eth_link_mode mode; > +}; > + > __roc_api int roc_bphy_cgx_dev_init(struct roc_bphy_cgx *roc_cgx); > __roc_api int roc_bphy_cgx_dev_fini(struct roc_bphy_cgx *roc_cgx); >