From: Thomas Monjalon <thomas@monjalon.net>
To: Jakub Grajciar <jgrajcia@cisco.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v8] eal_interrupts: add option for pending callback unregister
Date: Sat, 09 Mar 2019 01:40:35 +0100 [thread overview]
Message-ID: <2246346.ABkemhhLro@xps> (raw)
In-Reply-To: <20181217123009.23501-1-jgrajcia@cisco.com>
Sorry for the delay in review.
I hoped someone else would review this patch.
Let's get this patch in DPDK 19.05, after doing some small changes (see below).
17/12/2018 13:30, Jakub Grajciar:
> use case: if callback is used to receive message form socket,
> and the message received is disconnect/error, this callback needs
> to be unregistered, but cannot because it is still active.
>
> With this patch it is possible to mark the callback to be
> unregistered once the interrupt process is done with this
> interrupt source.
>
> Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
> ---
> .../common/include/rte_interrupts.h | 32 +++++++
> lib/librte_eal/linuxapp/eal/eal_interrupts.c | 85 ++++++++++++++++++-
> lib/librte_eal/rte_eal_version.map | 1 +
> 3 files changed, 116 insertions(+), 2 deletions(-)
We are missing the BSD implementation.
Please add at least a function returning -ENOTSUP.
> +/**
> + * It unregisters the callback according to the specified interrupt handle,
> + * after it's no longer acive. Failes if source is not active.
Suggested reword:
Unregister the callback according to the specified interrupt handle,
after it's no longer active. Fail if source is not active.
> + *
> + * @param intr_handle
> + * pointer to the interrupt handle.
> + * @param cb
The parameter is cb_fn.
Please check doxygen with "make doc-api-html"
> + * callback address.
> + * @param cb_arg
> + * address of parameter for callback, (void *)-1 means to remove all
> + * registered which has the same callback address.
> + * @param ucb_fn
> + * callback to call before cb is unregistered (optional).
> + * can be used to close fd and free cb_arg.
> + *
> + * @return
> + * - On success, return the number of callback entities marked for remove.
> + * - On failure, a negative value.
> + */
> +int __rte_experimental
> +rte_intr_callback_unregister_pending(const struct rte_intr_handle *intr_handle,
> + rte_intr_callback_fn cb_fn, void *cb_arg,
> + rte_intr_unregister_callback_fn ucb_fn);
next prev parent reply other threads:[~2019-03-09 0:40 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-17 12:30 Jakub Grajciar
2019-01-14 14:01 ` Thomas Monjalon
2019-03-09 0:40 ` Thomas Monjalon [this message]
2019-03-20 9:26 ` [dpdk-dev] [PATCH v9] " Jakub Grajciar
2019-03-20 9:26 ` Jakub Grajciar
2019-03-21 9:23 ` [dpdk-dev] [PATCH v10] " Jakub Grajciar
2019-03-21 9:23 ` Jakub Grajciar
2019-03-21 10:08 ` [dpdk-dev] [PATCH v11] " Jakub Grajciar
2019-03-21 10:08 ` Jakub Grajciar
2019-03-22 11:52 ` [dpdk-dev] [PATCH v12] " Jakub Grajciar
2019-03-22 11:52 ` Jakub Grajciar
2019-03-27 18:01 ` Thomas Monjalon
2019-03-27 18:01 ` Thomas Monjalon
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=2246346.ABkemhhLro@xps \
--to=thomas@monjalon.net \
--cc=dev@dpdk.org \
--cc=jgrajcia@cisco.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 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).