All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Wu, Jingjing" <jingjing.wu@intel.com>
To: "Guo, Junfeng" <junfeng.guo@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, "stable@dpdk.org" <stable@dpdk.org>
Subject: RE: [PATCH] raw/ntb: add check for DB intr handler registering
Date: Thu, 10 Feb 2022 07:04:49 +0000	[thread overview]
Message-ID: <MW3PR11MB4587E6BB0D276E50D403A0B9E32F9@MW3PR11MB4587.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20220210062841.646294-1-junfeng.guo@intel.com>



> -----Original Message-----
> From: Guo, Junfeng <junfeng.guo@intel.com>
> Sent: Thursday, February 10, 2022 2:29 PM
> To: Wu, Jingjing <jingjing.wu@intel.com>
> Cc: dev@dpdk.org; stable@dpdk.org; Guo, Junfeng <junfeng.guo@intel.com>
> Subject: [PATCH] raw/ntb: add check for DB intr handler registering
> 
> The callback registering of doorbell interrupt handler should be
> finished before enabling the interrupt event fd. Thus add the return
> value check for this callback registering.
> 
> Fixes: 62012a76811e ("raw/ntb: add handshake process")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
> ---
>  drivers/raw/ntb/ntb.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/raw/ntb/ntb.c b/drivers/raw/ntb/ntb.c
> index cc611dfbb9..0801e6d1ae 100644
> --- a/drivers/raw/ntb/ntb.c
> +++ b/drivers/raw/ntb/ntb.c
> @@ -1403,8 +1403,12 @@ ntb_init_hw(struct rte_rawdev *dev, struct rte_pci_device
> *pci_dev)
> 
>  	intr_handle = pci_dev->intr_handle;
>  	/* Register callback func to eal lib */
> -	rte_intr_callback_register(intr_handle,
> -				   ntb_dev_intr_handler, dev);
> +	ret = rte_intr_callback_register(intr_handle,
> +					 ntb_dev_intr_handler, dev);
> +	if (ret) {
> +		NTB_LOG(ERR, "Unable to register doorbell intr handler.");
> +		return ret;
> +	}
When will this register failure happen? Have you checked what is the root cause?
 
> 
>  	ret = rte_intr_efd_enable(intr_handle, hw->db_cnt);
>  	if (ret)
Need roll back, such as rte_intr_callback_unregister is required when fail or driver remove?
> --
> 2.25.1


  reply	other threads:[~2022-02-10  7:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-10  6:28 [PATCH] raw/ntb: add check for DB intr handler registering Junfeng Guo
2022-02-10  7:04 ` Wu, Jingjing [this message]
2022-02-10  7:18   ` Guo, Junfeng
2022-02-10 10:43     ` Guo, Junfeng
2022-03-07 17:07       ` Thomas Monjalon
2022-03-08  8:08         ` Guo, Junfeng
2022-03-08  8:09           ` Thomas Monjalon
2022-03-08  8:11             ` Guo, Junfeng

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=MW3PR11MB4587E6BB0D276E50D403A0B9E32F9@MW3PR11MB4587.namprd11.prod.outlook.com \
    --to=jingjing.wu@intel.com \
    --cc=dev@dpdk.org \
    --cc=junfeng.guo@intel.com \
    --cc=stable@dpdk.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 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.