From: Denis Kenzior <denkenz@gmail.com>
To: ell@lists.01.org
Subject: Re: [PATCH] netlink: Allow command handler to use l_netlink_cancel
Date: Tue, 02 Mar 2021 18:03:11 -0600 [thread overview]
Message-ID: <fd75120e-5ce2-cef5-8b01-da92d456678f@gmail.com> (raw)
In-Reply-To: <CAOq732KUpYrSaSpOfHnUYJ+gf-QccFmi4_jqxDOayJBYntNrBQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1128 bytes --]
Hi Andrew,
>>> Would it not be better to simply remove the command from the command_lookup
>>> hashmap prior to dispatch, and have l_netlink_cancel simply fail?
>>
>> Yes, that would work.
>
> On a second thought, I think it's better the other way. The
> l_netlink_cancel() call can be used as a request to forget the
> callbacks. The user may be tearing down the object they passed as
> user_data for example. IIRC we did take that use case into
> consideration in some of the other APIs, what do you think?
Which other way? Ahhh, I think I get it... You want to unset the destroy
callback or prevent it from being called subsequently when inside the handler by
issuing l_netlink_cancel?
I actually don't think any ell APIs work this way. l_dbus for example simply
removes the pending request prior to dispatch (which is what I suggested
earlier). Hence l_dbus_cancel wouldn't work on it inside the l_dbus_send callback.
Even APIs that use the watchlist pattern don't do it this way. You may be
thinking of the scan API inside iwd, which did it for a different reason.
Regards,
-Denis
prev parent reply other threads:[~2021-03-03 0:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-02 11:14 [PATCH] netlink: Allow command handler to use l_netlink_cancel Andrew Zaborowski
2021-03-02 15:10 ` Denis Kenzior
2021-03-02 15:34 ` Andrew Zaborowski
2021-03-02 16:35 ` Denis Kenzior
2021-03-02 21:30 ` Andrew Zaborowski
2021-03-02 23:29 ` Denis Kenzior
2021-03-03 0:02 ` Andrew Zaborowski
2021-03-03 0:18 ` Denis Kenzior
2021-03-02 21:36 ` Andrew Zaborowski
2021-03-03 0:03 ` Denis Kenzior [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=fd75120e-5ce2-cef5-8b01-da92d456678f@gmail.com \
--to=denkenz@gmail.com \
--cc=ell@lists.01.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;
as well as URLs for NNTP newsgroup(s).