patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH v0 1/1] net/octeon_ep: handle interrupt enable failure
@ 2025-07-14  5:31 Vamsi Krishna
  2025-09-22  5:19 ` Jerin Jacob
  0 siblings, 1 reply; 2+ messages in thread
From: Vamsi Krishna @ 2025-07-14  5:31 UTC (permalink / raw)
  To: jerinj; +Cc: dev, Vamsi Attunuru, stable

From: Vamsi Attunuru <vattunuru@marvell.com>

Patch checks the return value of interrupt enable
and returns gracefully if file handler is not available.

Cc: stable@dpdk.org

Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
---
 drivers/net/octeon_ep/otx_ep_mbox.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/net/octeon_ep/otx_ep_mbox.c b/drivers/net/octeon_ep/otx_ep_mbox.c
index 1d7e08d2cc..c83bb81474 100644
--- a/drivers/net/octeon_ep/otx_ep_mbox.c
+++ b/drivers/net/octeon_ep/otx_ep_mbox.c
@@ -355,16 +355,22 @@ otx_ep_mbox_init(struct rte_eth_dev *eth_dev)
 	struct otx_ep_device *otx_ep = (struct otx_ep_device *)eth_dev->data->dev_private;
 	struct rte_pci_device *pdev = RTE_ETH_DEV_TO_PCI(eth_dev);
 	uint64_t reg_val;
+	int rc;
 
 	otx_ep_mbox_version_check(otx_ep);
 
 	rte_intr_callback_register(pdev->intr_handle, otx_ep_mbox_intr_handler, (void *)eth_dev);
 
-	if (rte_intr_enable(pdev->intr_handle)) {
+	rc = rte_intr_enable(pdev->intr_handle);
+
+	if (!(rc == -1 || rc == 0)) {
 		otx_ep_err("rte_intr_enable failed");
 		return -1;
 	}
 
+	if (rc == -1)
+		return 0;
+
 	reg_val = otx2_read64(otx_ep->hw_addr + CNXK_EP_R_MBOX_PF_VF_INT(0));
 	if (reg_val == UINT64_MAX)
 		return -ENODEV;
-- 
2.34.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH v0 1/1] net/octeon_ep: handle interrupt enable failure
  2025-07-14  5:31 [PATCH v0 1/1] net/octeon_ep: handle interrupt enable failure Vamsi Krishna
@ 2025-09-22  5:19 ` Jerin Jacob
  0 siblings, 0 replies; 2+ messages in thread
From: Jerin Jacob @ 2025-09-22  5:19 UTC (permalink / raw)
  To: Vamsi Krishna; +Cc: jerinj, dev, stable

On Mon, Jul 14, 2025 at 6:08 PM Vamsi Krishna <vattunuru@marvell.com> wrote:
>
> From: Vamsi Attunuru <vattunuru@marvell.com>
>
> Patch checks the return value of interrupt enable
> and returns gracefully if file handler is not available.
>
> Cc: stable@dpdk.org


Added
 Fixes: 826da0f56d42 ("net/octeon_ep: extend mailbox functionality")


Applied to dpdk-next-net-mrvl/for-main. Thanks


>
> Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
> ---
>  drivers/net/octeon_ep/otx_ep_mbox.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/octeon_ep/otx_ep_mbox.c b/drivers/net/octeon_ep/otx_ep_mbox.c
> index 1d7e08d2cc..c83bb81474 100644
> --- a/drivers/net/octeon_ep/otx_ep_mbox.c
> +++ b/drivers/net/octeon_ep/otx_ep_mbox.c
> @@ -355,16 +355,22 @@ otx_ep_mbox_init(struct rte_eth_dev *eth_dev)
>         struct otx_ep_device *otx_ep = (struct otx_ep_device *)eth_dev->data->dev_private;
>         struct rte_pci_device *pdev = RTE_ETH_DEV_TO_PCI(eth_dev);
>         uint64_t reg_val;
> +       int rc;
>
>         otx_ep_mbox_version_check(otx_ep);
>
>         rte_intr_callback_register(pdev->intr_handle, otx_ep_mbox_intr_handler, (void *)eth_dev);
>
> -       if (rte_intr_enable(pdev->intr_handle)) {
> +       rc = rte_intr_enable(pdev->intr_handle);
> +
> +       if (!(rc == -1 || rc == 0)) {
>                 otx_ep_err("rte_intr_enable failed");
>                 return -1;
>         }
>
> +       if (rc == -1)
> +               return 0;
> +
>         reg_val = otx2_read64(otx_ep->hw_addr + CNXK_EP_R_MBOX_PF_VF_INT(0));
>         if (reg_val == UINT64_MAX)
>                 return -ENODEV;
> --
> 2.34.1
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-09-22  5:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-14  5:31 [PATCH v0 1/1] net/octeon_ep: handle interrupt enable failure Vamsi Krishna
2025-09-22  5:19 ` Jerin Jacob

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).