From: Simon Horman <horms@kernel.org>
To: Tanmay Jagdale <tanmay@marvell.com>
Cc: davem@davemloft.net, leon@kernel.org,
herbert@gondor.apana.org.au, bbhushan2@marvell.com,
sgoutham@marvell.com, linux-crypto@vger.kernel.org,
netdev@vger.kernel.org,
Rakesh Kudurumalla <rkudurumalla@marvell.com>
Subject: Re: [PATCH net-next v5 05/15] octeontx2-af: Add support for CPT second pass
Date: Tue, 28 Oct 2025 11:07:06 +0000 [thread overview]
Message-ID: <aQCj2iRMRR8pFhhQ@horms.kernel.org> (raw)
In-Reply-To: <20251026150916.352061-6-tanmay@marvell.com>
On Sun, Oct 26, 2025 at 08:39:00PM +0530, Tanmay Jagdale wrote:
> From: Rakesh Kudurumalla <rkudurumalla@marvell.com>
>
> Implemented mailbox to add mechanism to allocate a
> rq_mask and apply to nixlf to toggle RQ context fields
> for CPT second pass packets.
>
> Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
> Signed-off-by: Tanmay Jagdale <tanmay@marvell.com>
...
> diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
> index c3d6f363bf61..95f93a29a00e 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
> @@ -6632,3 +6632,128 @@ void rvu_block_bcast_xon(struct rvu *rvu, int blkaddr)
> cfg = rvu_read64(rvu, blkaddr, NIX_AF_RX_CHANX_CFG(0));
> rvu_write64(rvu, blkaddr, NIX_AF_RX_CHANX_CFG(0), cfg);
> }
> +
> +static inline void
> +configure_rq_mask(struct rvu *rvu, int blkaddr, int nixlf,
> + u8 rq_mask, bool enable)
Hi Rakesh and Tanmay,
Please don't use inline in C files unless there is a demonstrable - usually
performance - reason to do so. Rather, please let the compiler inline code
as it sees fit.
> +{
> + u64 cfg, reg;
> +
> + cfg = rvu_read64(rvu, blkaddr, NIX_AF_LFX_RX_IPSEC_CFG1(nixlf));
> + reg = rvu_read64(rvu, blkaddr, NIX_AF_LFX_CFG(nixlf));
> + if (enable) {
> + cfg |= NIX_AF_LFX_RX_IPSEC_CFG1_RQ_MASK_ENA;
> + reg &= ~NIX_AF_LFX_CFG_RQ_CPT_MASK_SEL;
> + reg |= FIELD_PREP(NIX_AF_LFX_CFG_RQ_CPT_MASK_SEL, rq_mask);
> + } else {
> + cfg &= ~NIX_AF_LFX_RX_IPSEC_CFG1_RQ_MASK_ENA;
> + reg &= ~NIX_AF_LFX_CFG_RQ_CPT_MASK_SEL;
> + }
> + rvu_write64(rvu, blkaddr, NIX_AF_LFX_RX_IPSEC_CFG1(nixlf), cfg);
> + rvu_write64(rvu, blkaddr, NIX_AF_LFX_CFG(nixlf), reg);
> +}
> +
> +static inline void
> +configure_spb_cpt(struct rvu *rvu, int blkaddr, int nixlf,
> + struct nix_rq_cpt_field_mask_cfg_req *req, bool enable)
Here too.
> +{
> + u64 cfg;
> +
> + cfg = rvu_read64(rvu, blkaddr, NIX_AF_LFX_RX_IPSEC_CFG1(nixlf));
> +
> + /* Clear the SPB bit fields */
> + cfg &= ~NIX_AF_LFX_RX_IPSEC_CFG1_SPB_CPT_ENA;
> + cfg &= ~NIX_AF_LFX_RX_IPSEC_CFG1_SPB_CPT_SZM1;
> + cfg &= ~NIX_AF_LFX_RX_IPSEC_CFG1_SPB_AURA;
> +
> + if (enable) {
> + cfg |= NIX_AF_LFX_RX_IPSEC_CFG1_SPB_CPT_ENA;
> + cfg |= FIELD_PREP(NIX_AF_LFX_RX_IPSEC_CFG1_SPB_CPT_SZM1,
> + req->ipsec_cfg1.spb_cpt_sizem1);
> + cfg |= FIELD_PREP(NIX_AF_LFX_RX_IPSEC_CFG1_SPB_AURA,
> + req->ipsec_cfg1.spb_cpt_aura);
> + }
> +
> + rvu_write64(rvu, blkaddr, NIX_AF_LFX_RX_IPSEC_CFG1(nixlf), cfg);
> +}
...
next prev parent reply other threads:[~2025-10-28 11:07 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-26 15:08 [PATCH net-next v5 00/15] Enable Inbound IPsec offload on Marvell CN10K SoC Tanmay Jagdale
2025-10-26 15:08 ` [PATCH net-next v5 01/15] crypto: octeontx2: Share engine group info with AF driver Tanmay Jagdale
2025-10-28 11:08 ` Simon Horman
2025-10-29 17:28 ` Tanmay Jagdale
2025-10-26 15:08 ` [PATCH net-next v5 02/15] octeontx2-af: Configure crypto hardware for inline ipsec Tanmay Jagdale
2025-10-26 15:08 ` [PATCH net-next v5 03/15] octeontx2-af: Setup Large Memory Transaction for crypto Tanmay Jagdale
2025-10-26 15:08 ` [PATCH net-next v5 04/15] octeontx2-af: Handle inbound inline ipsec config in AF Tanmay Jagdale
2025-10-26 15:09 ` [PATCH net-next v5 05/15] octeontx2-af: Add support for CPT second pass Tanmay Jagdale
2025-10-28 11:07 ` Simon Horman [this message]
2025-10-29 17:09 ` Tanmay Jagdale
2025-10-26 15:09 ` [PATCH net-next v5 06/15] octeontx2-af: Add support for SPI to SA index translation Tanmay Jagdale
2025-10-26 15:09 ` [PATCH net-next v5 07/15] octeontx2-af: Add mbox to alloc/free BPIDs Tanmay Jagdale
2025-10-26 15:09 ` [PATCH net-next v5 08/15] octeontx2-pf: ipsec: Setup NIX HW resources for inbound flows Tanmay Jagdale
2025-10-28 10:45 ` Simon Horman
2025-10-29 17:06 ` [EXTERNAL] " Tanmay Jagdale
2025-10-26 15:09 ` [PATCH net-next v5 09/15] octeontx2-pf: ipsec: Allocate Ingress SA table Tanmay Jagdale
2025-10-26 15:09 ` [PATCH net-next v5 10/15] octeontx2-pf: ipsec: Handle NPA threshold interrupt Tanmay Jagdale
2025-10-26 15:09 ` [PATCH net-next v5 11/15] octeontx2-pf: ipsec: Initialize ingress IPsec Tanmay Jagdale
2025-10-26 15:09 ` [PATCH net-next v5 12/15] octeontx2-pf: ipsec: Configure backpressure Tanmay Jagdale
2025-10-26 15:09 ` [PATCH net-next v5 13/15] octeontx2-pf: ipsec: Process CPT metapackets Tanmay Jagdale
2025-10-26 15:09 ` [PATCH net-next v5 14/15] octeontx2-pf: ipsec: Manage NPC rules and SPI-to-SA table entries Tanmay Jagdale
2025-10-26 15:09 ` [PATCH net-next v5 15/15] octeontx2-pf: ipsec: Add XFRM state and policy hooks for inbound flows Tanmay Jagdale
2025-10-28 11:39 ` Sabrina Dubroca
2025-10-29 17:36 ` [EXTERNAL] " Tanmay Jagdale
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=aQCj2iRMRR8pFhhQ@horms.kernel.org \
--to=horms@kernel.org \
--cc=bbhushan2@marvell.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=leon@kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=rkudurumalla@marvell.com \
--cc=sgoutham@marvell.com \
--cc=tanmay@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.