Received: by 2002:ab2:3c46:0:b0:1f5:f2ab:c469 with SMTP id x6csp262741lqf; Fri, 26 Apr 2024 06:13:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUaRx/3X8mccw1dZs6Z6HHckVbEumE4TJoemZeYUN1nLTy4X6230KcNUT4bfuXvB5Tly/xd8ENKX89OXSyelYUpWocJStO1eOWs891Q4Q== X-Google-Smtp-Source: AGHT+IEJJ2LSaPbDlPgg6/QNgycnI5j8Tz87Vc2C/CuQPjv5F1wfH/04k0thazuToqSgcZK+f3Hj X-Received: by 2002:ac2:4c49:0:b0:518:b4a3:dee1 with SMTP id o9-20020ac24c49000000b00518b4a3dee1mr2178714lfk.66.1714137192403; Fri, 26 Apr 2024 06:13:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714137192; cv=pass; d=google.com; s=arc-20160816; b=zErA1c2sTpAoTi5bWFnRcX5JfGmF6FYFCvfBQCNCla8Ljwhfcp6WIZiEIAtCqH1nKe +HFC0N4y960zIy5bDowy5dN7/P0ryZxKPi5XAjAg2WWFUyh+WctCQ6hgkCOIMSlfyQD6 aXRVGCYkfeYIeGnBozjGiwBm25UEGN9lax9pn/OttBIgK/pifK4fy3Dt/3e7HNC5YKeg d3BH6WsG1KW5CPPBRvJmCYzM2e0x6Hyp5N3Xpa3uyluvaRJDnBFQsSaENXT+UiGOXsfU MvLsnJoIbN1znve/imbQlsruViMYySxy0+R3PAEBG0cT7/BW/7sz4899O1er/YvPO6zu XJBg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-id:precedence:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=RO8omU3mFuuk6wZAfmhtQuuvQ83q0qcIhS82ZrxUOB0=; fh=ujksmUrBEjpGhQjWbrjZMx9PDXUXbYR/j4y8MAq1x1o=; b=E+EJ6FCgaaYFVtd7/uIz6Z28iOGzkKBEkCdX70NhjFhzzRfPaVjcePOlqw+CiPsh12 hwrH6PaEUn+czTcqdUdprnvdCyfsMe9mjBf3CKnxd4qYinEf6kNoWRx6j3jlyc1oxCJ3 VJmEgnPVXa4eATYOQIY00cAtDPBk5zrg39NWDIHHU9yty8089t1n4y41bwvDWEKUv5TV lH7a3qdWcHGuA9V+SAZ4yY+b/4zcRpKDKeZEWmJGcBelcvvexL7uUqJxjN3V6Nmp2Drx I338xGgJm+dq+AzdVK+VsOk1N+fcKv7QrYFAqwKCROHgJwqmfpD6/f5pD39t6mVpCeKx OLoQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=eo2RmEZU; arc=pass (i=1 spf=pass spfdomain=linux.microsoft.com dkim=pass dkdomain=linux.microsoft.com dmarc=pass fromdomain=linux.microsoft.com); spf=pass (google.com: domain of linux-kernel+bounces-160032-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160032-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id hs16-20020a1709073e9000b00a5575cec71csi11516702ejc.254.2024.04.26.06.13.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 06:13:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-160032-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=eo2RmEZU; arc=pass (i=1 spf=pass spfdomain=linux.microsoft.com dkim=pass dkdomain=linux.microsoft.com dmarc=pass fromdomain=linux.microsoft.com); spf=pass (google.com: domain of linux-kernel+bounces-160032-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160032-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com 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 168611F21AC9 for ; Fri, 26 Apr 2024 13:13:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 53638147C82; Fri, 26 Apr 2024 13:12:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b="eo2RmEZU" Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4DF63146D5A; Fri, 26 Apr 2024 13:12:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=13.77.154.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714137167; cv=none; b=cBbQbl8nGr5IqQ1XxG2iuPiAgeqevkywQLR5w8ffbIAzx6kW7GhMGDKddKNYXxGPDYy08tvVVuyfZR+SThA6BM+h5GRtYscMBuuujkYo8xIPMrU6Ty2m/qA5xEAIYRV60woBEJQFHugsqaiPcfPmYuarLWxd7db6In+6ZTIyNu0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714137167; c=relaxed/simple; bh=XXhcj0cDpVh7xPwt8Dp0EC9SyzQNMQnm3miM/hj7FWQ=; h=From:To:Cc:Subject:Date:Message-Id; b=m06ofmYsgYiCsy5tEEM9PrL+yeA8+TWvPGjGmPv7Js7RwPGZnfNWDFGqA1Kwwf4bTjjKEIn1zvImuQhMt9rnZp4MU050l/QjtcBap1+lvJT17E1aDGmuPfT9MKy8kZz88+TE1PupYV3Vy8BfIydQLJQTSWq7QSFFmks7FLyrn8s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com; spf=pass smtp.mailfrom=linux.microsoft.com; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b=eo2RmEZU; arc=none smtp.client-ip=13.77.154.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.microsoft.com Received: from linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net (linux.microsoft.com [13.77.154.182]) by linux.microsoft.com (Postfix) with ESMTPSA id CA291210EF22; Fri, 26 Apr 2024 06:12:45 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com CA291210EF22 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1714137165; bh=RO8omU3mFuuk6wZAfmhtQuuvQ83q0qcIhS82ZrxUOB0=; h=From:To:Cc:Subject:Date:From; b=eo2RmEZUb5cAqMcv+xAJZ6udM65wQvUF/wqJmKU10KQnVm73JSh7kQdArDWQ8q3kn kqSG5TlEqoPAiFU3nGdugG/ZSSkxcK8NIpI/4y49khW7tRRCTOV5IY3vRP4i9veOrn bMOsBM29ZyBGaNGVVZTnqpBBBp3b5kOzDyD9/Qt0= From: Konstantin Taranov To: kotaranov@microsoft.com, sharmaajay@microsoft.com, longli@microsoft.com, jgg@ziepe.ca, leon@kernel.org Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH rdma-next v2 0/5] RDMA/mana_ib: Implement RNIC CQs Date: Fri, 26 Apr 2024 06:12:35 -0700 Message-Id: <1714137160-5222-1-git-send-email-kotaranov@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: From: Konstantin Taranov This patch series implements creation and destruction of CQs which can be used with RC QPs. Patches with RC QPs will be sent in the next patch series. To create a CQ for RNIC, mana_ib requires creation of EQs within mana_ib device. An EQ of mana ethernet cannot be used. To make the implementation of create_cq cleaner, this series also introduces a helper to remove CQ callbacks. Mana ethernet and mana_ib CQs are different entities which are created in different isolation zones (ethernet vs rnic). As a result, RNIC cannot use ethenet CQs and ethernet cannot use RNIC CQs. That is why, we use existing udata request for creation of ethernet CQs. If the request has an extra flag, then we create an RNIC CQ. The kernel-level CQs will be RNIC CQs (in future patches). To preserve backward and forward compatibility with RDMA-CORE, we will make the following changes to mana provider in RDMA-CORE: The rdma-core will request RNIC CQs by default, with the proposed request format and the special flag. If the mana has installed an allocator with manadv_set_context_attr, then the rdma-core understands that this is a DPDK use-case and requests an ethernet CQ, by not setting the flag. If the user has a new RDMA-core and an old kernel, then the user can detect it as the response to create RNIC cq will not have queue id. If the user has an old RDMA-core, then the flags will be 0 and ethernet CQ will be created (as expected by the user). v1->v2: 1) removed patch that replace cqe with buf_size 2) added aditional check of queue id in the remove cb helper 3) removed buf_size from uapi request and added flags instead. It seems to be a better proposal that will not require to increase the ABI version. Konstantin Taranov (5): RDMA/mana_ib: create EQs for RNIC CQs RDMA/mana_ib: create and destroy RNIC cqs RDMA/mana_ib: introduce a helper to remove cq callbacks RDMA/mana_ib: boundary check before installing cq callbacks RDMA/mana_ib: implement uapi for creation of rnic cq drivers/infiniband/hw/mana/cq.c | 74 +++++++++++++++++++---- drivers/infiniband/hw/mana/main.c | 88 +++++++++++++++++++++++++++- drivers/infiniband/hw/mana/mana_ib.h | 34 +++++++++++ drivers/infiniband/hw/mana/qp.c | 26 ++------ include/uapi/rdma/mana-abi.h | 12 ++++ 5 files changed, 200 insertions(+), 34 deletions(-) -- 2.43.0