All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Suman Ghosh <sumang@marvell.com>
Cc: sgoutham@marvell.com, gakula@marvell.com, sbhatta@marvell.com,
	hkelam@marvell.com, lcherian@marvell.com, jerinj@marvell.com,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [net PATCH V3 1/3] octeontx2-pf: Fix PFC TX scheduler free
Date: Tue, 22 Aug 2023 09:11:01 +0200	[thread overview]
Message-ID: <20230822071101.GI2711035@kernel.org> (raw)
In-Reply-To: <20230821052516.398572-2-sumang@marvell.com>

On Mon, Aug 21, 2023 at 10:55:14AM +0530, Suman Ghosh wrote:
> During PFC TX schedulers free, flag TXSCHQ_FREE_ALL was being set
> which caused free up all schedulers other than the PFC schedulers.
> This patch fixes that to free only the PFC Tx schedulers.
> 
> Fixes: 99c969a83d82 ("octeontx2-pf: Add egress PFC support")
> Signed-off-by: Suman Ghosh <sumang@marvell.com>
> ---
>  .../ethernet/marvell/octeontx2/nic/otx2_common.c  |  1 +
>  .../ethernet/marvell/octeontx2/nic/otx2_dcbnl.c   | 15 ++++-----------
>  2 files changed, 5 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
> index 77c8f650f7ac..289371b8ce4f 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
> @@ -804,6 +804,7 @@ void otx2_txschq_free_one(struct otx2_nic *pfvf, u16 lvl, u16 schq)
>  
>  	mutex_unlock(&pfvf->mbox.lock);
>  }
> +EXPORT_SYMBOL(otx2_txschq_free_one);

Hi Suman,

Given that the licence of both this file and otx2_dcbnl.c is GPLv2,
I wonder if EXPORT_SYMBOL_GPL would be more appropriate here.

>  
>  void otx2_txschq_stop(struct otx2_nic *pfvf)
>  {
> diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_dcbnl.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_dcbnl.c
> index ccaf97bb1ce0..6492749dd7c8 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_dcbnl.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_dcbnl.c
> @@ -125,19 +125,12 @@ int otx2_pfc_txschq_alloc(struct otx2_nic *pfvf)
>  
>  static int otx2_pfc_txschq_stop_one(struct otx2_nic *pfvf, u8 prio)
>  {
> -	struct nix_txsch_free_req *free_req;
> +	int lvl;
>  
> -	mutex_lock(&pfvf->mbox.lock);
>  	/* free PFC TLx nodes */
> -	free_req = otx2_mbox_alloc_msg_nix_txsch_free(&pfvf->mbox);
> -	if (!free_req) {
> -		mutex_unlock(&pfvf->mbox.lock);
> -		return -ENOMEM;
> -	}
> -
> -	free_req->flags = TXSCHQ_FREE_ALL;
> -	otx2_sync_mbox_msg(&pfvf->mbox);
> -	mutex_unlock(&pfvf->mbox.lock);
> +	for (lvl = 0; lvl < pfvf->hw.txschq_link_cfg_lvl; lvl++)
> +		otx2_txschq_free_one(pfvf, lvl,
> +				     pfvf->pfc_schq_list[lvl][prio]);
>  
>  	pfvf->pfc_alloc_status[prio] = false;
>  	return 0;
> -- 
> 2.25.1
> 
> 

  reply	other threads:[~2023-08-22  7:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-21  5:25 [net PATCH V3 0/3] Fix PFC related issues Suman Ghosh
2023-08-21  5:25 ` [net PATCH V3 1/3] octeontx2-pf: Fix PFC TX scheduler free Suman Ghosh
2023-08-22  7:11   ` Simon Horman [this message]
2023-08-22 10:58     ` Paolo Abeni
2023-08-22 20:05       ` Simon Horman
2023-08-23 13:18         ` [EXT] " Suman Ghosh
2023-08-21  5:25 ` [net PATCH V3 2/3] octeontx2-af: CN10KB: fix PFC configuration Suman Ghosh
2023-08-22  7:16   ` Simon Horman
2023-08-22 11:12     ` Paolo Abeni
2023-08-22 20:06       ` Simon Horman
2023-08-23 13:16         ` [EXT] " Suman Ghosh
2023-08-21  5:25 ` [net PATCH V3 3/3] cteonxt2-pf: Fix backpressure config for multiple PFC priorities to work simultaneously Suman Ghosh
2023-08-22  7:17   ` Simon Horman

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=20230822071101.GI2711035@kernel.org \
    --to=horms@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gakula@marvell.com \
    --cc=hkelam@marvell.com \
    --cc=jerinj@marvell.com \
    --cc=kuba@kernel.org \
    --cc=lcherian@marvell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sbhatta@marvell.com \
    --cc=sgoutham@marvell.com \
    --cc=sumang@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.