From: Subbaraya Sundeep <sbhatta@marvell.com>
To: Simon Horman <horms@kernel.org>
Cc: <andrew+netdev@lunn.ch>, <davem@davemloft.net>,
<edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>,
<gakula@marvell.com>, <hkelam@marvell.com>,
<bbhushan2@marvell.com>, <jerinj@marvell.com>,
<lcherian@marvell.com>, <sgoutham@marvell.com>,
<netdev@vger.kernel.org>
Subject: Re: [net-next PATCH v3 08/11] octeontx2-pf: Initialize new NIX SQ context for cn20k
Date: Thu, 24 Jul 2025 14:57:09 +0000 [thread overview]
Message-ID: <aIJJxapuXxymyZ_A@opensource> (raw)
In-Reply-To: <20250722170638.GT2459@horms.kernel.org>
On 2025-07-22 at 17:06:38, Simon Horman (horms@kernel.org) wrote:
> On Thu, Jul 17, 2025 at 10:37:40PM +0530, Subbaraya Sundeep wrote:
> > cn20k has different NIX context for send queue hence use
> > the new cn20k mailbox to init SQ context.
> >
> > Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
> > ---
> > .../ethernet/marvell/octeontx2/nic/cn20k.c | 36 ++++++++++++++++++-
> > 1 file changed, 35 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/cn20k.c b/drivers/net/ethernet/marvell/octeontx2/nic/cn20k.c
> > index 037548f36940..4f0afa5301b4 100644
> > --- a/drivers/net/ethernet/marvell/octeontx2/nic/cn20k.c
> > +++ b/drivers/net/ethernet/marvell/octeontx2/nic/cn20k.c
> > @@ -389,11 +389,45 @@ static int cn20k_pool_aq_init(struct otx2_nic *pfvf, u16 pool_id,
> > return 0;
> > }
> >
> > +static int cn20k_sq_aq_init(void *dev, u16 qidx, u8 chan_offset, u16 sqb_aura)
> > +{
> > + struct nix_cn20k_aq_enq_req *aq;
> > + struct otx2_nic *pfvf = dev;
> > +
> > + /* Get memory to put this msg */
> > + aq = otx2_mbox_alloc_msg_nix_cn20k_aq_enq(&pfvf->mbox);
> > + if (!aq)
> > + return -ENOMEM;
> > +
> > + aq->sq.cq = pfvf->hw.rx_queues + qidx;
> > + aq->sq.max_sqe_size = NIX_MAXSQESZ_W16; /* 128 byte */
> > + aq->sq.cq_ena = 1;
> > + aq->sq.ena = 1;
> > + aq->sq.smq = otx2_get_smq_idx(pfvf, qidx);
> > + aq->sq.smq_rr_weight = mtu_to_dwrr_weight(pfvf, pfvf->tx_max_pktlen);
> > + aq->sq.default_chan = pfvf->hw.tx_chan_base + chan_offset;
> > + aq->sq.sqe_stype = NIX_STYPE_STF; /* Cache SQB */
> > + aq->sq.sqb_aura = sqb_aura;
> > + aq->sq.sq_int_ena = NIX_SQINT_BITS;
> > + aq->sq.qint_idx = 0;
> > + /* Due pipelining impact minimum 2000 unused SQ CQE's
> > + * need to maintain to avoid CQ overflow.
> > + */
> > + aq->sq.cq_limit = ((SEND_CQ_SKID * 256) / (pfvf->qset.sqe_cnt));
>
> nit: Unnecessary parentheses
>
> I think this will work just as well (completely untested):
>
> aq->sq.cq_limit = (SEND_CQ_SKID * 256) / pfvf->qset.sqe_cnt;
Yes. parentheses not required. Will change it.
Thanks,
Sundeep
>
> > +
> > + /* Fill AQ info */
> > + aq->qidx = qidx;
> > + aq->ctype = NIX_AQ_CTYPE_SQ;
> > + aq->op = NIX_AQ_INSTOP_INIT;
> > +
> > + return otx2_sync_mbox_msg(&pfvf->mbox);
> > +}
>
> ...
next prev parent reply other threads:[~2025-07-24 14:57 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-17 17:07 [net-next PATCH v3 00/11] Add CN20K NIX and NPA contexts Subbaraya Sundeep
2025-07-17 17:07 ` [net-next PATCH v3 01/11] octeontx2-af: Simplify context writing and reading to hardware Subbaraya Sundeep
2025-07-22 16:27 ` Simon Horman
2025-07-22 16:29 ` Simon Horman
2025-07-24 14:50 ` Subbaraya Sundeep
2025-07-17 17:07 ` [net-next PATCH v3 02/11] octeontx2-af: Add cn20k NIX block contexts Subbaraya Sundeep
2025-07-17 17:07 ` [net-next PATCH v3 03/11] octeontx2-af: Extend debugfs support for cn20k NIX Subbaraya Sundeep
2025-07-22 16:40 ` Simon Horman
2025-07-24 14:51 ` Subbaraya Sundeep
2025-07-17 17:07 ` [net-next PATCH v3 04/11] octeontx2-af: Add cn20k NPA block contexts Subbaraya Sundeep
2025-07-17 17:07 ` [net-next PATCH v3 05/11] octeontx2-af: Extend debugfs support for cn20k NPA Subbaraya Sundeep
2025-07-17 17:07 ` [net-next PATCH v3 06/11] octeontx2-af: Skip NDC operations for cn20k Subbaraya Sundeep
2025-07-17 17:07 ` [net-next PATCH v3 07/11] octeontx2-pf: Initialize cn20k specific aura and pool contexts Subbaraya Sundeep
2025-07-22 0:40 ` Jakub Kicinski
2025-07-22 17:03 ` Simon Horman
2025-07-24 14:54 ` Subbaraya Sundeep
2025-07-17 17:07 ` [net-next PATCH v3 08/11] octeontx2-pf: Initialize new NIX SQ context for cn20k Subbaraya Sundeep
2025-07-22 17:06 ` Simon Horman
2025-07-24 14:57 ` Subbaraya Sundeep [this message]
2025-07-17 17:07 ` [net-next PATCH v3 09/11] octeontx2-af: Accommodate more bandwidth profiles " Subbaraya Sundeep
2025-07-22 17:08 ` Simon Horman
2025-07-24 14:58 ` Subbaraya Sundeep
2025-07-17 17:07 ` [net-next PATCH v3 10/11] octeontx2-af: Display new bandwidth profiles too in debugfs Subbaraya Sundeep
2025-07-17 17:07 ` [net-next PATCH v3 11/11] octeontx2-pf: Use new bandwidth profiles in receive queue Subbaraya Sundeep
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=aIJJxapuXxymyZ_A@opensource \
--to=sbhatta@marvell.com \
--cc=andrew+netdev@lunn.ch \
--cc=bbhushan2@marvell.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gakula@marvell.com \
--cc=hkelam@marvell.com \
--cc=horms@kernel.org \
--cc=jerinj@marvell.com \
--cc=kuba@kernel.org \
--cc=lcherian@marvell.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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 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.