]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
IB/ipoib: factor out ah flushing
authorDoug Ledford <dledford@redhat.com>
Sun, 22 Feb 2015 00:26:59 +0000 (19:26 -0500)
committerDoug Ledford <dledford@redhat.com>
Wed, 15 Apr 2015 20:06:17 +0000 (16:06 -0400)
commite135106fac9525352feb8e49077c8f46c3eaf288
treead686daa6638603a7df17dfe0dc0f2c1642f4a37
parentc841e12add6926d64aa608687893465330b5a03e
IB/ipoib: factor out ah flushing

Create a an ipoib_flush_ah and ipoib_stop_ah routines to use at
appropriate times to flush out all remaining ah entries before we shut
the device down.

Because neighbors and mcast entries can each have a reference on any
given ah, we must make sure to free all of those first before our ah
will actually have a 0 refcount and be able to be reaped.

This factoring is needed in preparation for having per-device work
queues.  The original per-device workqueue code resulted in the following
error message:

<ibdev>: ib_dealloc_pd failed

That error was tracked down to this issue.  With the changes to which
workqueues were flushed when, there were no flushes of the per device
workqueue after the last ah's were freed, resulting in an attempt to
dealloc the pd with outstanding resources still allocated.  This code
puts the explicit flushes in the needed places to avoid that problem.

Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/ulp/ipoib/ipoib_ib.c