Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp116621lqt; Thu, 18 Apr 2024 09:53:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVXT7+ySbETArlZz+pDbgy+AZJRAJKAHsmFLaFRPi5I/+KUUx13HM63kFtWJkKk2o9JTsJVFLxYcYcVlgybhfo0dwCzaLYFrdNw1R4l1g== X-Google-Smtp-Source: AGHT+IFXeZmR3sofVJKUpvu2T/5WhJH1xW+N9HyCcKwaw+80IIzQXQSUqJmjBXh7O6i6p/8/ofvK X-Received: by 2002:a05:6a20:43ab:b0:1a7:590e:279e with SMTP id i43-20020a056a2043ab00b001a7590e279emr4853346pzl.5.1713459204362; Thu, 18 Apr 2024 09:53:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713459204; cv=pass; d=google.com; s=arc-20160816; b=OeL7hPQJku3zyUV4woCPiBWLilc0sJ3kCV/XMaI++TZsF2kHXFqF+Kduw4NDcpGsOS Ugvm4BZWu3jcGn06DDQt+7gxT1hy3zF6Jd2ncgydZSIVLe0j7G0G5nCTSttLG1LVEilG uEeSZv2pRc9nSQ4TdPFSsnwC5hiqKTs+ULQ76DM12phY0nv2n00Td3fuupqHkNngmV7c paYhgV0ugRbVSWvQ0LzxImsdJH/Zz21/OLxg346Fef2592KtwOyOZJyLrE+vDO8nW+zU 7QO55P84uQSRgmV/I0EFQrqL/NqAfhtELho2DxsTDns3FMNhhwjr0VDOz8J/4S1kc8QY yObw== 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=usFNmjgTL6o5J7+904XNALZFx9gHBIeiQH0Vr4rMqvE=; fh=ujksmUrBEjpGhQjWbrjZMx9PDXUXbYR/j4y8MAq1x1o=; b=tyTsDP0DWroI6cmaJuJMdQT6xH0FpxIefXvTIL1rc225eDicxK2Lrmtl45Ab81Ewgn cHa8V9qDAK+W1Vs1k0DraVfpCt1Zh+X0fkM2b/MP4/agoUmlu5IqnySEPPfkr1c/QtZm C9+N5APpUE/gMilRVUEQVBtsriV4t7t+E2k4ZnmlMk/cVifyMtpUZ2ccDVwQ3e9rFwCA GgT0EXBd/clVYzibH1JLSS3uX/E+4ZxX2Ou0FdpVQ+n9nzhBuivXJ/HCYqvUyAjUvO7l RJ305zby/vvf3dtzYXcu+h2DHONIN3tO7ii5jjsIaZvoOQpGF6n1d02cg5FFtM152BnM f+NA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=tFTXJCb+; 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-150519-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-150519-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 sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id l129-20020a633e87000000b005e2b1e879d6si1807555pga.370.2024.04.18.09.53.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 09:53:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-150519-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=tFTXJCb+; 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-150519-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-150519-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 13A04284A45 for ; Thu, 18 Apr 2024 16:53:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BED661791F4; Thu, 18 Apr 2024 16:52:15 +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="tFTXJCb+" Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 73615171646; Thu, 18 Apr 2024 16:52:11 +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=1713459134; cv=none; b=e2TqAABTMlhONK3l5XhbAcdgwd63KXpJtScyqnAzvdOBGUFcdxmqsRZ7B6YEBD55+ccHgV30gSSxOTFc1W9ivo+hUmsETyMt59Z3gkrYJwkS7GFYuOM+j6N1LyipoymFVKKyf2WyBQArknxNycLRt3VFOAos3BLH5NUM/YMw/14= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713459134; c=relaxed/simple; bh=USYxCd+6xF7K5pkaEdGKIuCmDU74c0xRd5gM491L5uY=; h=From:To:Cc:Subject:Date:Message-Id; b=GvyccN1cM3Coq26xMrrPctQfO0G0vRTKjzwVwGarTPayDGvkqWwFOysPC2b3SWRVZSUOqxRx2QbDbKlXcIOcXJpKY2XQvNbLhWP5myfUfVb15gT49fh98uhsusORdLdiS4eH/BqPstIDCmSkJQK0XycIu78EryS2si6BdIfB2z0= 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=tFTXJCb+; 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 1093220FD8C4; Thu, 18 Apr 2024 09:52:11 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 1093220FD8C4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1713459131; bh=usFNmjgTL6o5J7+904XNALZFx9gHBIeiQH0Vr4rMqvE=; h=From:To:Cc:Subject:Date:From; b=tFTXJCb+gAVRa5xBhiNQU3IburUjdpK/uVk/+2xq+dt3aHEtd8QM+M2BKC9O7YggH kOEQHSz5QS3VRxnwnPkuNmdHFU214zT/+qd0WRoYF2proCoApzw91tZk7c1/6pDjMn Le0WjOhlZLimf9lNA9zG8NrmcX8Xg6Vj+r0QkW1s= 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 0/6] RDMA/mana_ib: Implement RNIC CQs Date: Thu, 18 Apr 2024 09:51:59 -0700 Message-Id: <1713459125-14914-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 minor changes to mana_cq structure (cqe->buf_size) and adds 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 extra fields, 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. If the mana has installed an allocator with manadv_set_context_attr, then the rdma-core undestands that this is a DPDK use-case and requests an ethernet CQ, using old short request format. Konstantin Taranov (6): RDMA/mana_ib: create EQs for RNIC CQs RDMA/mana_ib: create and destroy RNIC cqs RDMA/mana_ib: replace duplicate cqe with buf_size 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 | 77 ++++++++++++++++++++---- drivers/infiniband/hw/mana/main.c | 88 +++++++++++++++++++++++++++- drivers/infiniband/hw/mana/mana_ib.h | 36 +++++++++++- drivers/infiniband/hw/mana/qp.c | 30 ++-------- include/uapi/rdma/mana-abi.h | 7 +++ 5 files changed, 200 insertions(+), 38 deletions(-) -- 2.43.0