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 D7931A0C51; Thu, 10 Jun 2021 08:20:11 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BA5694067C; Thu, 10 Jun 2021 08:20:11 +0200 (CEST) Received: from mail-il1-f177.google.com (mail-il1-f177.google.com [209.85.166.177]) by mails.dpdk.org (Postfix) with ESMTP id 11CD74003C for ; Thu, 10 Jun 2021 08:20:10 +0200 (CEST) Received: by mail-il1-f177.google.com with SMTP id x18so741288ila.10 for ; Wed, 09 Jun 2021 23:20:10 -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=uZMfgKQlTqhpGl/6A4FZVlIZUST+UEDdxi6VlGCqFVo=; b=cw55Bxi2lVGT6vLgcNtSebLz85YY4F+pcNI40j4T9XCixsRz4lF6r7HPGWnUeIftMu fN5lO7x9+uIjc9+WHh53xVGCCmAqC/hPCP2NuAAGnuQfnwVoUhoDSwUVV79uDwQlTjv0 nRQTmEdMPo0/TgGX7j3uKvnnL0kj5WF2thckDBF4qrEbZAGZr5kbZuICxX4QkFbgyYYf kHZAelK0TP/Fyhm8PSGScrPtH1MD7VHeQ6mszFE3AA68edgKa74Sav1+IsFAACmsyFZu r/QvSVUERG8mcaPU573SHmL3ipN664wNg42Nt4EGhzsy8FNTNd8/BqIt+s1AF5pBu3bu 9mdg== 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=uZMfgKQlTqhpGl/6A4FZVlIZUST+UEDdxi6VlGCqFVo=; b=s/9PSrARcGEfi3JzdZ9PCfFttoUyPh46dhlZMC1GyGJX5R/SKdIZU+QRTNwjF075V1 r5qaCCWJbMHIV5tEFKYZH3VoJoPA/bD/94o2kFItSruSy+jMzR84/Ks3hDcN09Vt0zeH kAwU1S63cDISPJYVYC11yTfGh/2mOgHW4Ykm+W/BNGJy+p9kLs8Wh0Xq+Ln9At0ZD/Ab a1sVEWXsBovDYn0J8aqweW+x6MZGo8uPFxut4BZXYLz63i2b0dY2scH/+faSFprPu7kO Iv5fSTKD6Hgc5gIaCHtYYh08E/P9thRHa3nOhYP4xqePBV6Lim5GLb5ErdzJwk/r3DJR VEWA== X-Gm-Message-State: AOAM531oKGA0tzgCCW62UX4b9j7yN70rDYtS23uNm4GNU+FmoFhua5/r wf8PVrCr8emiJICoW6TWnBsMBzas53K/fzHmVKo= X-Google-Smtp-Source: ABdhPJw9N1/IcEQ6ML6ncXbtq0iWP2xQXfxZ6jsG7e5Rd+E4aVI3LoH+tRB32uIKW2+BHywGz1AcqOVT7Y9xRM6QwQM= X-Received: by 2002:a92:d08c:: with SMTP id h12mr2611230ilh.294.1623306009406; Wed, 09 Jun 2021 23:20:09 -0700 (PDT) MIME-Version: 1.0 References: <20210531214142.30167-1-tduszynski@marvell.com> <20210531214142.30167-5-tduszynski@marvell.com> In-Reply-To: <20210531214142.30167-5-tduszynski@marvell.com> From: Jerin Jacob Date: Thu, 10 Jun 2021 11:49:53 +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 04/28] common/cnxk: add support for changing internal loopback 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 enabling or disabling internal loopback. > > Signed-off-by: Tomasz Duszynski > Signed-off-by: Jakub Palider In all the git commit message we can shorten From: common/cnxk: add support for changing internal loopback To: common/cnxk: support for changing internal loopback > --- > drivers/common/cnxk/roc_bphy_cgx.c | 30 +++++++++++++++++++++++++ > drivers/common/cnxk/roc_bphy_cgx.h | 4 ++++ > drivers/common/cnxk/roc_bphy_cgx_priv.h | 4 ++++ > drivers/common/cnxk/version.map | 2 ++ > 4 files changed, 40 insertions(+) > > diff --git a/drivers/common/cnxk/roc_bphy_cgx.c b/drivers/common/cnxk/roc_bphy_cgx.c > index c7ba53ede..45088d5d4 100644 > --- a/drivers/common/cnxk/roc_bphy_cgx.c > +++ b/drivers/common/cnxk/roc_bphy_cgx.c > @@ -213,6 +213,24 @@ roc_bphy_cgx_lmac_exists(struct roc_bphy_cgx *roc_cgx, unsigned int lmac) > (roc_cgx->lmac_bmap & BIT_ULL(lmac)); > } > > +static int > +roc_bphy_cgx_intlbk_ena_dis(struct roc_bphy_cgx *roc_cgx, unsigned int lmac, > + bool enable) > +{ > + uint64_t scr1, scr0; > + > + if (!roc_cgx) > + return -EINVAL; > + > + if (!roc_bphy_cgx_lmac_exists(roc_cgx, lmac)) > + return -EINVAL; -ENODEV? > + > + scr1 = FIELD_PREP(SCR1_ETH_CMD_ID, ETH_CMD_INTERNAL_LBK) | > + FIELD_PREP(SCR1_ETH_CTL_ARGS_ENABLE, enable); > + > + return roc_bphy_cgx_intf_req(roc_cgx, lmac, scr1, &scr0); > +} > + > int > roc_bphy_cgx_get_linkinfo(struct roc_bphy_cgx *roc_cgx, unsigned int lmac, > struct roc_bphy_cgx_link_info *info) > @@ -243,3 +261,15 @@ roc_bphy_cgx_get_linkinfo(struct roc_bphy_cgx *roc_cgx, unsigned int lmac, > > return 0; > } >