lkml.org 
[lkml]   [2015]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 07/28] IB/Verbs: Reform IB-ulp ipoib


On 04/14/2015 08:21 PM, Jason Gunthorpe wrote:
> On Tue, Apr 14, 2015 at 06:02:47PM +0000, Hefty, Sean wrote:
>>> Yes, that is the only reasonable thing that could happen.
>>>
>>> init failure should only be possible under exceptional cases (OOM).
>>>
>>> The only system response is to call ib_umad_add_one again - so of
>>> course the first call had to completely clean up everything it did.
>>
>> A reasonable follow up change would be to replace the add device
>> callbacks with add port callbacks.
>
> Yes, combined with a port argument to ib_set_client_data /
> ib_get_client_data it would be a nice simplifying clean up.
>
> It would be nice to have sane error handling too :( In an ideal world
> the add call back should return an error and the thing that triggered
> it should unwind back to module load failure.

We can give client->add() callback a return value and make ib_register_device()
return -ENOMEM when it failed, just wondering why we don't do this at first, any
special reason?

Regards,
Michael Wang

>
> Jason
>


\
 
 \ /
  Last update: 2015-04-15 10:41    [W:0.645 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site