* [PATCH net] octeontx2-af: skip CPT ctx flush command when no CPT LFs are attached
@ 2026-10-26 9:10 kmahammadraf
2026-10-26 9:16 ` netdev-bot+sinfo
0 siblings, 1 reply; 2+ messages in thread
From: kmahammadraf @ 2026-10-26 9:10 UTC (permalink / raw)
To: linux-kernel, netdev
Cc: Sunil Goutham, Ratheesh Kannoth, Geetha sowjanya,
Subbaraya Sundeep, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Srujana Challa, kmahammadraf
From: Srujana Challa <schalla@marvell.com>
CPT inline inbound LF command submission was attempted even when no CPT
LFs were mapped to the CPT PF. In that case, sending the uplink mailbox
message is unnecessary and can lead to avoidable failures/timeouts during
CPT context flush flow.
Add a guard in cpt_inline_inb_lf_cmd_send() to check mapped CPT LF count
for the CPT PF and return early when it is zero.
Signed-off-by: kmahammadraf <kmahammadraf@marvell.com>
Signed-off-by: Srujana Challa <schalla@marvell.com>
---
---
drivers/net/ethernet/marvell/octeontx2/af/rvu_cpt.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_cpt.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_cpt.c
index f404117bf6c8..751643176c6d 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_cpt.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_cpt.c
@@ -1144,15 +1144,23 @@ int rvu_cpt_lf_teardown(struct rvu *rvu, u16 pcifunc, int blkaddr, int lf, int s
static int cpt_inline_inb_lf_cmd_send(struct rvu *rvu, int blkaddr,
int nix_blkaddr)
{
- int cpt_pf_num = rvu->cpt_pf_num;
+ int cpt_pf_num = rvu->cpt_pf_num, num_lfs;
struct cpt_inst_lmtst_req *req;
dma_addr_t res_daddr;
int timeout = 3000;
+ u16 pcifunc;
u8 cpt_idx;
u64 *inst;
u16 *res;
int rc;
+ pcifunc = (cpt_pf_num & RVU_OTX2_PFVF_PF_MASK) <<
+ RVU_OTX2_PFVF_PF_SHIFT;
+ num_lfs = rvu_get_rsrc_mapcount(rvu_get_pfvf(rvu, pcifunc),
+ blkaddr);
+ if (num_lfs == 0)
+ return 0;
+
res = kzalloc(CPT_RES_LEN, GFP_KERNEL);
if (!res)
return -ENOMEM;
--
2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH net] octeontx2-af: skip CPT ctx flush command when no CPT LFs are attached
2026-10-26 9:10 [PATCH net] octeontx2-af: skip CPT ctx flush command when no CPT LFs are attached kmahammadraf
@ 2026-10-26 9:16 ` netdev-bot+sinfo
0 siblings, 0 replies; 2+ messages in thread
From: netdev-bot+sinfo @ 2026-10-26 9:16 UTC (permalink / raw)
To: kmahammadraf
Cc: linux-kernel, netdev, Sunil Goutham, Ratheesh Kannoth,
Geetha sowjanya, Subbaraya Sundeep, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Srujana Challa
Hi!
This is an automated message. This series looks like a fix, but its
commit messages seem to be missing some information:
- How the issue was discovered, e.g. hit in production, hit during
development, syzbot report, manual code inspection, LLM or static
analysis tool scan.
- Whether the issue was actually triggered, or is only theoretical
(e.g. found by code inspection). If it was triggered please include
the symptoms, like the stack trace or error messages.
- What hardware the change was tested on. For driver fixes please
mention the device (and if relevant firmware version) used for
testing, or say that the change was not tested on real hardware.
Please do not repost the series just to address the above. Instead,
reply to this email with the missing information, so that reviewers
can take it into account. If the series needs another revision for
other reasons, please include the information in the commit messages
then.
The evaluation is done by an LLM so it may be wrong, if you think
that is the case please reply and explain.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-26 9:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-26 9:10 [PATCH net] octeontx2-af: skip CPT ctx flush command when no CPT LFs are attached kmahammadraf
2026-10-26 9:16 ` netdev-bot+sinfo
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®