On Thu, Jan 24, 2019 at 11:59:38AM -0700, Jason Gunthorpe wrote: > On Thu, Jan 24, 2019 at 08:50:47PM +0200, Yuval Shaia wrote: > > On Thu, Jan 24, 2019 at 11:30:48AM -0700, Jason Gunthorpe wrote: > > > On Thu, Jan 24, 2019 at 04:44:34PM +0200, Kamal Heib wrote: > > > > Currently a packet is marked for loopback only if the source and > > > > destination addresses match, This is not enough when multiple gids are > > > > present in rxe device's gid table and the traffic is from one gid to > > > > another, this patch fixes this by marking the packet for loopback if the > > > > destination address found in the rxe's netdevice address list. > > > > > > Shouldn't loop back detection be based on the DMAC/SMAC being equal > > > and nothing else? > > > > > > Jason > > > > No because even if DMAC != SMAC (and in our case dgid != sgid) we can still > > can end up on the same rxe device. > > > > As the commit message trying to explain, take for example one rxe device > > with two gids one send to the second, this should be processed as loopback, > > right? > > rxe sits on top of a netdev - so it has *EXACTLY ONE* mac > address. Anything else is a bug. > > Jason ok, i think see your point. So you are saying that instead of traveling the routing table we just need to check if dmac is the same as smac, correct? Yuval