Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp999924iob; Wed, 18 May 2022 18:51:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzlE47wm/NrR2lDIX9JDexT3j2DVxwiiqYg1tSwqyxu0BGpDwPIz9cvolg49zPsRvTikiE1 X-Received: by 2002:a17:90a:7b81:b0:1df:6815:34ec with SMTP id z1-20020a17090a7b8100b001df681534ecmr3091650pjc.100.1652925116405; Wed, 18 May 2022 18:51:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652925116; cv=none; d=google.com; s=arc-20160816; b=aMC9IFm0uTQ4of7YsXGt/lDeAne/RjyEUQ/bh1Oba3ac7co9Zj6/GsGckV1ymkFtCB yS/zXhOZte98+DoRum+G8jsqKAiY6XfklFxsZAdxIlaAlb20U6WnNmlPWp2af2D4ZsCF oH4K9MFf4hwAVW37gfgnw2bLOlkmvhK6RcZ8kNB1CoAY3x8bRqctQ0XyrKXr8GEgFM/c +qPnNcwLcC1icQN/im020RxrBA+KlpFzoa5IEkXw7/LU3UMR8m7YfsQKFoDFvL6+KlGb jQnHC5DK48btCkokwfMzv+GN3EZ/HWM5jEDYk2DoU0++4lI4YeDtOlJNvARsEZ15tQxH d/8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=4aaJAiKF0NpBJNKbPi8C9kHnK+9ppz9wLqAxbueWtPg=; b=NmQU8NxR1nj3+LGhqQAp5vcC7jA1bxurDjinP3hczQm+kixdEX9qBjwitiLkhoBHux sIY36NSEX1OycJMOsE0JdVQqCzOVjrZ9dn6NCDDRbVW45tp5TMy36YisW65kDTkkanNP eVPbwYxSceQFq25nXlvWB/wLN9W3yRJWMQ79Yt0pNFI5Bg2hFjZQk5nZEZODBvOIW5F7 R+44yV8eU/hKhwa6c3l2pZUFcJ/AgCNVzjINe/2/KWIWACs+bd0vj2BvXC8nVGRGgVfB PAjpERNR7rTPluVsUQHj8kAUfeb4GHw2rAw55bjx8LGVgwNFYRJYtT4wa9tXgZzOebWv LFog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=jM4mp0oF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m13-20020a633f0d000000b003f6084f0bafsi4644080pga.530.2022.05.18.18.51.44; Wed, 18 May 2022 18:51:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=jM4mp0oF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231249AbiERXLU (ORCPT + 99 others); Wed, 18 May 2022 19:11:20 -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-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: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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