public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: hkelam@marvell.com
Cc: Jakub Kicinski <kuba@kernel.org>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [net-next,PatchV3,2/2] Octeontx2-pf: Add support for DMAC_FILTER trap
Date: Wed, 21 Jan 2026 18:25:21 -0800	[thread overview]
Message-ID: <20260122022521.2531255-1-kuba@kernel.org> (raw)
In-Reply-To: <20260120100341.2479814-3-hkelam@marvell.com>

This is an AI-generated review of your patch. The human sending this
email has considered the AI review valid, or at least plausible.

For local reproduction steps see https://netdev-ai.bots.linux.dev/ai-local.html
---
Octeontx2-pf: Add support for DMAC_FILTER trap

This patch adds devlink trap support for DMAC_FILTER, allowing users to
monitor packets dropped by the DMAC filter via the devlink interface.

> diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
> index a7feb4c392b3..2fafdf405c33 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c

[ ... ]

> @@ -3282,6 +3282,10 @@ static int otx2_probe(struct pci_dev *pdev, const struct pci_device_id *id)
>  	if (err)
>  		goto err_mcam_flow_del;
>
> +	err = otx2_devlink_traps_register(pf);
> +	if (err)
> +		goto err_mcam_flow_del;

If otx2_devlink_traps_register() fails here, the error path jumps to
err_mcam_flow_del. However, otx2_register_dl() was called earlier in
otx2_probe() and succeeded. Should there be a call to otx2_unregister_dl()
on this error path to avoid leaking the devlink structure?

Looking at otx2_remove(), the cleanup order is:

    otx2_devlink_traps_unregister(pf);
    otx2_unregister_dl(pf);

But the err_mcam_flow_del path does not call either of these functions.
-- 
pw-bot: cr

      reply	other threads:[~2026-01-22  2:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-20 10:03 [net-next PatchV3 0/2] Octeontx2-pf: Add support for DMAC_FILTER trap Hariprasad Kelam
2026-01-20 10:03 ` [net-next PatchV3 1/2] octeontx2-af: Mailbox handlers to fetch DMAC filter drop counter Hariprasad Kelam
2026-01-20 10:03 ` [net-next PatchV3 2/2] Octeontx2-pf: Add support for DMAC_FILTER trap Hariprasad Kelam
2026-01-22  2:25   ` Jakub Kicinski [this message]

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=20260122022521.2531255-1-kuba@kernel.org \
    --to=kuba@kernel.org \
    --cc=hkelam@marvell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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