Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751660AbdG0J4C (ORCPT ); Thu, 27 Jul 2017 05:56:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43878 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751466AbdG0J4A (ORCPT ); Thu, 27 Jul 2017 05:56:00 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 91910B0CF9 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=marcel@redhat.com Subject: Re: [PATCH] drivers/rxe: improve rxe loopback To: Moni Shoua , Yuval Shaia Cc: linux-rdma , Linux Kernel Mailinglist , Doug Ledford , Sean Hefty , Hal Rosenstock References: <20170726145248.21677-1-marcel@redhat.com> <20170726195727.GB2339@yuvallap> From: Marcel Apfelbaum Message-ID: <778dcc67-30f2-aecc-3e53-7cf4d0afb74e@redhat.com> Date: Thu, 27 Jul 2017 12:55:57 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 27 Jul 2017 09:56:00 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1048 Lines: 29 On 27/07/2017 10:04, Moni Shoua wrote: > On Wed, Jul 26, 2017 at 10:57 PM, Yuval Shaia wrote: >> On Wed, Jul 26, 2017 at 05:52:48PM +0300, Marcel Apfelbaum wrote: >>> Currently a packet is marked for loopback only if the source and >>> destination address match. This is not enough when multiple >>> gids are present in rxe's gid table and the traffic is >>> from one gid to another. >>> >>> Fix it by marking the packet for loopback if the destination >>> address appears in rxe's gid table. >>> >>> Signed-off-by: Marcel Apfelbaum >> > Have you considered using ip_route_output_key() for IPv4 or > ip6_route_output() for IPv6 to decide if this is a loopback? > For reference you can check the flow starting at rdma_resolve_ip() > Hi Moni, Yes, I had looked into it, but I haven't seen how I can find out if the destination IP belongs to the same RXE. The loopback flag will give us the "same host" confirmation, but not the same rxe instance, right? Any ideas would be welcomed. Thanks, Marcel