Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6896972rwr; Wed, 10 May 2023 00:30:20 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4CQsqXwsFV1tlIYcR57pWIRT1HBNRDUoM/+Gl52EcP5Xph/k3e5D917kgcsdLOPJthdNbA X-Received: by 2002:a05:6a00:2189:b0:63d:4446:18ab with SMTP id h9-20020a056a00218900b0063d444618abmr20731923pfi.23.1683703820585; Wed, 10 May 2023 00:30:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683703820; cv=none; d=google.com; s=arc-20160816; b=UTBv5auJgQdtzr70ESSXSP76aNBu6CbRMQgm2wzOZwB7D4UQRLOvdm62Z+x2KPItiW XeFd5i9lenBUs9XizJYf2FH/eu9rDrMU87K63MABw/ta9sqcQFxh6TFGPHKoVqmnLCTm OcQfIbkXDZye1/VNUlLihykYEh7WCZMfbsrZfw48082ECUvbLxGjliem+PZCkWKK6sAx G/PmOMVWrm+7z/M0r1B2G0zdqulJUtPI1OIcogmG984mJtnzOCnKM9dTiKcxf0SqoYYR lo6J4DzlA2b7Di8anWkbtfNf+dsqULLmy17N9P5J4Pf+86KjpLtuktTQG+U7f2u685XW d6Sw== 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=Se0IW7UVQzqc4yqJ/N/SWVhuGTJ1O/VDI4NqaSoK8P4=; b=09qjy7A2+F54ZmV84kLhGAUttPj997bR9GrzxM6FUkCa/nfI4+kQdBnVw46COU7t31 MDzvY+wG6xG4YQYpzrTAitNbvttjYouGCqAGqEc/1T2goNQyIvBnVVccYvOexn/1048L 5ZP1pU9eAfHt1ozvPNI0cpt0k+xZIN7Q4kWu+PeoSZa/wgi54vngD58g+a8QFxryUqq7 HQvPdYu8Bd2NcLX+8Nl32SJUmcoPh8U3sV+ZDJDa7Emzy8+3JAaHxQtv7R7IfqKwVPZI pFgetZ0YZPLhzFy6fqUTSo2iKrHZsyy1bkWkYvBTOZD2ntRf7r7FuzYyMq1U6W22nC9N Fvag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aqoQNNer; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c3-20020aa79523000000b006389d389c01si4187204pfp.78.2023.05.10.00.30.06; Wed, 10 May 2023 00:30:20 -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=@kernel.org header.s=k20201202 header.b=aqoQNNer; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236320AbjEJG7P (ORCPT + 99 others); Wed, 10 May 2023 02:59:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236346AbjEJG7F (ORCPT ); Wed, 10 May 2023 02:59:05 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33C096A6A; Tue, 9 May 2023 23:58:50 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8B5EF62D3D; Wed, 10 May 2023 06:58:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0FDC7C433D2; Wed, 10 May 2023 06:58:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1683701928; bh=pccrKrakIiTYMfNwkySkFA8teOBn8FrPqIthMon9VT0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=aqoQNNerTUZBfWBS9lc6M5Iz1BFB5IxG/bALpkwYFE9w1mUKGsuVUrU7a0ViNAyzT ZzvF0NgCDw5IqIoY0jGN0brourbcNg5tuGq7EGr+MjMiP4ojb9Y0FMgkmTqJGwi/WS EEVFCzSZ/wK+ieQqobY970TYuha+0EMcya6RrwSrBK+IKrQXKUGhWHJxpGYkXG+iOH s08pw6u0sKERda6DO+SPI+q1OMI50eiLAeWv1fwvgZ9FqLH7cyEpPIOA1pKdHbJsr+ RWckB75Ex0ryTfcLf3lH9cgQj98JAnbTDxZUwhBMVaOHQOsU/0RYktvhMo1s3lNSC3 xZ03J6AoMGZlQ== Date: Wed, 10 May 2023 09:58:44 +0300 From: Leon Romanovsky To: Long Li Cc: Haiyang Zhang , Jason Gunthorpe , Ajay Sharma , Dexuan Cui , KY Srinivasan , Wei Liu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , "linux-rdma@vger.kernel.org" , "linux-hyperv@vger.kernel.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] RDMA/mana_ib: Use v2 version of cfg_rx_steer_req to enable RX coalescing Message-ID: <20230510065844.GQ38143@unreal> References: <1683312708-24872-1-git-send-email-longli@linuxonhyperv.com> <20230507081053.GD525452@unreal> <20230508060938.GA6195@unreal> <20230509073034.GA38143@unreal> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 09, 2023 at 07:08:36PM +0000, Long Li wrote: > > Subject: Re: [PATCH] RDMA/mana_ib: Use v2 version of cfg_rx_steer_req to > > enable RX coalescing > > > > On Mon, May 08, 2023 at 02:45:44PM +0000, Haiyang Zhang wrote: > > > > > > > > > > -----Original Message----- > > > > From: Leon Romanovsky > > > > Sent: Monday, May 8, 2023 2:10 AM > > > > To: Haiyang Zhang > > > > Cc: Long Li ; Jason Gunthorpe ; > > > > Ajay Sharma ; Dexuan Cui > > > > ; KY Srinivasan ; Wei Liu > > ; David S. > > > > Miller ; Eric Dumazet ; > > > > Jakub Kicinski ; Paolo Abeni ; > > > > linux- rdma@vger.kernel.org; linux-hyperv@vger.kernel.org; > > > > netdev@vger.kernel.org; linux-kernel@vger.kernel.org > > > > Subject: Re: [PATCH] RDMA/mana_ib: Use v2 version of > > > > cfg_rx_steer_req to enable RX coalescing > > > > > > > > On Sun, May 07, 2023 at 09:39:27PM +0000, Haiyang Zhang wrote: > > > > > > > > > > > > > > > > -----Original Message----- > > > > > > From: Leon Romanovsky > > > > > > Sent: Sunday, May 7, 2023 4:11 AM > > > > > > To: Long Li > > > > > > Cc: Jason Gunthorpe ; Ajay Sharma > > > > > > ; Dexuan Cui ; KY > > > > > > Srinivasan ; Haiyang Zhang > > > > ; > > > > > > Wei Liu ; David S. Miller > > > > > > ; Eric Dumazet ; > > Jakub > > > > > > Kicinski ; > > > > Paolo > > > > > > Abeni ; linux-rdma@vger.kernel.org; linux- > > > > > > hyperv@vger.kernel.org; netdev@vger.kernel.org; linux- > > > > > > kernel@vger.kernel.org > > > > > > Subject: Re: [PATCH] RDMA/mana_ib: Use v2 version of > > > > > > cfg_rx_steer_req > > > > to > > > > > > enable RX coalescing > > > > > > > > > > > > On Fri, May 05, 2023 at 11:51:48AM -0700, > > > > > > longli@linuxonhyperv.com > > > > > > wrote: > > > > > > > From: Long Li > > > > > > > > > > > > > > With RX coalescing, one CQE entry can be used to indicate > > > > > > > multiple > > > > packets > > > > > > > on the receive queue. This saves processing time and PCI > > > > > > > bandwidth over the CQ. > > > > > > > > > > > > > > Signed-off-by: Long Li > > > > > > > --- > > > > > > > drivers/infiniband/hw/mana/qp.c | 5 ++++- > > > > > > > include/net/mana/mana.h | 17 +++++++++++++++++ > > > > > > > 2 files changed, 21 insertions(+), 1 deletion(-) > > > > > > > > > > > > Why didn't you change mana_cfg_vport_steering() too? > > > > > > > > > > The mana_cfg_vport_steering() is for mana_en (Enthernet) driver, > > > > > not the mana_ib driver. > > > > > > > > > > The changes for mana_en will be done in a separate patch together > > > > > with changes for mana_en RX code patch to support multiple packets / > > CQE. > > > > > > > > I'm aware of the difference between mana_en and mana_ib. > > > > > > > > The change you proposed doesn't depend on "support multiple packets > > > > / CQE." > > > > and works perfectly with one packet/CQE also, does it? > > > > > > No. > > > If we add the following setting to the mana_en / > > > mana_cfg_vport_steering(), the NIC may put multiple packets in one > > > CQE, so we need to have the changes for mana_en RX code path to support > > multiple packets / CQE. > > > + req->cqe_coalescing_enable = true; > > > > You can leave "cqe_coalescing_enable = false" for ETH and still reuse your new > > v2 struct. > > I think your proposal will work for both Ethernet and IB. > > The idea is that we want this patch to change the behavior of the IB driver. We plan to make another patch for the Ethernet driver. This makes it easier to track all changes for a driver. And I don't want to deal with deletion of v1 struct for two/three kernel cycles instead of one patch in one cycle. > > > > > H> > > > So we plan to set this cqe_coalescing_enable, and the changes for > > > mana_en RX code path to support multiple packets / CQE in another patch. > > > > And how does it work with IB without changing anything except this proposed > > patch? > > The RX CQE Coalescing is implemented in the user-mode. This feature is always turned on from cluster. The user-mode code is written in a way that can deal with both CQE Coalescing and CQE non-coalescing, so it doesn't depend on kernel version for the correct behavior. Yes, but how does userspace know that CQE coalescing was enabled? Thanks > Thanks, > Long