From: Simon Horman <simon.horman@corigine.com>
To: Hariprasad Kelam <hkelam@marvell.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
kuba@kernel.org, davem@davemloft.net, pabeni@redhat.com,
edumazet@google.com, sgoutham@marvell.com, lcherian@marvell.com,
gakula@marvell.com, jerinj@marvell.com, sbhatta@marvell.com,
jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us,
saeedm@nvidia.com, richardcochran@gmail.com, tariqt@nvidia.com,
linux-rdma@vger.kernel.org, maxtram95@gmail.com,
naveenm@marvell.com, bpf@vger.kernel.org,
hariprasad.netdev@gmail.com
Subject: Re: [net-next Patch V4 3/4] octeontx2-pf: Refactor schedular queue alloc/free calls
Date: Fri, 10 Feb 2023 16:06:51 +0100 [thread overview]
Message-ID: <Y+Zdi48x+g/Ypre+@corigine.com> (raw)
In-Reply-To: <20230210111051.13654-4-hkelam@marvell.com>
On Fri, Feb 10, 2023 at 04:40:50PM +0530, Hariprasad Kelam wrote:
> Multiple transmit scheduler queues can be configured at different
> levels to support traffic shaping and scheduling. But on txschq free
> requests, the transmit schedular config in hardware is not getting
> reset. This patch adds support to reset the stale config.
>
> The txschq alloc response handler updates the default txschq
> array which is used to configure the transmit packet path from
> SMQ to TL2 levels. However, for new features such as QoS offload
> that requires it's own txschq queues, this handler is still
> invoked and results in undefined behavior. The code now handles
> txschq response in the mbox caller function.
>
> Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
> Signed-off-by: Naveen Mamindlapalli <naveenm@marvell.com>
> Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com>
> ---
> .../ethernet/marvell/octeontx2/af/rvu_nix.c | 45 +++++++++++++++++++
> .../marvell/octeontx2/nic/otx2_common.c | 36 ++++++++-------
> .../ethernet/marvell/octeontx2/nic/otx2_pf.c | 4 --
> .../ethernet/marvell/octeontx2/nic/otx2_vf.c | 4 --
> 4 files changed, 64 insertions(+), 25 deletions(-)
...
> diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
> index 73c8d36b6e12..4cb3fab8baae 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
> @@ -716,7 +716,8 @@ EXPORT_SYMBOL(otx2_smq_flush);
> int otx2_txsch_alloc(struct otx2_nic *pfvf)
> {
> struct nix_txsch_alloc_req *req;
> - int lvl;
> + struct nix_txsch_alloc_rsp *rsp;
> + int lvl, schq, rc;
>
> /* Get memory to put this msg */
> req = otx2_mbox_alloc_msg_nix_txsch_alloc(&pfvf->mbox);
> @@ -726,8 +727,24 @@ int otx2_txsch_alloc(struct otx2_nic *pfvf)
> /* Request one schq per level */
> for (lvl = 0; lvl < NIX_TXSCH_LVL_CNT; lvl++)
> req->schq[lvl] = 1;
> + rc = otx2_sync_mbox_msg(&pfvf->mbox);
> + if (rc)
> + return rc;
>
> - return otx2_sync_mbox_msg(&pfvf->mbox);
> + rsp = (struct nix_txsch_alloc_rsp *)
> + otx2_mbox_get_rsp(&pfvf->mbox.mbox, 0, &req->hdr);
> + if (IS_ERR(rsp))
> + return PTR_ERR(rsp);
> +
> + /* Setup transmit scheduler list */
> + for (lvl = 0; lvl < NIX_TXSCH_LVL_CNT; lvl++)
> + for (schq = 0; schq < rsp->schq[lvl]; schq++)
> + pfvf->hw.txschq_list[lvl][schq] =
> + rsp->schq_list[lvl][schq];
> +
> + pfvf->hw.txschq_link_cfg_lvl = rsp->link_cfg_lvl;
nit: extra whitespace before '='
> +
> + return 0;
> }
next prev parent reply other threads:[~2023-02-10 15:07 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-10 11:10 [net-next Patch V4 0/4] octeontx2-pf: HTB offload support Hariprasad Kelam
2023-02-10 11:10 ` [net-next Patch V4 1/4] sch_htb: Allow HTB priority parameter in offload mode Hariprasad Kelam
2023-02-10 13:25 ` Simon Horman
2023-02-12 16:19 ` Hariprasad Kelam
2023-02-10 11:10 ` [net-next Patch V4 2/4] octeontx2-pf: qos send queues management Hariprasad Kelam
2023-02-10 15:13 ` Simon Horman
2023-02-13 6:19 ` Hariprasad Kelam
2023-02-10 11:10 ` [net-next Patch V4 3/4] octeontx2-pf: Refactor schedular queue alloc/free calls Hariprasad Kelam
2023-02-10 15:06 ` Simon Horman [this message]
2023-02-12 16:21 ` Hariprasad Kelam
2023-02-10 11:10 ` [net-next Patch V4 4/4] octeontx2-pf: Add support for HTB offload Hariprasad Kelam
2023-02-10 15:05 ` Simon Horman
2023-02-13 6:16 ` Hariprasad Kelam
2023-02-11 0:36 ` [net-next Patch V4 0/4] octeontx2-pf: HTB offload support Jakub Kicinski
2023-02-13 6:22 ` Hariprasad Kelam
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=Y+Zdi48x+g/Ypre+@corigine.com \
--to=simon.horman@corigine.com \
--cc=bpf@vger.kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gakula@marvell.com \
--cc=hariprasad.netdev@gmail.com \
--cc=hkelam@marvell.com \
--cc=jerinj@marvell.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=lcherian@marvell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=maxtram95@gmail.com \
--cc=naveenm@marvell.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
--cc=saeedm@nvidia.com \
--cc=sbhatta@marvell.com \
--cc=sgoutham@marvell.com \
--cc=tariqt@nvidia.com \
--cc=xiyou.wangcong@gmail.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;
as well as URLs for NNTP newsgroup(s).