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 Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AE41ED68BDC for ; Fri, 15 Nov 2024 22:40:11 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 648FC605EA; Fri, 15 Nov 2024 22:40:11 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id M0swwUGjDxjg; Fri, 15 Nov 2024 22:40:10 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org AE5E9605F9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1731710410; bh=+Ek8GZMqSIHsbViNoOmI/afu8qDdzMVOCvqTdcyOFGw=; h=Date:To:Cc:References:From:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=mc4RLLke+WnFOS7XvQEe0kKoOdArfdVD/5ejNoed9cKoibYKa/hlDL4QXDJGCoyaC 3eCW/ZseabCDqOxDAxbmQ7joVYOiiZfnnROoiV4VidG+mCowq/HytLGBtrnOgHJz8u c+CfNh0gRJkj+c6QpoWIVQaFL0WkgII8/A9heikE2TWlctjgZrEBeUZnvNYuZahH07 CHGfPOxZG1QOzc0sohuGOfv7Q6RUPORagPePxs6BMFKy7oz6ip+7bIqcFkZM+KmEMV e8IxyAphCxqcr1tMqG4x9JT2fqGTrE9+YspKdUMeccf8Fch/NUGlXRzhABPP/PReDk lCA57RUd5JhTQ== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp3.osuosl.org (Postfix) with ESMTP id AE5E9605F9; Fri, 15 Nov 2024 22:40:10 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists1.osuosl.org (Postfix) with ESMTP id 6954427DF for ; Fri, 15 Nov 2024 18:54:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 57D5F80AC4 for ; Fri, 15 Nov 2024 18:54:35 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 9qoZE4ScrYVz for ; Fri, 15 Nov 2024 18:54:34 +0000 (UTC) X-Greylist: delayed 470 seconds by postgrey-1.37 at util1.osuosl.org; Fri, 15 Nov 2024 18:54:34 UTC DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org 3F512809F6 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 3F512809F6 Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2001:41d0:203:375::b4; helo=out-180.mta1.migadu.com; envelope-from=jesse.brandeburg@linux.dev; receiver= Received: from out-180.mta1.migadu.com (out-180.mta1.migadu.com [IPv6:2001:41d0:203:375::b4]) by smtp1.osuosl.org (Postfix) with ESMTPS id 3F512809F6 for ; Fri, 15 Nov 2024 18:54:34 +0000 (UTC) Message-ID: <45ce4333-57da-4c32-ad06-c368d90b1328@linux.dev> Date: Fri, 15 Nov 2024 10:46:33 -0800 MIME-Version: 1.0 To: "Ertman, David M" , "jbrandeb@kernel.org" , "netdev@vger.kernel.org" Cc: "intel-wired-lan@lists.osuosl.org" , "Nguyen, Anthony L" , "Kitszel, Przemyslaw" , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni References: <20241114000105.703740-1-jbrandeb@kernel.org> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Jesse Brandeburg In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT X-Mailman-Approved-At: Fri, 15 Nov 2024 22:40:09 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1731696401; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+Ek8GZMqSIHsbViNoOmI/afu8qDdzMVOCvqTdcyOFGw=; b=a3aSdSCBDEfbuHo20XXAjfSzxgH0naWNRG5aRe8DOIKWSvHNMhTJRRdHbO/i0Ih3akEBES LOUEAX2eR42bRGlkJTruanZCRku7uKChPbOwJVtwEecYMmTzBh6v/InGWZ0nL9oALBozlR DRlAZ9uCJpzBKW6x5XC4Cr9bsa+VybQ= X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=none dis=none) header.from=linux.dev X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=a3aSdSCB Subject: Re: [Intel-wired-lan] [PATCH net v1] ice: do not reserve resources for RDMA when disabled X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" On 11/14/24 10:06 AM, Ertman, David M wrote: >> case ICE_AQC_CAPS_RDMA: >> - caps->rdma = (number == 1); >> + if (IS_ENABLED(CONFIG_INFINIBAND_IRDMA)) >> + caps->rdma = (number == 1); >> ice_debug(hw, ICE_DBG_INIT, "%s: rdma = %d\n", prefix, > > The HW caps struct should always accurately reflect the capabilities of the HW being probed. Since this why must it accurately reflect the capability of the hardware? The driver state and capability is a reflection of the combination of both, so I'm not sure what the point of your statement. > is a kernel configuration (i.e. software) consideration, the more appropriate approach would be to control > the PF flag "ICE_FLAG_RDMA_ENA" based on the kernel CONFIG setting. I started making the changes you suggested, but the ICE_FLAG_RDMA_ENA is blindly set by the LAG code, if the cap.rdma is enabled. see ice_set_rdma_cap(). This means the disable won't stick. Unless I'm misunderstanding something, ICE_FLAG_RDMA_ENA is used both as a gate and as a state, which is a design issue. This leaves no choice but to implement the way I did in this v1 patch. Do you see any other option to make a simple change that is safe for backporting to stable? Thanks, Jesse