From patchwork Wed Feb 7 07:24:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 197782 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp2059627dyb; Tue, 6 Feb 2024 23:28:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IERmz4qo1cXtDm9YskzJ83n7nzKs909TsdEJ188dZBQT91aMtDV9t0erca9cDOeMaKEkuOu X-Received: by 2002:a2e:9b95:0:b0:2d0:a0a7:e3ef with SMTP id z21-20020a2e9b95000000b002d0a0a7e3efmr3612866lji.4.1707290936112; Tue, 06 Feb 2024 23:28:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707290936; cv=pass; d=google.com; s=arc-20160816; b=0cq8nMyy9JozJlzVn2kwI4Gg7i4S1kXMkESzl9p/F18AyWr6bnSqhB6GWUIBF/Bfgj p9TLdIpbr8p/bAA35kyJIfRbON+1ZkWiSNmeuS0RpBQ8Onnw0M1qHxpN6QTIOLI0FC2r iGL19Pwn5pMT0/otrbBem3E6ScmDIob2lnbkl6mCQU+XdXRHyDRKBdlKLbwbVt/0izTo Qq6F2TkzvYE+DYU4trmTq5S2fgpIee2asG76VKGGXUIx3pMWpXIDQGr+eJRFmJE8VVQt zTBTY8S0TKEy7TrOpCPFwiWiYD58KlumEYsDH/mfz/LDaLZmMKxkQvtUwrnNlYGQ4OM2 zinw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=XLot7mTyGhFw+GmvCLq7oj9AS61JB1sIxUgjAWaai9s=; fh=iLvlVTEDZawTuzUoS/uHvWrb8JNF77Vpbk5LZQ4sldE=; b=EGJcXlMb0jFnWNdl+XJJYAAOwDwXBroQIvdNkodAENiznhppcOfe/h/NHv5Q7IHRZ2 NAtlHwkxzTycrd/EnKdQjnUf70IV9q1ikpZzf8isWxr/kSOouDY8a2Wr1cTYOlg5Kuh+ X546R9pHpts5rR6YAqtJZrVAP3NVMag4fsfQRosudirnVGoDEUG3rXDsjzjGits+zCw7 CKn72QnO4KmW/KVkAIHOvX3VLSzXLl6eYAPfe/+y9qemVGG282Y9TP1e6a+EtF5TJenq rWjuxLx6UIMzHWy05BQtdMUAB6JxS4GilPGsMNQUr67IHefRpYUw4ilNexQ7EBPHnecT I5Lw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JtZEUOh0; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-56073-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56073-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCXxf1tjfz8PVVuF3iQZDhoNf9uy4ElfGqiEXGn/gfR4Vj89Qzcb1M5++IsN/+4PA/jDRkXtg+pLZ50ceHNnHyLC0GGhEA== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id l19-20020aa7c3d3000000b0055fa07cd8d5si526740edr.563.2024.02.06.23.28.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 23:28:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-56073-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JtZEUOh0; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-56073-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56073-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id AFA751F256A6 for ; Wed, 7 Feb 2024 07:28:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 57ADE20320; Wed, 7 Feb 2024 07:28:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="JtZEUOh0" 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 8DFA21F953 for ; Wed, 7 Feb 2024 07:28:25 +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=1707290905; cv=none; b=ITK3nmmicoPBL86jVBP+ZUOZ+v/xdklDsNCSrISWk3j21Yw8XzKIaJopxIQd01TAg1yp+cl6ls6ZOARg/0a4Y14UVYuutyx59byHcgR8wukc/VnHb+HEnKxri3+3Mv+70T9PZCoPOyQOfWqYc9gf9iEnqLKJ3RodZF0brxmlXMg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707290905; c=relaxed/simple; bh=BaBHHsLR+o2kRrQL4hy2Xypz7kcRhGFamMXsbhKvWuI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kmW5w3TxQbrEvLZGtIIDWd5E3+7QsWvEnjMc0ahJWHfQl2COW7LTI+FKxSoJBGEkYNuqKABdHEqbwQOvlijJPONa5v6WPp26sYf8UVtK4jKP5pMwnGcPv1XRgNWYTueVGVKrqFGQWEDcraAJA01YY93U+Ii6D/NYgC7de9qdrW8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=JtZEUOh0; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E5C81C433F1; Wed, 7 Feb 2024 07:28:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707290905; bh=BaBHHsLR+o2kRrQL4hy2Xypz7kcRhGFamMXsbhKvWuI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JtZEUOh0zRyxwwk34XIHx6A3v4f86vUzDdohVwqDarRmZ/nvXulBxuTQvTLAZ1vaG VjAHHJ6Cokwkisng7pRIgUVIwIVE8H+8mcUrdOSAe6MQtzwbhHEo2cqMEmZ/Ji5Nlp yyCsglY+/e1OChNvvsDKK2/1PBXOncxfW1FuMd7uFgqgQ4/UimYP9qNAVXko+j4g0p MwPK1ySscNrlm0BKysPlOnOcJ9j7doblgAsrYoUNu1XBM90JFTW9Q9jXx6QakIqUMU yB0bfZwmt/vRgktKMNCBwr3sHV02XK6Fa4UU2gPZ5Pav2MvtIY4SEvQyVHxYDgMSwH RkDBRtPh2GgGg== From: Saeed Mahameed To: Arnd Bergmann , Greg Kroah-Hartman Cc: Leon Romanovsky , Jason Gunthorpe , Jiri Pirko , Leonid Bloch , Itay Avraham , Jakub Kicinski , Saeed Mahameed , David Ahern , Aron Silverton , Christoph Hellwig , andrew.gospodarek@broadcom.com, linux-kernel@vger.kernel.org Subject: [PATCH V4 1/5] mlx5: Add aux dev for ctl interface Date: Tue, 6 Feb 2024 23:24:31 -0800 Message-ID: <20240207072435.14182-2-saeed@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240207072435.14182-1-saeed@kernel.org> References: <20240207072435.14182-1-saeed@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790224300774134106 X-GMAIL-MSGID: 1790224300774134106 From: Saeed Mahameed Allow ctl protocol interface auxiliary driver in mlx5. Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/dev.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/dev.c b/drivers/net/ethernet/mellanox/mlx5/core/dev.c index cf0477f53dc4..753c11f7050d 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/dev.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/dev.c @@ -228,8 +228,14 @@ enum { MLX5_INTERFACE_PROTOCOL_VNET, MLX5_INTERFACE_PROTOCOL_DPLL, + MLX5_INTERFACE_PROTOCOL_CTL, }; +static bool is_ctl_supported(struct mlx5_core_dev *dev) +{ + return MLX5_CAP_GEN(dev, uctx_cap); +} + static const struct mlx5_adev_device { const char *suffix; bool (*is_supported)(struct mlx5_core_dev *dev); @@ -252,6 +258,8 @@ static const struct mlx5_adev_device { .is_supported = &is_mp_supported }, [MLX5_INTERFACE_PROTOCOL_DPLL] = { .suffix = "dpll", .is_supported = &is_dpll_supported }, + [MLX5_INTERFACE_PROTOCOL_CTL] = { .suffix = "ctl", + .is_supported = &is_ctl_supported }, }; int mlx5_adev_idx_alloc(void)