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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id ACF07C433EF for ; Wed, 18 May 2022 23:11:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231271AbiERXLV (ORCPT ); Wed, 18 May 2022 19:11:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231260AbiERXLP (ORCPT ); Wed, 18 May 2022 19:11:15 -0400 Received: from mail-qk1-x72a.google.com (mail-qk1-x72a.google.com [IPv6:2607:f8b0:4864:20::72a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B049811463 for ; Wed, 18 May 2022 16:11:13 -0700 (PDT) Received: by mail-qk1-x72a.google.com with SMTP id c1so3296124qkf.13 for ; Wed, 18 May 2022 16:11:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=4aaJAiKF0NpBJNKbPi8C9kHnK+9ppz9wLqAxbueWtPg=; b=jM4mp0oF6W9hVvuytmkBjo1KC8VpIsCoWscqjQBXA83D193XgeHHbW9BzKmoznDyAa dVKv+Yxj01pljgdxQaTjgsML+znq6RYXp9n1C2+WBrLKNZFzhWknLodeb18QDVUjsWON c/ekgiQ8IqQQ1y2JjGxEW2thRdlD5fjJWwEpZWOg7Xs0ZfM3foboZ7f0RoZlCYH4sxKZ GvQjJ4RQhxmKTScybt0jJy61HyZwtxzLiry/H/RsahjP56dXNkf6ZZO6OWAlTCLWNHmJ cRkfeAspfAJU/sSA7jGxU7N7PIpIbXzzxHg5QN6OWqMjCBbBW9c3qjdUQkt7SAFlzjBG T4Ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=4aaJAiKF0NpBJNKbPi8C9kHnK+9ppz9wLqAxbueWtPg=; b=WTg/ImG6WWUYTJdwBS7eLoONiEfiHEieqpM5z61Ednl3mhR/QN5ja4cWpI7ORuPrdR XnSBeTb7MESfKAl3XXMMWG4ymyJ4v79G5KkuC9By5LpLkuES9OyCilYyMNQc+MDQamN0 pn8NvyUdCZp9gcwyaP5Evan3iNvkVB4WAEbYsI9ICp7HwOUFNn9rG+s/jzMYMjPyx6WL Ds/7ZEc46kp9xaofzW4puH6Me/7HN5pgjF2rl4FJeXfWiiyl8pt777DwHGe9Wr+omp6r ftYYVZmzxZ5BudZ36q8mOJA7N/ppStPcjMfO3pIanQVi2RywTePMuDZPx4uYc0KhF7WZ P25w== X-Gm-Message-State: AOAM532O6SIyo4stNeH3bm+uzwJVGXCu3B8bKXjKdT+44/KWtLQ1O486 +pz3zdBYxG/wRUf0nQEZ24UV7w== X-Google-Smtp-Source: ABdhPJys+8TIIBz9T4KGonaHQ0ArC8/aiNnL0IHXOlTPzOP+aQZNbqmfQBm+YU3N5sRThG8AXIKV7w== X-Received: by 2002:a05:620a:4447:b0:6a0:3693:8cad with SMTP id w7-20020a05620a444700b006a036938cadmr1356713qkp.742.1652915472889; Wed, 18 May 2022 16:11:12 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-142-162-113-129.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.162.113.129]) by smtp.gmail.com with ESMTPSA id t16-20020ac86a10000000b002f39b99f6a0sm345029qtr.58.2022.05.18.16.11.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 May 2022 16:11:12 -0700 (PDT) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1nrSox-008hIQ-6t; Wed, 18 May 2022 20:11:11 -0300 Date: Wed, 18 May 2022 20:11:11 -0300 From: Jason Gunthorpe To: Ajay Sharma Cc: Long Li , KY Srinivasan , Haiyang Zhang , Stephen Hemminger , Wei Liu , Dexuan Cui , "David S. Miller" , Jakub Kicinski , Paolo Abeni , Leon Romanovsky , "linux-hyperv@vger.kernel.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-rdma@vger.kernel.org" Subject: Re: [EXTERNAL] Re: [PATCH 05/12] net: mana: Set the DMA device max page size Message-ID: <20220518231111.GQ63055@ziepe.ca> References: <1652778276-2986-1-git-send-email-longli@linuxonhyperv.com> <1652778276-2986-6-git-send-email-longli@linuxonhyperv.com> <20220517145949.GH63055@ziepe.ca> <20220517193515.GN63055@ziepe.ca> <20220518000356.GO63055@ziepe.ca> <20220518160525.GP63055@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 18, 2022 at 09:05:22PM +0000, Ajay Sharma wrote: > Use the ib_umem_find_best_pgsz() and rdma_for_each_block() API when > registering an MR instead of coding it in the driver. The dma_set_max_seg_size() has *nothing* to do with ib_umem_find_best_pgsz() other than its value should be larger than the largest set bit. Again, it is supposed to be the maximum value the HW can support in a ib_sge length field, which is usually 2G. Jason