mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Wojciech Drewek <wojciech.drewek@intel.com>
To: Geetha sowjanya <gakula@marvell.com>, <netdev@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Cc: <kuba@kernel.org>, <davem@davemloft.net>, <pabeni@redhat.com>,
	<edumazet@google.com>, <sgoutham@marvell.com>,
	<sbhatta@marvell.com>, <hkelam@marvell.com>
Subject: Re: [net PATCH 1/5] octeontx2-af: Adjust Tx credits when MCS external bypass is disabled
Date: Thu, 23 Nov 2023 11:45:23 +0100	[thread overview]
Message-ID: <24e4edf1-14e3-460a-bc33-0b2177a49ee6@intel.com> (raw)
In-Reply-To: <20231123055941.19430-2-gakula@marvell.com>



On 23.11.2023 06:59, Geetha sowjanya wrote:
> From: Nithin Dabilpuram <ndabilpuram@marvell.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@marvell.com>
> Signed-off-by: Geetha sowjanya <gakula@marvell.com>
> Signed-off-by: Sunil Goutham <sgoutham@marvell.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?

> +}
> +
>  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)


<...>

  reply	other threads:[~2023-11-23 10:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-23  5:59 [net PATCH 0/5] octeontx2-af: miscellaneous fixes Geetha sowjanya
2023-11-23  5:59 ` [net PATCH 1/5] octeontx2-af: Adjust Tx credits when MCS external bypass is disabled Geetha sowjanya
2023-11-23 10:45   ` Wojciech Drewek [this message]
2023-11-23 12:34     ` [EXT] " Geethasowjanya Akula
2023-11-23 12:47       ` Wojciech Drewek
2023-11-23  5:59 ` [net PATCH 2/5] octeontx2-af: Fix mcs sa cam entries size Geetha sowjanya
2023-11-23 10:47   ` Wojciech Drewek
2023-11-23  5:59 ` [net PATCH 3/5] octeontx2-af: Fix mcs stats register address Geetha sowjanya
2023-11-23 10:53   ` Wojciech Drewek
2023-11-23  5:59 ` [net PATCH 4/5] octeontx2-af: Add missing mcs flr handler call Geetha sowjanya
2023-11-23 10:55   ` Wojciech Drewek
2023-11-23  5:59 ` [net PATCH 5/5] octeontx2-af: Update Tx link register range Geetha sowjanya
2023-11-23 10:57   ` Wojciech Drewek
2023-11-23 12:45     ` [EXT] " Geethasowjanya Akula

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=24e4edf1-14e3-460a-bc33-0b2177a49ee6@intel.com \
    --to=wojciech.drewek@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gakula@marvell.com \
    --cc=hkelam@marvell.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sbhatta@marvell.com \
    --cc=sgoutham@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®