Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751621AbdG0HEk (ORCPT ); Thu, 27 Jul 2017 03:04:40 -0400 Received: from mail-qk0-f171.google.com ([209.85.220.171]:38568 "EHLO mail-qk0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750878AbdG0HEj (ORCPT ); Thu, 27 Jul 2017 03:04:39 -0400 MIME-Version: 1.0 In-Reply-To: <20170726195727.GB2339@yuvallap> References: <20170726145248.21677-1-marcel@redhat.com> <20170726195727.GB2339@yuvallap> From: Moni Shoua Date: Thu, 27 Jul 2017 10:04:37 +0300 X-Google-Sender-Auth: yTxJsWkan36P6VHmJCEYATViAzA Message-ID: Subject: Re: [PATCH] drivers/rxe: improve rxe loopback To: Yuval Shaia Cc: Marcel Apfelbaum , linux-rdma , Linux Kernel Mailinglist , Doug Ledford , Sean Hefty , Hal Rosenstock Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 719 Lines: 15 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()