mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Suman Ghosh <sumang@marvell.com>
Cc: sgoutham@marvell.com, lcherian@marvell.com, gakula@marvell.com,
	jerinj@marvell.com, hkelam@marvell.com, sbhatta@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: [PATCH] octeontx2-pf: Add egress PFC support
Date: Tue, 23 Aug 2022 17:50:47 +0200	[thread overview]
Message-ID: <YwT3V6A4xrS3jAqf@lunn.ch> (raw)
In-Reply-To: <20220823065829.1060339-1-sumang@marvell.com>

> -int otx2_txschq_config(struct otx2_nic *pfvf, int lvl)
> +int otx2_txschq_config(struct otx2_nic *pfvf, int lvl, int prio, bool txschq_for_pfc)
>  {
>  	struct otx2_hw *hw = &pfvf->hw;
>  	struct nix_txschq_config *req;
> @@ -602,7 +602,13 @@ int otx2_txschq_config(struct otx2_nic *pfvf, int lvl)
>  	req->lvl = lvl;
>  	req->num_regs = 1;
>  
> -	schq = hw->txschq_list[lvl][0];
> +#ifdef CONFIG_DCB
> +	if (txschq_for_pfc)
> +		schq = pfvf->pfc_schq_list[lvl][prio];
> +	else
> +#endif

Please could you try to remove as many of these #ifdef CONFIG_DCB as
possible. It makes build testing less efficient at finding build
problems. Can you do:

> +	if (IS_ENABLED(CONFIG_DCB) && txschq_for_pfc)
> +		schq = pfvf->pfc_schq_list[lvl][prio];

> +#ifdef CONFIG_DCB
> +int otx2_pfc_txschq_config(struct otx2_nic *pfvf)
> +{
> +	u8 pfc_en, pfc_bit_set;
> +	int prio, lvl, err;
> +
> +	pfc_en = pfvf->pfc_en;
> +	for (prio = 0; prio < NIX_PF_PFC_PRIO_MAX; prio++) {
> +		pfc_bit_set = pfc_en & (1 << prio);
> +

Maybe put all of this into a file of its own, and provide stubs for
when it is not enabled?

     Andrew

  reply	other threads:[~2022-08-23 17:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-23  6:58 Suman Ghosh
2022-08-23 15:50 ` Andrew Lunn [this message]
2022-08-24  5:57   ` [EXT] " Suman Ghosh
2022-08-24 12:33     ` Andrew Lunn
2022-08-24 12:46       ` Suman Ghosh

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=YwT3V6A4xrS3jAqf@lunn.ch \
    --to=andrew@lunn.ch \
    --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 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®