On Tue, May 22, 2018 at 01:18:52PM -0400, Doug Ledford wrote: > On Tue, 2018-05-22 at 09:03 +0300, Leon Romanovsky wrote: > > On Mon, May 21, 2018 at 05:29:23PM -0400, Doug Ledford wrote: > > > On Fri, 2018-05-18 at 12:00 -0400, Doug Ledford wrote: > > > > 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@xxxxxxxxxxxxxxxx> > > > > Fixes: ee1e2c82c245 ("IPoIB: Refresh paths instead of flushing them on > > > > SM change events") > > > > Signed-off-by: Doug Ledford <dledford@xxxxxxxxxx> > > > > --- > > > > > > Evgenii, have you had a chance to see if this patch resolves your issue > > > properly? > > > > Doug, > > > > Can you please line-up the fixes line before you are merging it? > > It breaks various grep scripts. > > > > Thanks > > Fixed and pushed to for-next. Thanks. Thanks > > -- > Doug Ledford <dledford@xxxxxxxxxx> > GPG KeyID: B826A3330E572FDD > Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD
Attachment:
signature.asc
Description: PGP signature