From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B6655C4361B for ; Tue, 8 Dec 2020 09:00:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5A54F23A79 for ; Tue, 8 Dec 2020 09:00:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728497AbgLHJA2 (ORCPT ); Tue, 8 Dec 2020 04:00:28 -0500 Received: from gentwo.org ([3.19.106.255]:41208 "EHLO gentwo.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728362AbgLHJA2 (ORCPT ); Tue, 8 Dec 2020 04:00:28 -0500 Received: by gentwo.org (Postfix, from userid 1002) id 1C3873ED63; Tue, 8 Dec 2020 08:59:42 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by gentwo.org (Postfix) with ESMTP id 19FBF3EC13; Tue, 8 Dec 2020 08:59:42 +0000 (UTC) Date: Tue, 8 Dec 2020 08:59:42 +0000 (UTC) From: Christoph Lameter X-X-Sender: cl@www.lameter.com To: Mark Haywood cc: =?ISO-8859-15?Q?H=E5kon_Bugge?= , Honggang LI , Jason Gunthorpe , OFED mailing list Subject: Re: Is there a working cache for path record and lids etc for librdmacm? In-Reply-To: Message-ID: References: <20201117193329.GH244516@ziepe.ca> <6F632AE0-7921-4C5F-8455-F8E9390BD071@oracle.com> <801AE4A1-7AE8-4756-8F32-5F3BFD189E2B@oracle.com> <648D2533-E8E8-4248-AF2D-C5F1F60E5BFC@oracle.com> <20201125081057.GA547111@dhcp-128-72.nay.redhat.com> <7812B8AB-7D26-4148-8C8C-E1241A1FC8CD@oracle.com> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org On Mon, 7 Dec 2020, Mark Haywood wrote: > On 12/7/20 5:28 AM, Christoph Lameter wrote: > > Looking at librdmacm/rdma_getaddrinfo(): > > > > It seems that the call to the IBACM via ucma_ib_resolve() is only done > > after a regular getaddrinfo() was run. Is IBACM truly able to provide > > address resolution or is it just some strange after processing if the main > > resolution attempt fails? > > > > getaddrinfo() is called only if 'node' or 'service' are set. Otherwise, > 'hints' are set and used. Right. It calls the function that does an RPC to ibacm *after* getaddrinfo. This is confusing. I would have expected this to happen *before* getaddrinfo and that getaddrinfo would be skipped if ibacm returns a hit in the cache. If node is set then we want something to be resolved. So it *first* should check with ibacm. No? > ucma_set_ib_route() (called from rdma_resolve_route()) calls > rdma_getaddrinfo() with 'hints' set. That in turn calls getaddrinfo. > Increasing the ibacm log level and then using cmtime(1), I see log messages > that indicate that ibacm is resolving addresses. Well it does that under certain circumstances. What kind of addresses are you resolving?