[Skiboot] [PATCH 1/2] ipmi/opal: Provide ipmi_dequeue_msg() wrapper and invoke it on completion
neelegup at linux.vnet.ibm.com
Fri Jun 26 16:41:38 AEST 2015
On 06/26/2015 11:33 AM, Alistair Popple wrote:
> Hi Naalesh,
> I'm having trouble understanding what's wrong with the current interface that
> requires it to be changed. Why should it be up to the client to dequeue
> messages? They're dequeued automatically on completion. Relying on the client
> to always do this seems like it would just introduce another source of
> programming errors when the client forgets to.
Why should client forget doing it ? If it does so, then of course
and should be fixed.
In line with, when client does alloc(), it has to free() and when it
it should be doing dequeue_msg() after completion or whenever it thinks
IMO backend should not decide when to dequeue the message.
Moreover, backend may want to do more that just list_del() in
like updating the state or number of outstanding requests etc.. that all
be exposed though an interface.
> I agree that there is currently no API to dequeue an ipmi message (mainly
> because no one has needed it yet) but it should just be a thin wrapper in
> core/ipmi.c that calls backend->dequeue_msg().
I think that's what I added as part of this patch in core/ipmi.c
> - Alistair
> On Wed, 24 Jun 2015 22:40:32 Neelesh Gupta wrote:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Skiboot