[Skiboot] [PATCH 1/2] ipmi/opal: Provide ipmi_dequeue_msg() wrapper and invoke it on completion

Neelesh Gupta neelegup at linux.vnet.ibm.com
Fri Jun 26 16:41:38 AEST 2015

Hi Alistair,

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 
programming error
and should be fixed.

In line with, when client does alloc(), it has to free() and when it 
does queue_msg(),
it should be doing dequeue_msg() after completion or whenever it thinks 
doing so..
IMO backend should not decide when to dequeue the message.

Moreover, backend may want to do more that just list_del() in 
dequeue_msg() ..
like updating the state or number of outstanding requests etc.. that all 
can nicely
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...
URL: <http://lists.ozlabs.org/pipermail/skiboot/attachments/20150626/76c4f3a6/attachment.html>

More information about the Skiboot mailing list