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=-6.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 5E8A1C433F5 for ; Tue, 14 Sep 2021 03:16:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3DB5060273 for ; Tue, 14 Sep 2021 03:16:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238474AbhINDRs (ORCPT ); Mon, 13 Sep 2021 23:17:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:40346 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237213AbhINDRs (ORCPT ); Mon, 13 Sep 2021 23:17:48 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E7B8F60FDA; Tue, 14 Sep 2021 03:16:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631589391; bh=W34OXpHVI8IRqoH+2KbWo+deibUpb2mP6Uf99tWa4No=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=mB7vh8JYTdszNKhX1AtKYJeTmLz/5PNBNlVrtfJOPtqWBHZdQH35u7eRwjErtD4iK E1iqgoA7/fk8BTgRM2awWB+DQ1lfjUwAbXMY+YKh0zstHRrzyf4WbKkEfuy5e5Shzx 5FZnNuZBqrXEzkicJwoY3FX1Hx/ask4KDqJz64i1jYHgvdIIv0U2UjvtwVntKOmtmL OxpRXAybDUgS7Dk9Nr0WaijMocO+YNNYZTD8cCFaZcLe1qcOcHx3a3C13GYbul2vL8 ERy40P4yJTJp1LPX4GilQ3E3uIzkIFhxoX7OmrkNvBIagAFD+3fhMsuYxU/NJ01kcj qTV7J47fU6V1g== Date: Tue, 14 Sep 2021 06:16:27 +0300 From: Leon Romanovsky To: "Ertman, David M" Cc: "Saleem, Shiraz" , "davem@davemloft.net" , "kuba@kernel.org" , "yongxin.liu@windriver.com" , "Nguyen, Anthony L" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "Brandeburg, Jesse" , "intel-wired-lan@lists.osuosl.org" , "linux-rdma@vger.kernel.org" , "jgg@ziepe.ca" , "Williams, Dan J" , "Singhai, Anjali" , "Parikh, Neerav" , "Samudrala, Sridhar" Subject: Re: [PATCH RESEND net] ice: Correctly deal with PFs that do not support RDMA Message-ID: References: <20210909151223.572918-1-david.m.ertman@intel.com> <4bc2664ac89844a79242339f5e971335@intel.com> 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-rdma@vger.kernel.org On Mon, Sep 13, 2021 at 04:07:28PM +0000, Ertman, David M wrote: > > -----Original Message----- > > From: Saleem, Shiraz > > Sent: Monday, September 13, 2021 8:50 AM > > To: Leon Romanovsky ; Ertman, David M > > > > Cc: davem@davemloft.net; kuba@kernel.org; yongxin.liu@windriver.com; > > Nguyen, Anthony L ; > > netdev@vger.kernel.org; linux-kernel@vger.kernel.org; Brandeburg, Jesse > > ; intel-wired-lan@lists.osuosl.org; linux- > > rdma@vger.kernel.org; jgg@ziepe.ca; Williams, Dan J > > ; Singhai, Anjali ; > > Parikh, Neerav ; Samudrala, Sridhar > > > > Subject: RE: [PATCH RESEND net] ice: Correctly deal with PFs that do not > > support RDMA > > > > > Subject: Re: [PATCH RESEND net] ice: Correctly deal with PFs that do not > > > support RDMA > > > > > > On Thu, Sep 09, 2021 at 08:12:23AM -0700, Dave Ertman wrote: > > > > There are two cases where the current PF does not support RDMA > > > > functionality. The first is if the NVM loaded on the device is set to > > > > not support RDMA (common_caps.rdma is false). The second is if the > > > > kernel bonding driver has included the current PF in an active link > > > > aggregate. > > > > > > > > When the driver has determined that this PF does not support RDMA, > > > > then auxiliary devices should not be created on the auxiliary bus. > > > > > > This part is wrong, auxiliary devices should always be created, in your case it > > will > > > be one eth device only without extra irdma device. > > > > It is worth considering having an eth aux device/driver but is it a hard-and- > > fast rule? > > In this case, the RDMA-capable PCI network device spawns an auxiliary > > device for RDMA > > and the core driver is a network driver. > > > > > > > > Your "bug" is that you mixed auxiliary bus devices with "regular" ones and > > created > > > eth device not as auxiliary one. This is why you are calling to > > auxiliary_device_init() > > > for RDMA only and fallback to non-auxiliary mode. > > > > It's a design choice on how you carve out function(s) off your PCI core device > > to be > > managed by auxiliary driver(s) and not a bug. > > > > Shiraz > > Also, regardless of whether netdev functionality is carved out into an auxiliary device or not, this code would still be necessary. Right > > We don't want to carve out an auxiliary device to support a functionality that the base PCI device does not support. Not having > the RDMA auxiliary device for an auxiliary driver to bind to is how we differentiate between devices that support RDMA and those > that don't. This is right too. My complain is that you mixed enumerator logic with eth driver and create auxiliary bus only if your RDMA device exists. It is wrong. Thanks > > Thanks, > DaveE >