Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4026543iob; Tue, 17 May 2022 12:12:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzbINmJ2iyihdUltczgsl1+CKGjXRie1xqR/pPBfZL/47W+oB7ybXPNNl3XtFGduFmaq40F X-Received: by 2002:a17:903:210:b0:15e:f139:f901 with SMTP id r16-20020a170903021000b0015ef139f901mr24562967plh.66.1652814744955; Tue, 17 May 2022 12:12:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652814744; cv=none; d=google.com; s=arc-20160816; b=IRfGpTvM+7Dv6i8uyd1BuNT0Ai9XlOr8zt51cegoMKqa95jAVR0pMehTVcXG6AOfWn 2epCxg55Q1VGYQTgfmafX++6miBBzeZi/gxle9Y3hU106o6E4oyMRkCeFIHG4WDxbwu1 o4VWz+X4AWLWzi1lLN1FFqYQZkkfqkRxsMMrCF+brwivMxQ5N9xCUAhDlaPfLGNtFiy6 p3IibuN6oYGXjxMwBKznFctSfDfg6o8z1rbBEH5cwE99KmAzVK/8nZp7/bEbWa1j75n5 /nXhHXJXuYmd4uADUyfxUvR9RFhvlqTM7XKt0M7Y0522L6hno+9ERR5Um7nLwa6X4+D9 TRug== 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=Tr4AALZAcgwN+FDcDi87udLeLPWs7ZAJ5eWXrFs/jlw=; b=a+tSFE25DQAKGBP7ICgXb+aCf1sWQcKD6Ck7voJjGWOGzOTvUROwnLDLhZWnatjkLi phL5+OAQYAizid2Ym7r4zx6lpLLRDhXtDX749Z9V/S/bNWPSLKPsJl/jxpxxYBF6hlE2 E1bdN4sUIppuQpQ2H/Yh0aJE6hShdqga7Yu6v7JBk7ajNMXt5FBMFYGbq+UCgO8EbHGJ 64RssgvECsx+OYVoe0zTa2Ce9faYQWsgNG3ZDERlwfZXI3iaGj8qNEGNocdWFZ17wKzd bKt1rRBiCM2yvTNkdePAYghSv/pNAYKKmIWi8HEogKFt244lsqULZFJ31o3Ipbf9+rqu popw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=lXoa1En3; 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 x15-20020a170902820f00b001583e7178b6si15804012pln.323.2022.05.17.12.12.13; Tue, 17 May 2022 12:12:24 -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=lXoa1En3; 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 S240850AbiEQO7y (ORCPT + 99 others); Tue, 17 May 2022 10:59:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346439AbiEQO7x (ORCPT ); Tue, 17 May 2022 10:59:53 -0400 Received: from mail-qv1-xf2c.google.com (mail-qv1-xf2c.google.com [IPv6:2607:f8b0:4864:20::f2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6A7E4B42D for ; Tue, 17 May 2022 07:59:51 -0700 (PDT) Received: by mail-qv1-xf2c.google.com with SMTP id eq14so14551061qvb.4 for ; Tue, 17 May 2022 07:59:51 -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=Tr4AALZAcgwN+FDcDi87udLeLPWs7ZAJ5eWXrFs/jlw=; b=lXoa1En3yZsvkJXX4fuc+7NHLvgNe+4aH70ouZjesRaJiFMXxX3QG3dsf1t5fkrHcb Q8gmODYofe2MNMy1TlXekQuey0cpzxYl3vDW46FRA52AmehrCMEYrd4QWaOy8MeNpl7n r2yRQaaRg1vKoHAskReKzSNsHzUKAFzqElkPIEBcZy3mlGI3b6d3rlaY5P12JlQs7UWd QLNWlpQ27uK+EAd2OXnozD8WszrLY7zYOUN/aZzWwDPhI8oQerbmRCZqrKlH5G+DbRRC rv7+mMxfFlLS1KzK4rWDUMW1nZocWhEwhzR9/aOyS48LCiph4jdfVp12q2437zUeTfhE E0SA== 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=Tr4AALZAcgwN+FDcDi87udLeLPWs7ZAJ5eWXrFs/jlw=; b=uw69aB0+sHA9N2urY8y+BXE6prrOSvcMk+maEzX7o6Z6LNJga79Vx1SQbpaPhbZ/SV vi3T7ucJHDcxXTRG+A1hbKHj16v+MGgxNuMqIKJd9p6DqU/DMF7guH45KVfAQXVq1l8P yiD2o6J/HnEjVamQjVObCSQ+2RUNAlwGFbbMyCk7I1ZXZEWc6G6nf3gHv6eCf3c5ovpd jB2Q8wZ1BtacyUgs00ID8x1Ic8Vz045MQBRQ++TpeKB6RB8wKe5wYueazYycWDduNpvz r5AxCAhZmlYbvDCeuJqA/UWHBvUvh0cBg912xVxVI+OZbzMJRQYH76/SjSGTh58C5ib/ aRLw== X-Gm-Message-State: AOAM531t8L38MpIoRJVN8KfQAygk/pQjKtPU+1W/UOKuwQ2HVwiN9osy QWg3mZP2ZhB1KH24GwET1KPlHQ== X-Received: by 2002:a05:6214:27c2:b0:45b:9ee:7310 with SMTP id ge2-20020a05621427c200b0045b09ee7310mr20771589qvb.85.1652799591107; Tue, 17 May 2022 07:59:51 -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 16-20020a370710000000b0069fc13ce1d7sm7735790qkh.8.2022.05.17.07.59.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 May 2022 07:59:50 -0700 (PDT) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1nqyft-0084Ur-Sq; Tue, 17 May 2022 11:59:49 -0300 Date: Tue, 17 May 2022 11:59:49 -0300 From: Jason Gunthorpe To: longli@microsoft.com Cc: "K. Y. 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: [PATCH 05/12] net: mana: Set the DMA device max page size Message-ID: <20220517145949.GH63055@ziepe.ca> References: <1652778276-2986-1-git-send-email-longli@linuxonhyperv.com> <1652778276-2986-6-git-send-email-longli@linuxonhyperv.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1652778276-2986-6-git-send-email-longli@linuxonhyperv.com> 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 Tue, May 17, 2022 at 02:04:29AM -0700, longli@linuxonhyperv.com wrote: > From: Long Li > > The system chooses default 64K page size if the device does not specify > the max page size the device can handle for DMA. This do not work well > when device is registering large chunk of memory in that a large page size > is more efficient. > > Set it to the maximum hardware supported page size. For RDMA devices this should be set to the largest segment size an ib_sge can take in when posting work. It should not be the page size of MR. 2M is a weird number for that, are you sure it is right? Jason