Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp312064pxb; Mon, 13 Sep 2021 20:18:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxLl3VBygmlfoSr3oEY8oUMxT/FEyXqDJ3KFKTgnI77+Tc332OlOpW/VNrRYbCKiu4DzQ0S X-Received: by 2002:aa7:d5c3:: with SMTP id d3mr15307954eds.151.1631589528117; Mon, 13 Sep 2021 20:18:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631589528; cv=none; d=google.com; s=arc-20160816; b=ZMwsSyyIbszKcxpR1r6T2LJUKxfQqZNgo/TZSQCvEX7lJvXoX97vOh2IxFjQ/88JEs fU4RGo0Njtj/YBarS19sOn88ODdqrLaWARbTL6Mk2kTymd+5Jsi+SswkwgPqRxU9h7k3 7GfgigN6LgaiPED8viuzVR/Kf9OVMAdjSg/EIEu1VJFXZ8uwJYyfL1I1eOFYpN0Q5meX ypy2gciYxE4S/geRPIncMJ2FOS7Br8FNBrOnqSPEsBh3CV9qflNMCMoH7ihJA6M9HgNt Lhrr44tW0hs9mwSioaahRslrk27VOyT8s5aV+jmJ8An+ycDDI1Mdc2LxQj0qIyHiS45Z imEg== 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=e92hij1XfpgsXuj5HyLTNjfA7g7zQKMI0WB11yH5P8A=; b=HSXtGVUUNBQbxxTC/tqAzPl9mw3zgVD3egaacumnY7wjOyBuy1hF0OPY+xHqGApbS4 rGIw8c52P/GPCltqSLxqjvi/l5RHYnnBt0JYXW9plPujNBZMnYwCqDkPzduD0t5pqQDC 5Tb/yJfoBEky4X7FU0QZf9C+OkfkOUZV4xZXnp0TummzcrZHAWSb+aWmvLTY+jTGHwEs UIHVy+coC9+r45f5VibtkCWGac7KS8mZcTKijERgEldsF+eMUnw0hW+JgRtz2TZ2QNln YEZmcpzcAevuvlIntAhJG126RjMvvUGga0V+cDdOSWGI2r4C6XABnorkUJ3Iyi1yvf7j TjOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mB7vh8JY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h5si9071402ejj.144.2021.09.13.20.18.23; Mon, 13 Sep 2021 20:18:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mB7vh8JY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S238665AbhINDRs (ORCPT + 99 others); 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-kernel@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 >