linux/drivers/infiniband
Doug Ledford ab4a2c3f05 RDMA/ipoib: Update paths on CLIENT_REREG/SM_CHANGE events
commit fa9391dbad upstream.

We do a light flush on CLIENT_REREG and SM_CHANGE events.  This goes
through and marks paths invalid. But we weren't always checking for this
validity when we needed to, and so we could keep using a path marked
invalid.  What's more, once we establish a path with a valid ah, we put
a pointer to the ah in the neigh struct directly, so even if we mark the
path as invalid, as long as the neigh has a direct pointer to the ah, it
keeps using the old, outdated ah.

To fix this we do several things.

1) Put the valid flag in the ah instead of the path struct, so when we
put the ah pointer directly in the neigh struct, we can easily check the
validity of the ah on send events.
2) Check the neigh->ah and neigh->ah->valid elements in the needed
places, and if we have an ah, but it's invalid, then invoke a refresh of
the ah.
3) Fix the various places that check for path, but didn't check for
path->valid (now path->ah && path->ah->valid).

Reported-by: Evgenii Smirnov <evgenii.smirnov@profitbricks.com>
Fixes: ee1e2c82c2 ("IPoIB: Refresh paths instead of flushing them on SM change events")
Signed-off-by: Doug Ledford <dledford@redhat.com>
[bwh: Backported to 3.16:
 - s/phdr->hwaddr/cb->hdwaddr/
 - s/ipoib_priv/netdev_priv/
 - Adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2018-11-20 18:05:00 +00:00
..
core RDMA/iwpm: fix memory leak on map_info 2018-10-21 08:45:48 +01:00
hw RDMA/mlx5: Don't assume that medium blueFlame register exists 2018-10-21 08:45:58 +01:00
ulp RDMA/ipoib: Update paths on CLIENT_REREG/SM_CHANGE events 2018-11-20 18:05:00 +00:00
Kconfig Merge branch 'ip-roce' into for-next 2014-01-22 23:24:21 -08:00
Makefile IB: Allow build of hw/ and ulp/ subdirectories independently 2014-06-02 14:51:12 -07:00