From patchwork Thu Nov 14 00:00:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: jbrandeb@kernel.org X-Patchwork-Id: 13874396 X-Patchwork-Delegate: kuba@kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 854A31FC3 for ; Thu, 14 Nov 2024 00:01:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731542481; cv=none; b=iJVw+vD2bq98JqNzasPp92OTvXKgI5s35kYRYVPlelpseEpGcfKx5DQ/S4yqJ1Fu5LXMUf2p4mQQhnzYud6kIC5uo3FcyeWCBQ3Bpxj4nYVQHiYDV4/MMparFWRoOoDme6BePsxCqRJhuaMGNSEOPOxQPg9NVKropeyinZ76+gI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731542481; c=relaxed/simple; bh=HKamdRiWqWCrVoRSRelcMfN7MdgNyDW0mo0UCMcnhYc=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=o+So9LrW4wnNRvXv4EbcbyV1qPUUJjJsVSeYGIizJY6lITmRwmlbnFCCwEzqIEL5OM7aB56HP62DcJgOirgI20bxNOQ55O/Z4964w0/47wM7XKEcpdJe5kItVgbtvzbxjEyg+6X+HqhNDIBjAfABpnM5XJDd488qlbCOYuXuy4M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=KHovBmWi; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="KHovBmWi" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 354B1C4CEC3; Thu, 14 Nov 2024 00:01:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1731542481; bh=HKamdRiWqWCrVoRSRelcMfN7MdgNyDW0mo0UCMcnhYc=; h=From:To:Cc:Subject:Date:From; b=KHovBmWiBERwvVU8bpPi+o9nLADpZwYM3uNpyMuZQezNPoO+vw/PRqMSQ85SWxDOQ i5iQEsNvVhgSfnkFHNpFmftQg8juxMniRcN2a8anx9cztuqF7/itrVPjOO24OsqMsx WkMPdQf43CjjsAjjrlpzZnIsnLuTW0zPjM8toBlXPdjcK1IAlCW873YG6F8D1sOzss IMK8FbTvPf9eDdHK9V/Jjj451UZZ51e0mUgJA0+W3WgeBayBnxxKGhcYTvZ7DwKJdc NGcL6UcXZYBQdEMdkQQz4nBRW2zKtD5WY2AZOF4E8GZA7WNsORVHYuufKx6i7lXC4X +BSmnIfmpRKpw== From: jbrandeb@kernel.org To: netdev@vger.kernel.org Cc: jbrandeburg@cloudflare.com, Jesse Brandeburg , intel-wired-lan@lists.osuosl.org, Dave Ertman , Tony Nguyen , Przemek Kitszel , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Subject: [PATCH net v1] ice: do not reserve resources for RDMA when disabled Date: Wed, 13 Nov 2024 16:00:56 -0800 Message-Id: <20241114000105.703740-1-jbrandeb@kernel.org> X-Mailer: git-send-email 2.39.5 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org From: Jesse Brandeburg If the CONFIG_INFINIBAND_IRDMA symbol is not enabled as a module or a built-in, then don't let the driver reserve resources for RDMA. Do this by avoiding enabling the capability when scanning hardware capabilities. Fixes: d25a0fc41c1f ("ice: Initialize RDMA support") CC: Dave Ertman Signed-off-by: Jesse Brandeburg --- drivers/net/ethernet/intel/ice/ice_common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) base-commit: 2d5404caa8c7bb5c4e0435f94b28834ae5456623 diff --git a/drivers/net/ethernet/intel/ice/ice_common.c b/drivers/net/ethernet/intel/ice/ice_common.c index 009716a12a26..70be07ad2c10 100644 --- a/drivers/net/ethernet/intel/ice/ice_common.c +++ b/drivers/net/ethernet/intel/ice/ice_common.c @@ -2174,7 +2174,8 @@ ice_parse_common_caps(struct ice_hw *hw, struct ice_hw_common_caps *caps, caps->nvm_unified_update); break; 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, caps->rdma); break; case ICE_AQC_CAPS_MAX_MTU: