[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DM6PR18MB26021B0EDA9DCDAEC80A4A6CCDB9A@DM6PR18MB2602.namprd18.prod.outlook.com>
Date: Thu, 23 Nov 2023 12:34:22 +0000
From: Geethasowjanya Akula <gakula@...vell.com>
To: Wojciech Drewek <wojciech.drewek@...el.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC: "kuba@...nel.org" <kuba@...nel.org>,
"davem@...emloft.net" <davem@...emloft.net>,
"pabeni@...hat.com" <pabeni@...hat.com>,
"edumazet@...gle.com" <edumazet@...gle.com>,
Sunil Kovvuri Goutham <sgoutham@...vell.com>,
Subbaraya Sundeep Bhatta <sbhatta@...vell.com>,
Hariprasad Kelam <hkelam@...vell.com>
Subject: RE: [EXT] Re: [net PATCH 1/5] octeontx2-af: Adjust Tx credits when
MCS external bypass is disabled
> -----Original Message-----
> From: Wojciech Drewek <wojciech.drewek@...el.com>
> Sent: Thursday, November 23, 2023 4:15 PM
> To: Geethasowjanya Akula <gakula@...vell.com>; netdev@...r.kernel.org;
> linux-kernel@...r.kernel.org
> Cc: kuba@...nel.org; davem@...emloft.net; pabeni@...hat.com;
> edumazet@...gle.com; Sunil Kovvuri Goutham <sgoutham@...vell.com>;
> Subbaraya Sundeep Bhatta <sbhatta@...vell.com>; Hariprasad Kelam
> <hkelam@...vell.com>
> Subject: [EXT] Re: [net PATCH 1/5] octeontx2-af: Adjust Tx credits when MCS
> external bypass is disabled
>
> External Email
>
> ----------------------------------------------------------------------
>
>
> On 23.11.2023 06:59, Geetha sowjanya wrote:
> > From: Nithin Dabilpuram <ndabilpuram@...vell.com>
> >
> > When MCS external bypass is disabled, MCS returns additional
> > 2 credits(32B) for every packet Tx'ed on LMAC. To account for these
> > extra credits, NIX_AF_TX_LINKX_NORM_CREDIT.CC_MCS_CNT
> > needs to be configured as otherwise NIX Tx credits would overflow and
> > will never be returned to idle state credit count causing issues with
> > credit control and MTU change.
> >
> > This patch fixes the same by configuring CC_MCS_CNT at probe time for
> > MCS enabled SoC's
> >
> > Fixes: bd69476e86fc ("octeontx2-af: cn10k: mcs: Install a default TCAM
> > for normal traffic")
> > Signed-off-by: Nithin Dabilpuram <ndabilpuram@...vell.com>
> > Signed-off-by: Geetha sowjanya <gakula@...vell.com>
> > Signed-off-by: Sunil Goutham <sgoutham@...vell.com>
> > ---
> > drivers/net/ethernet/marvell/octeontx2/af/mcs.c | 12 ++++++++++++
> > drivers/net/ethernet/marvell/octeontx2/af/mcs.h | 2 ++
> > drivers/net/ethernet/marvell/octeontx2/af/rvu.h | 1 +
> > drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c | 8 ++++++++
> > 4 files changed, 23 insertions(+)
> >
> > diff --git a/drivers/net/ethernet/marvell/octeontx2/af/mcs.c
> > b/drivers/net/ethernet/marvell/octeontx2/af/mcs.c
> > index c43f19dfbd74..d6effbe46208 100644
> > --- a/drivers/net/ethernet/marvell/octeontx2/af/mcs.c
> > +++ b/drivers/net/ethernet/marvell/octeontx2/af/mcs.c
> > @@ -1219,6 +1219,17 @@ struct mcs *mcs_get_pdata(int mcs_id)
> > return NULL;
> > }
> >
> > +bool is_mcs_bypass(int mcs_id)
> > +{
> > + struct mcs *mcs_dev;
> > +
> > + list_for_each_entry(mcs_dev, &mcs_list, mcs_list) {
> > + if (mcs_dev->mcs_id == mcs_id)
> > + return mcs_dev->bypass;
> > + }
> > + return true;
>
> If there is no mcs dev with the given id it means it is bypassed?
Yes.
>
> > +}
> > +
> > void mcs_set_port_cfg(struct mcs *mcs, struct mcs_port_cfg_set_req
> > *req) {
> > u64 val = 0;
> > @@ -1447,6 +1458,7 @@ static void mcs_set_external_bypass(struct mcs
> *mcs, u8 bypass)
> > else
> > val &= ~BIT_ULL(6);
> > mcs_reg_write(mcs, MCSX_MIL_GLOBAL, val);
> > + mcs->bypass = bypass;
> > }
> >
> > static void mcs_global_cfg(struct mcs *mcs)
>
>
> <...>
Powered by blists - more mailing lists