From nobody Sat Jun 20 14:13:59 2026 Received: from BL2PR02CU003.outbound.protection.outlook.com (mail-eastusazon11011056.outbound.protection.outlook.com [52.101.52.56]) (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 3BCA44028F5; Wed, 17 Jun 2026 13:26:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.52.56 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781702784; cv=fail; b=Jma/dSarWd6zDwE59nxM8h8+CuQNQUOh80kyvB/u7Q0rF8PW88kGXvqr7oZl1N6iVz+6Ybr2w1TwKmMz/z+4/SWtcMqM1/7uqC5IT6FniynDNN4VIcLstFKW7BNHPmZgnXIUkRoXhNco9wYk3IdPd4L5SlqmoXWe+2JR6OYqi/Y= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781702784; c=relaxed/simple; bh=as4oW+uyDR+Lqfa2014fJuPaoejgN/AR/3FRddsT4t0=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=No17UdIcl8k3E8lQ3+ICkbcmrg5y7ZVx34wMs92Czp90a8LSFBaW0SmUcWC6k377+IkxGQtEAAuwnxuOpADM+j8kqzo7aJ5f/Hs++1wXgmZBfszs1D5qkKuoIXuDdMBncWis9jwdR2IHcemBrEhXqWwl88KVSBjI+GTe7+B43EQ= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=PaAPUKeK; arc=fail smtp.client-ip=52.101.52.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="PaAPUKeK" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=UAy2le04MYRbtyFQnSqDFtWEpeqfBlwuO6myLPohF6jeWfYTL2Fp9Ib45r+vWYdjWCrrFQ+TYoV0Ls8pDFUut4NscgDtaIf1OJsvhaFFW0+tBlROn1wMxH85odT0PlZNLR+q48JbqOh5Mm4q5pDlCXRtX70bZ5qinDyon+L1SyrkMwNZU8oTa1IlPE65yGWH0c1EMXq3aoXx9v8joqIdMbIw0qP44xOEOO3Wr/t+Ff/1VTwN7aPFirWDkj7ZnIYYhqTPVp+kb+O1NVg9r/ksTIMLf8M2rpjNkO2sfuhihvz9HTg+GPPrDZ6BZn79bsz/LoWyhAZ0dKJ23xgKvj5jLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=WJ4m/XyJGhFs2T/e8fR4sdjYwH/28u+sWH091FmsZ+o=; b=UE+LpKqsDogsyz7ARPK6VfsSixbpAuldb86rkS+raDIy5JEz0ccHZmF4VhP5b1AOQlRiPHbHxTgZCFGsyMEGw0Q1Qc6ANdZnaiQoZzQUN2WiQ1h758175aBgXQsvq2SzUBhB8JlFXhWxhFrsQLcitillRTeQ5m34n5PWblhwf9zxHcH/swMxcuyzsYJBkL8bxNZZ2bWlnyHTZH2+1N/Tbj83sYLC0PlAi0eR4cWQi7ynlTAL+ZeLIMbB8cg+TxldB+AJJljKzm03IrdpbxyFB2X2sxLUf2NZZcbvG8q4i+D09jC4+OjdMfHNT/aPFdnQmcevvQ/58P7MuTLpkjw/tA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=ziepe.ca smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WJ4m/XyJGhFs2T/e8fR4sdjYwH/28u+sWH091FmsZ+o=; b=PaAPUKeK84/WYTpJNRPezF++OrwOIvlDeV8wa6AZgQOH6PUwHanSKzJH99p6vPdutwVObGPSpvBQtIlP9EnlhUB/EMfJ7o9lOu33HHBrOkZTRwMoSFcT602zOY685745BsGWRE5rZzdI9NJfAAPLKO4ctdpHm73BaZY06+uD0Z8= Received: from BL1PR13CA0330.namprd13.prod.outlook.com (2603:10b6:208:2c1::35) by PH0PR12MB8100.namprd12.prod.outlook.com (2603:10b6:510:29b::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.113.18; Wed, 17 Jun 2026 13:26:18 +0000 Received: from BL02EPF00021F6D.namprd02.prod.outlook.com (2603:10b6:208:2c1:cafe::79) by BL1PR13CA0330.outlook.office365.com (2603:10b6:208:2c1::35) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.139.11 via Frontend Transport; Wed, 17 Jun 2026 13:26:17 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=satlexmb07.amd.com; pr=C Received: from satlexmb07.amd.com (165.204.84.17) by BL02EPF00021F6D.mail.protection.outlook.com (10.167.249.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.139.8 via Frontend Transport; Wed, 17 Jun 2026 13:26:17 +0000 Received: from satlexmb10.amd.com (10.181.42.219) by satlexmb07.amd.com (10.181.42.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.41; Wed, 17 Jun 2026 08:26:16 -0500 Received: from satlexmb08.amd.com (10.181.42.217) by satlexmb10.amd.com (10.181.42.219) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.41; Wed, 17 Jun 2026 08:26:16 -0500 Received: from xhdipdslab46.xilinx.com (10.180.168.240) by satlexmb08.amd.com (10.181.42.217) with Microsoft SMTP Server id 15.2.2562.41 via Frontend Transport; Wed, 17 Jun 2026 08:26:13 -0500 From: Abhijit Gangurde To: , , , , , , , CC: , , , , , Abhijit Gangurde Subject: [for-next v3 1/3] net: ionic: Fetch RCQ sign bit from firmware Date: Wed, 17 Jun 2026 18:56:03 +0530 Message-ID: <20260617132605.1888205-2-abhijit.gangurde@amd.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260617132605.1888205-1-abhijit.gangurde@amd.com> References: <20260617132605.1888205-1-abhijit.gangurde@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF00021F6D:EE_|PH0PR12MB8100:EE_ X-MS-Office365-Filtering-Correlation-Id: ea8a88f6-2c41-4040-b13f-08decc74030e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|7416014|36860700016|82310400026|23010399003|22082099003|18002099003|56012099006|11063799006; X-Microsoft-Antispam-Message-Info: FBFLIja0kW2V1jBznMBG37Z/vNytAoMCRxxIJjy0HrGOdiILHwgB4VmZUmb51Y/3ym/LZR4g00rYVNggoQBRo+LZGj235qVoqqcM+Q+9rgYdKsFc91KOTd7JwzyHzFGbESHMOJxBoSBE7n2R5Pp0pzWj09cO/y0bnWHMVdoBmOziU4DcUFHKCuUGra0hBomBmQEIYy8f3fvJ43mFq91/6C2pB9HUAyEhNj5Yr9KbFW+7KYvBa64DQsEVTrHQ4GRgCalJdn9XPo5p89L7PaH/YwY593G0tWUtAiV1DZpgnWN1OBrrvzcgFsYH4jBelFVQS2qewbKPinAV9Jb5pcXSb8osI/GsaSdtmSqcnlpyWFDh/cOKdge1UPET047hLt5ReHKpyLZ6OjSqLES052iLUuS542yzbWV1rLggoUr8vJvUJrI/l4Izx9caiK+aHpSgKQQiXRHYLKoRr2zzDsIHcO64FwgATRlKQ4lko1RRiqIO8hI1pQ0+bM62HZ9HNI3RZc3ueGp8qvlCYf82GCcH388LtWrwcNFPW70q6fWULwitObUZvJ/oYbiyOEfZiwPSgilHS9hoxbmtvbFMKbV6+y4Vu9BSA3Sr4I//b1CPl4YuZjkr9QeQDhvQ63BICFSs/G0CfDE6OhrxB3cmU88MhJNnK2vu5XFRvDHbxyMHGJTUjC4GB7lS7YEuA1BbM3y+/u4DvU2+OndV3R7yHISyUjX9uBUq45hhyZPKQm9EUBo= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:satlexmb07.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(376014)(1800799024)(7416014)(36860700016)(82310400026)(23010399003)(22082099003)(18002099003)(56012099006)(11063799006);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Px16IBouc0pX5BNYyPDprRIMD+QLU+JCok1wfEH0XrL5KOm3y1eeKMCnNJa9GmlucA4J+MOpOXJx8+UI4M/gInItY/drqqXrgyqE0KnKwE7vA1BV3l58a2N6qY+ww7CpADyTcaJUOAlDaT7/s0ZKDHfxElxHvKeEJgKNeJ48mkOvhQRkVLgoxP8x9p6qc5+Liz4g92Q1L+4WGHshe2vwwjowbyFCbDSbV4pGXhiYwNW4ylpgKS56mUAeaYuvJMgx/87GAWW+/Ac2+XEB6JODJgUsnmhYd5tEX8wngvO98HEq4JDyfxK/6BxeDaZr4uStLGLyGBSFFcxPIcPykpzG3haj516lJ+yncTzxPI/hLwn9N/WjLHnP3U8inCsClRPkfyqdFUf8zSRBgXTb45csuTDhE3+6Hw1xI1HOC/63W86QkREhPUhndqlfSKMEpZNq X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2026 13:26:17.2396 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ea8a88f6-2c41-4040-b13f-08decc74030e X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[satlexmb07.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BL02EPF00021F6D.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB8100 Content-Type: text/plain; charset="utf-8" Read the rcq_sign_bit from the RDMA LIF identity reported by firmware. Signed-off-by: Abhijit Gangurde --- drivers/net/ethernet/pensando/ionic/ionic_if.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_if.h b/drivers/net/e= thernet/pensando/ionic/ionic_if.h index 23d6e2b4791e..b97de96f78c4 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_if.h +++ b/drivers/net/ethernet/pensando/ionic/ionic_if.h @@ -553,6 +553,8 @@ enum ionic_lif_rdma_cap_stats { * @rdma.eq_qtype: RDMA Event Qtype * @rdma.stats_type: Supported statistics type * (enum ionic_lif_rdma_cap_stats) + * @rdma.rsvd: Reserved byte + * @rdma.rcq_sign_bit: RCQ sign bit * @rdma.rsvd1: Reserved byte(s) * @words: word access to struct contents */ @@ -598,7 +600,9 @@ union ionic_lif_identity { struct ionic_lif_logical_qtype cq_qtype; struct ionic_lif_logical_qtype eq_qtype; __le16 stats_type; - u8 rsvd1[162]; + u8 rsvd; + u8 rcq_sign_bit; + u8 rsvd1[160]; } __packed rdma; } __packed; __le32 words[478]; --=20 2.43.0 From nobody Sat Jun 20 14:13:59 2026 Received: from CY3PR05CU001.outbound.protection.outlook.com (mail-westcentralusazon11013027.outbound.protection.outlook.com [40.93.201.27]) (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 AEFA03B95E3; Wed, 17 Jun 2026 13:26:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.93.201.27 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781702803; cv=fail; b=m0iUE73dejyGDYR1Sd6bHao+4zpskSep20usSyvbgGz0wJgfIFnhMMSqAEbrnUCR3yp36X19rS7+3ERxIP0k9qJz3Eq7odIaUs2kqwwDjGXIyk7SpU1lzpvssWgMBlzdynChSln33ZTfeUiJq2Ilhyz8AAzBHebwR31oo2eUmaQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781702803; c=relaxed/simple; bh=RFN1wJ7jEuhoj7Wt2BrYvUDSE9vScydEo9K+Jj4B8EE=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=J5D+lKRU5k455BOOLsAbAbUheT9x0g+B3nDA5Hc+J6S3A9NGJyqpllI66fJOXgx/9yKz/enpFa1hmSETlsWghVAFO43dX62y9hfSPfLsgntp6bxigJ9TZtyfRpKf5W7dQJr7xuChlZlg9WCzZ5au8+it8GmaaHjbXMYle6h8HGo= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=bKuT9kNt; arc=fail smtp.client-ip=40.93.201.27 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="bKuT9kNt" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=yGEGO+O+2YPBAkBOYL25DupaIumYTCusb47UTxVDpRLF2xaQSPULV67noiooJE4tluBm1yjT1Os46MmSNwQgjDqehxot8v59jB5Ue5NumO3luXkevQM3rT9mFf28FNW8ayMwQnDc8tIpTlD5fw2vXav2ZZUbn6FgaeNp77Zw/nhzLPgc8GFGUTl1akVzwXZPJrO/puR6pBFAoyRBzSa+nHaarYGt4A71zKctSI/Mkn5N7+n/mKvDWW4JcIepmzMgneou9zqjSrbHHDTBsiiCKvNf4Uke12kuowZWHCldTab8jRcAlyFHnrCvumc5Xb3YkKOauQ4po0NxvdnzD5t/cQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=tmh5ZipUA3hIE+jKedAOaPG0ecwDGRUFw4Hrfdn7T+o=; b=GpBDO9SOq7JnXTrjJMyEiHcQkVQe/pl6nMHfRTEjeRRFvHi8CswA7S0RW+0ujyNXahNMRjuMEfmCoFbUrqHZsIqjS0lPGYcSif6ouOnBK4GS6qxfUw36GsI6YDUtkzZhxjRQ9iaFTHrGlZcvdFoHZ+pCSkrzZ6fngbC8FkkzHjzaHSCwYulKyiANhkQHaPjpxKHaKFNHqoRdQuI1lDR/GeNA22BrKUj9atGlQMjh1cN2+hw8DrTz3SvmSQTokRnOxR+XG7Xw5ywYAIXX02OMbkotQl/zs7+e/3v+CLWxNahMiyXYzdAS/Wz/FVOnsMED/unGqklsI9PTU3cA2sxD1A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=ziepe.ca smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tmh5ZipUA3hIE+jKedAOaPG0ecwDGRUFw4Hrfdn7T+o=; b=bKuT9kNtcsIJx6xF3XlVeIwGmYKL+PNsaag6Z1d8gqTKKGOS4d4i2+3GLBkQpBsqmi9xuh/E/GjXCEAlFfuwtA1f6XkCezeyFc/k14sXcweO9R21GZSc1NXxd2WlefUEikjGbmuggcBB24iK4snz0a0x5oNu+atsMAemljtinA4= Received: from SN6PR2101CA0019.namprd21.prod.outlook.com (2603:10b6:805:106::29) by MN6PR12MB8542.namprd12.prod.outlook.com (2603:10b6:208:477::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.113.18; Wed, 17 Jun 2026 13:26:32 +0000 Received: from SN1PEPF000252A1.namprd05.prod.outlook.com (2603:10b6:805:106:cafe::16) by SN6PR2101CA0019.outlook.office365.com (2603:10b6:805:106::29) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.159.2 via Frontend Transport; Wed, 17 Jun 2026 13:26:31 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=satlexmb08.amd.com; pr=C Received: from satlexmb08.amd.com (165.204.84.17) by SN1PEPF000252A1.mail.protection.outlook.com (10.167.242.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.139.8 via Frontend Transport; Wed, 17 Jun 2026 13:26:31 +0000 Received: from satlexmb08.amd.com (10.181.42.217) by satlexmb08.amd.com (10.181.42.217) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.41; Wed, 17 Jun 2026 08:26:20 -0500 Received: from xhdipdslab46.xilinx.com (10.180.168.240) by satlexmb08.amd.com (10.181.42.217) with Microsoft SMTP Server id 15.2.2562.41 via Frontend Transport; Wed, 17 Jun 2026 08:26:17 -0500 From: Abhijit Gangurde To: , , , , , , , CC: , , , , , Abhijit Gangurde Subject: [for-next v3 2/3] RDMA/ionic: Add robust udata compatibility checks to all uapi verbs Date: Wed, 17 Jun 2026 18:56:04 +0530 Message-ID: <20260617132605.1888205-3-abhijit.gangurde@amd.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260617132605.1888205-1-abhijit.gangurde@amd.com> References: <20260617132605.1888205-1-abhijit.gangurde@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF000252A1:EE_|MN6PR12MB8542:EE_ X-MS-Office365-Filtering-Correlation-Id: 9f3ed2a6-4a1b-433f-5c3e-08decc740b65 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|7416014|36860700016|82310400026|23010399003|22082099003|18002099003|3023799007|56012099006|11063799006|6133799003; X-Microsoft-Antispam-Message-Info: LQGwWM0v7uV2Aj7tOXrgOelD6u72q2G4c4aoSfTR9wUQewAkDIDFDBxrdRrNn5AI3/khLQUX/dnDVkvxSiTlw0oDmbabGji6WYx85URtEHz0trC0i8SYDpqOkzZT4vnrjy6kAmzcTlnFSa5X+lxyb+T/Z2r4yncwoh1+dMTnzwyRaqql3cIP0W1XdZKpHHVTA3VJH0pIJu2dRtz2I5gqUMbRZ7gvRuea+oci1uQExy/5WlYZB7Gs3rx9TZp6sGqOmZG0jm3ZVqqZasf74xoBtzLOLDxHtsDWvxhSO1o2iagD3oGIz7D+tSwV4HXV6Ens8pp2ZXHrUbKleG/Q/Gz1vnKfunR1DfTFSNhOrNf4wkbIZFQuYnx9Q5OlX52/Wb8qGm51HRwIiaVT7pLCA3vxSQ/Ro1hV6a51zd/pHe6+U7unmI9m5eFEHkWUhh6bsYcVBX784xpX7hydOyYL6m2KeU4lYBATlVUEFlCO8WW1Z3uXclAXU50oAmxpk8NYbSqRS+Vz575VvfYfIxmi/rUchE0bGCG4KPkLTXrywzBhW4EBTvHZ+XRIucwl+wxJcXB/KLK5qNolzfStRxYZJcAygWP4IXOznpnZefVkBUf2bNUULPtC657Vb2NzATfBbZNcDcnCEHxjPIi8R4UELMbrHRaSyGPIhHwPWOIwBsXXj+3iPfAdamn3o4hu8Ec091eOrrgO5fURPHMvHuhYibOzh1haZZVM83vxnnJTZyn1KDU= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:satlexmb08.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(376014)(1800799024)(7416014)(36860700016)(82310400026)(23010399003)(22082099003)(18002099003)(3023799007)(56012099006)(11063799006)(6133799003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: YGcHReQ3DmNbrXyyw6/RBsb4bdoZZmq7z9ZePJf3z15tcrSbFnmUNrH34rQlKQ3MuS9qgyVd0uPIVViw3zE25IrhtsJS7mVLtAcWP9wtk7IyabEZ8bGkPyahABrxLdudsAjQlKompBaJ6FM5NFk2d7J0+UAgZuKnGGfwoggjUmWead0ME5B2P9M4IZH5/ElANqu2QHWM6Awto9OcHibTrXGReJwqlmrb3ZRAzBr8hVmaBQtEUfyMNii2/Ok9UYCN4WRryk4p04THJhHuUJphG91sl4fYup/67ta2sjaZ4ZcwlZnfIMMz6xrRfGrnEGcnsCOgSOmQG/LZVN29C7P0ik56FXfa/OuKR8d3Ccakiph+2N3VWfGCqQi1LkXRTZD+yHT+tKUFm1/qH6O3Ygrvev+NWvHvV4Fjh+AHLKrM7ztpgnFKFtEtZv6Ja1uwREqW X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2026 13:26:31.2321 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9f3ed2a6-4a1b-433f-5c3e-08decc740b65 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[satlexmb08.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SN1PEPF000252A1.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN6PR12MB8542 Content-Type: text/plain; charset="utf-8" Enable the robust udata contract by setting uverbs_robust_udata and adding proper input validation and output handling to all verbs that accept struct ib_udata. For verbs with no driver request struct, add ib_is_udata_in_empty() to reject unknown non-zero input with -EOPNOTSUPP. For verbs with no driver response struct, add ib_respond_empty_udata() to zero-fill the userspace output buffer. For create_ah, which already responds with ionic_ah_resp, add the missing input validation. This ensures the kernel correctly advertises IB_UVERBS_CORE_SUPPORT_ROBUST_UDATA and upholds the forward/backward compatibility rules for all verbs: create_ah, alloc_pd, dealloc_pd, reg_user_mr, dereg_mr, alloc_mw, destroy_cq, modify_qp, and destroy_qp. Signed-off-by: Abhijit Gangurde --- .../infiniband/hw/ionic/ionic_controlpath.c | 63 +++++++++++++++++-- drivers/infiniband/hw/ionic/ionic_ibdev.c | 1 + 2 files changed, 59 insertions(+), 5 deletions(-) diff --git a/drivers/infiniband/hw/ionic/ionic_controlpath.c b/drivers/infi= niband/hw/ionic/ionic_controlpath.c index 9d91f7667d4f..79570da3e6a6 100644 --- a/drivers/infiniband/hw/ionic/ionic_controlpath.c +++ b/drivers/infiniband/hw/ionic/ionic_controlpath.c @@ -487,6 +487,15 @@ int ionic_alloc_pd(struct ib_pd *ibpd, struct ib_udata= *udata) { struct ionic_ibdev *dev =3D to_ionic_ibdev(ibpd->device); struct ionic_pd *pd =3D to_ionic_pd(ibpd); + int rc; + + rc =3D ib_is_udata_in_empty(udata); + if (rc) + return rc; + + rc =3D ib_respond_empty_udata(udata); + if (rc) + return rc; =20 return ionic_get_pdid(dev, &pd->pdid); } @@ -495,10 +504,15 @@ int ionic_dealloc_pd(struct ib_pd *ibpd, struct ib_ud= ata *udata) { struct ionic_ibdev *dev =3D to_ionic_ibdev(ibpd->device); struct ionic_pd *pd =3D to_ionic_pd(ibpd); + int rc; + + rc =3D ib_is_udata_in_empty(udata); + if (rc) + return rc; =20 ionic_put_pdid(dev, pd->pdid); =20 - return 0; + return ib_respond_empty_udata(udata); } =20 static int ionic_build_hdr(struct ionic_ibdev *dev, @@ -741,6 +755,10 @@ int ionic_create_ah(struct ib_ah *ibah, struct rdma_ah= _init_attr *init_attr, u32 flags =3D init_attr->flags; int rc; =20 + rc =3D ib_is_udata_in_empty(udata); + if (rc) + return rc; + rc =3D ionic_get_ahid(dev, &ah->ahid); if (rc) return rc; @@ -877,6 +895,14 @@ struct ib_mr *ionic_reg_user_mr(struct ib_pd *ibpd, u6= 4 start, u64 length, unsigned long pg_sz; int rc; =20 + rc =3D ib_is_udata_in_empty(udata); + if (rc) + return ERR_PTR(rc); + + rc =3D ib_respond_empty_udata(udata); + if (rc) + return ERR_PTR(rc); + if (dmah) return ERR_PTR(-EOPNOTSUPP); =20 @@ -1008,6 +1034,10 @@ int ionic_dereg_mr(struct ib_mr *ibmr, struct ib_uda= ta *udata) struct ionic_mr *mr =3D to_ionic_mr(ibmr); int rc; =20 + rc =3D ib_is_udata_in_empty(udata); + if (rc) + return rc; + if (!mr->ibmr.lkey) goto out; =20 @@ -1027,7 +1057,7 @@ int ionic_dereg_mr(struct ib_mr *ibmr, struct ib_udat= a *udata) out: kfree(mr); =20 - return 0; + return ib_respond_empty_udata(udata); } =20 struct ib_mr *ionic_alloc_mr(struct ib_pd *ibpd, enum ib_mr_type type, @@ -1120,6 +1150,14 @@ int ionic_alloc_mw(struct ib_mw *ibmw, struct ib_uda= ta *udata) struct ionic_mr *mr =3D to_ionic_mw(ibmw); int rc; =20 + rc =3D ib_is_udata_in_empty(udata); + if (rc) + return rc; + + rc =3D ib_respond_empty_udata(udata); + if (rc) + return rc; + rc =3D ionic_get_mrid(dev, &mr->mrid); if (rc) return rc; @@ -1292,6 +1330,10 @@ int ionic_destroy_cq(struct ib_cq *ibcq, struct ib_u= data *udata) struct ionic_vcq *vcq =3D to_ionic_vcq(ibcq); int udma_idx, rc_tmp, rc =3D 0; =20 + rc =3D ib_is_udata_in_empty(udata); + if (rc) + return rc; + for (udma_idx =3D dev->lif_cfg.udma_count; udma_idx; ) { --udma_idx; =20 @@ -1309,7 +1351,10 @@ int ionic_destroy_cq(struct ib_cq *ibcq, struct ib_u= data *udata) ionic_destroy_cq_common(dev, &vcq->cq[udma_idx]); } =20 - return rc; + if (rc) + return rc; + + return ib_respond_empty_udata(udata); } =20 static bool pd_remote_privileged(struct ib_pd *pd) @@ -2585,6 +2630,10 @@ int ionic_modify_qp(struct ib_qp *ibqp, struct ib_qp= _attr *attr, int mask, struct ionic_qp *qp =3D to_ionic_qp(ibqp); int rc; =20 + rc =3D ib_is_udata_in_empty(udata); + if (rc) + return rc; + rc =3D ionic_check_modify_qp(qp, attr, mask); if (rc) return rc; @@ -2607,7 +2656,7 @@ int ionic_modify_qp(struct ib_qp *ibqp, struct ib_qp_= attr *attr, int mask, } } =20 - return 0; + return ib_respond_empty_udata(udata); } =20 int ionic_query_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, @@ -2658,6 +2707,10 @@ int ionic_destroy_qp(struct ib_qp *ibqp, struct ib_u= data *udata) struct ionic_cq *cq; int rc; =20 + rc =3D ib_is_udata_in_empty(udata); + if (rc) + return rc; + rc =3D ionic_destroy_qp_cmd(dev, qp->qpid); if (rc) return rc; @@ -2692,5 +2745,5 @@ int ionic_destroy_qp(struct ib_qp *ibqp, struct ib_ud= ata *udata) } ionic_put_qpid(dev, qp->qpid); =20 - return 0; + return ib_respond_empty_udata(udata); } diff --git a/drivers/infiniband/hw/ionic/ionic_ibdev.c b/drivers/infiniband= /hw/ionic/ionic_ibdev.c index b0449c75f893..ad4e9abb5bf4 100644 --- a/drivers/infiniband/hw/ionic/ionic_ibdev.c +++ b/drivers/infiniband/hw/ionic/ionic_ibdev.c @@ -216,6 +216,7 @@ static const struct ib_device_ops ionic_dev_ops =3D { .owner =3D THIS_MODULE, .driver_id =3D RDMA_DRIVER_IONIC, .uverbs_abi_ver =3D IONIC_ABI_VERSION, + .uverbs_robust_udata =3D true, =20 .alloc_ucontext =3D ionic_alloc_ucontext, .dealloc_ucontext =3D ionic_dealloc_ucontext, --=20 2.43.0 From nobody Sat Jun 20 14:13:59 2026 Received: from DM5PR21CU001.outbound.protection.outlook.com (mail-centralusazon11011055.outbound.protection.outlook.com [52.101.62.55]) (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 878AC401A02; Wed, 17 Jun 2026 13:26:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.62.55 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781702791; cv=fail; b=n5uQ9J1RYQr7DfsaWemi7UCpFJ6OSsK0u5eequz5FXa3IYigGrpoGY34tKQ2aJEw8Zjn292dFwX59+2dplyVtiLfnimFsP6KNDWMC79SItz+fZBfRSAr2bSr8E9S8AjVUvjVrWx71M5MqD4nBbKZHmRD3qL5lwUrO3nB1qO4K8w= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781702791; c=relaxed/simple; bh=vF+DigRDPF1x4JuX0+2p/dt3tlWZWDnKQ5vLc2+h2fo=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=k2Dj7zyvh7R4e7BGxMT4Bz3S/7ZaZxVFPny2gyNGJdCnpTQp5GOZ51xcpcGUAG+0B8ElKa77sBAYyPRM3rKDoWxBN9UtRxhLvdG5/3Rv/TLezKQ2NVPXnjvbwZwPURFsmPLEgC6sX9QpeqkTteYPl3EMkknS/Zhw+ssEK1ORaSY= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=t+ds5PxC; arc=fail smtp.client-ip=52.101.62.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="t+ds5PxC" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=J+YAt02ZKfpPdw6UPwMCmxVbfiHnV5Mv5/bxVsZXzZ6+ebsxllcWOTG/yAlNCcI46osXEqiPPQde7uSJAl23JohfD9RbDuxC9Ifr62m6IHz9hiIJ35kizNtRl8NruMAVP50gL8MRXSyQcArfYXKIW8PExhVz/+v12SAiYwgbbIPntP74lps5WAaUcKDsv7Dw/0WjBqmNpZuPOIck/+rCUHnaUPYaRAsAHtxHn9WispfaTDL/Egc9P2esig6kr+x3RggC/Bw2kPPQ8z9FwmM0ImeZkMKU7mHm1AEp3/yMUVbecXwt/J1HzQROj7NHLgIkhf42ny32vSpzbz9/TG6xUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=zm4QkRf3GcKw1RB9HDqLy0hgAVNvlij6LZsZQIaO1QM=; b=j8FwUeSxotwaC8ZB55IjnnO1RcnRH/EK6+i/9ooufuR/UTEBFVUmQb4kYBaqLJSX6ziXB8svp01ajPv0ERvaNnm1VtqmhjykkeBbkBd44yMI38X2zfZo9h+3APCBYaLSvAdSFE2sSs+Z29/Vg0xO9Ry5XYWpJTWjiiiUYsxGzdkVmu7EbbyT/V6PB/FmjKaiESayaHIVdKO3YnstzbBXAkSl+ab0jM+gDJY+CyZJEBlpSDrgXfD4c5gp5x0JohG85SZ5KX5hGNk2D3icBdTJnCm1glWIvOw6ERZ9LGUayXng3tcxCHgAqvnKSGKZbrFeVC7PF8cN1QWJu74rjB8Wug== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=ziepe.ca smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zm4QkRf3GcKw1RB9HDqLy0hgAVNvlij6LZsZQIaO1QM=; b=t+ds5PxCD4fpuOLXD5vql0awmdDJxfCUmbublKvUVjqVKBQObgV0lccCaTpEBURC/qhbj86NZFA5UdskUDAh2wVvYAPH41NGp+DVBEHsdymjvrdRBbyCxcG1DTHKY65t+32p53HmXGa5zWZc0vyJuqdSTRUFKuyUB0cmlEoRvas= Received: from BN1PR14CA0025.namprd14.prod.outlook.com (2603:10b6:408:e3::30) by CH1PR12MB9573.namprd12.prod.outlook.com (2603:10b6:610:2ae::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.113.18; Wed, 17 Jun 2026 13:26:25 +0000 Received: from BL02EPF00021F6F.namprd02.prod.outlook.com (2603:10b6:408:e3:cafe::44) by BN1PR14CA0025.outlook.office365.com (2603:10b6:408:e3::30) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.139.11 via Frontend Transport; Wed, 17 Jun 2026 13:26:25 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=satlexmb07.amd.com; pr=C Received: from satlexmb07.amd.com (165.204.84.17) by BL02EPF00021F6F.mail.protection.outlook.com (10.167.249.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.139.8 via Frontend Transport; Wed, 17 Jun 2026 13:26:25 +0000 Received: from satlexmb10.amd.com (10.181.42.219) by satlexmb07.amd.com (10.181.42.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.41; Wed, 17 Jun 2026 08:26:24 -0500 Received: from satlexmb08.amd.com (10.181.42.217) by satlexmb10.amd.com (10.181.42.219) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.41; Wed, 17 Jun 2026 08:26:24 -0500 Received: from xhdipdslab46.xilinx.com (10.180.168.240) by satlexmb08.amd.com (10.181.42.217) with Microsoft SMTP Server id 15.2.2562.41 via Frontend Transport; Wed, 17 Jun 2026 08:26:21 -0500 From: Abhijit Gangurde To: , , , , , , , CC: , , , , , Abhijit Gangurde Subject: [for-next v3 3/3] RDMA/ionic: Add RCQ userspace support Date: Wed, 17 Jun 2026 18:56:05 +0530 Message-ID: <20260617132605.1888205-4-abhijit.gangurde@amd.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260617132605.1888205-1-abhijit.gangurde@amd.com> References: <20260617132605.1888205-1-abhijit.gangurde@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF00021F6F:EE_|CH1PR12MB9573:EE_ X-MS-Office365-Filtering-Correlation-Id: 9ebf440c-16a7-4e91-cb48-08decc7407c9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700016|82310400026|1800799024|7416014|376014|23010399003|18002099003|22082099003|6133799003|56012099006|11063799006; X-Microsoft-Antispam-Message-Info: Sd8Cxvy+Hpgo4VfPYX7yZnO4mTHHrbdltpJMBzaJuBS5XPwFP0bJN0GIY3dbbRRWwyEqF8UVsVK3IFxHc1NsF/CihpDA91MRjSQfLTg2gSzP6y4tnFk97IVgib0qHtKj2Tp7UN6ZGb+0nsWzTLYkBRtpb0lInSXXAWGfLYycdMbvj+wxnDKlg0ua2cZgD5//XUfQDVmDJJ6ZxxMFVrTN3YYj9aemXGKXWXCqZ83rk6BdUl8TxHwPtCCl44/wwlCK4/7Z9gGVXzeT1K+UbyC/HEtWFDiwT9n3zSCLEYZQ5L88JbVDuWwzSLqHvTiMjrK2pd1tNxyasfrWbQdenl58WdXoro/cF10IKtr02UCvLOZrxefvjmE+Dj/ZL2tb84zlyEShY9Ss+zynpjkaHNb9/PULAusTfL+QC201nN1NY+vzRZg25+j6Z+94cOwOQkR9FH7jEG1J3ilrkqKNHRYLxSm+YlCEjGfmlnZus0TqXZrS1YhH26U5xCKTXktBYJPKAsGMd/wtCWxWA+ux4RZKFbBMQjS/xQnOIoewmbLOjW1vFZA7SkeMQ4XZohvZ/Y9Xna0Eh+SyNjxRzsRchIeXGINXXGxKfNQ8lR1mRmpUc2l8BBacWg0cF/OlVN24dWO+n3S4FzBm8OByeiC7zz/hwnJUa5lY12xYzY1D3K4tLA/4mxrqS1r5+hNRNS1D4d0GuiyY4Eoq7NDVkhOQHTRlz7CGn0N2xdnbzy/62Spwaic= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:satlexmb07.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(36860700016)(82310400026)(1800799024)(7416014)(376014)(23010399003)(18002099003)(22082099003)(6133799003)(56012099006)(11063799006);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: UpRROf00aMMCvN5tS2gi2WOUJW/1nLrp7I9Ztk3x+mdCPoJ3Wd8kK1uDYSPhQlfJE/eitllXSGTNhSlHSmpg29p5jJOcHTIig0MX32xjyXN3gPdQjwTleZ3CwTL+P3rANq7etf4hUuQsaOLm0mv/Y76RE+ga4zdybCS12vXLwK4VveaVtgzwqi8E/eTtqLsZoAayJnpGNBk+vcWczciw50euvF6iKF1vn3OyLsiEDVDOy67FYmGqDdlrwe0rJjJ6ZXDynTfntAkkuzVU98kEWft9qs8JI3YjGK0zU3rGp7c3MKbfNGwzbJ3/bUrXFkdrswOOylWlKpMsWqEK5q+JByLB3GUdgJJ/5ejYByzkXgIfHlXLogHr3TWusqTSIzVYVOFrplkO4/OyLXDeOHEbZsncBirZSGv/nQosjiTZyyEOkQLG2YhHSFV3+vTk9hno X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2026 13:26:25.1684 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9ebf440c-16a7-4e91-cb48-08decc7407c9 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[satlexmb07.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BL02EPF00021F6F.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH1PR12MB9573 Content-Type: text/plain; charset="utf-8" Expose the Reorder Completion Queue (RCQ) capability to userspace via ucontext response and allow userspace to specify ionic specific QP flags during QP creation. Co-developed-by: Allen Hubbe Signed-off-by: Allen Hubbe Signed-off-by: Abhijit Gangurde --- drivers/infiniband/hw/ionic/ionic_controlpath.c | 9 ++++++--- drivers/infiniband/hw/ionic/ionic_fw.h | 2 ++ drivers/infiniband/hw/ionic/ionic_lif_cfg.c | 1 + drivers/infiniband/hw/ionic/ionic_lif_cfg.h | 1 + include/uapi/rdma/ionic-abi.h | 4 +++- 5 files changed, 13 insertions(+), 4 deletions(-) diff --git a/drivers/infiniband/hw/ionic/ionic_controlpath.c b/drivers/infi= niband/hw/ionic/ionic_controlpath.c index 79570da3e6a6..27058473d845 100644 --- a/drivers/infiniband/hw/ionic/ionic_controlpath.c +++ b/drivers/infiniband/hw/ionic/ionic_controlpath.c @@ -408,6 +408,7 @@ int ionic_alloc_ucontext(struct ib_ucontext *ibctx, str= uct ib_udata *udata) =20 resp.udma_count =3D dev->lif_cfg.udma_count; resp.expdb_mask =3D dev->lif_cfg.expdb_mask; + resp.rcq_sign_bit =3D dev->lif_cfg.rcq_sign_bit; =20 if (dev->lif_cfg.sq_expdb) resp.expdb_qtypes |=3D IONIC_EXPDB_SQ; @@ -1369,7 +1370,8 @@ static int ionic_create_qp_cmd(struct ionic_ibdev *de= v, struct ionic_qp *qp, struct ionic_tbl_buf *sq_buf, struct ionic_tbl_buf *rq_buf, - struct ib_qp_init_attr *attr) + struct ib_qp_init_attr *attr, + u32 ionic_flags) { const u16 dbid =3D ionic_obj_dbid(dev, pd->ibpd.uobject); const u32 flags =3D to_ionic_qp_flags(0, 0, @@ -1385,7 +1387,8 @@ static int ionic_create_qp_cmd(struct ionic_ibdev *de= v, .len =3D cpu_to_le16(IONIC_ADMIN_CREATE_QP_IN_V1_LEN), .cmd.create_qp =3D { .pd_id =3D cpu_to_le32(pd->pdid), - .priv_flags =3D cpu_to_be32(flags), + .priv_flags =3D cpu_to_be32(flags | + (ionic_flags & IONIC_QP_USER_FLAGS_MASK)), .type_state =3D to_ionic_qp_type(attr->qp_type), .dbid_flags =3D cpu_to_le16(dbid), .id_ver =3D cpu_to_le32(qp->qpid), @@ -2282,7 +2285,7 @@ int ionic_create_qp(struct ib_qp *ibqp, struct ib_qp_= init_attr *attr, rc =3D ionic_create_qp_cmd(dev, pd, to_ionic_vcq_cq(attr->send_cq, qp->udma_idx), to_ionic_vcq_cq(attr->recv_cq, qp->udma_idx), - qp, &sq_buf, &rq_buf, attr); + qp, &sq_buf, &rq_buf, attr, req.ionic_flags); if (rc) goto err_cmd; =20 diff --git a/drivers/infiniband/hw/ionic/ionic_fw.h b/drivers/infiniband/hw= /ionic/ionic_fw.h index adfbb89d856c..4c6752bfb1de 100644 --- a/drivers/infiniband/hw/ionic/ionic_fw.h +++ b/drivers/infiniband/hw/ionic/ionic_fw.h @@ -105,6 +105,8 @@ enum ionic_qp_flags { IONIC_QPF_SQ_CMB =3D BIT(13), IONIC_QPF_RQ_CMB =3D BIT(14), IONIC_QPF_PRIVILEGED =3D BIT(15), + + IONIC_QP_USER_FLAGS_MASK =3D GENMASK(31, 16), }; =20 static inline int from_ionic_qp_flags(int flags) diff --git a/drivers/infiniband/hw/ionic/ionic_lif_cfg.c b/drivers/infiniba= nd/hw/ionic/ionic_lif_cfg.c index f3cd281c3a2f..a9044f47c913 100644 --- a/drivers/infiniband/hw/ionic/ionic_lif_cfg.c +++ b/drivers/infiniband/hw/ionic/ionic_lif_cfg.c @@ -84,6 +84,7 @@ void ionic_fill_lif_cfg(struct ionic_lif *lif, struct ion= ic_lif_cfg *cfg) cfg->udma_count =3D 2; =20 cfg->max_stride =3D ident->rdma.max_stride; + cfg->rcq_sign_bit =3D ident->rdma.rcq_sign_bit; cfg->expdb_mask =3D ionic_get_expdb(lif); =20 cfg->sq_expdb =3D diff --git a/drivers/infiniband/hw/ionic/ionic_lif_cfg.h b/drivers/infiniba= nd/hw/ionic/ionic_lif_cfg.h index 20853429f623..e6b17055147f 100644 --- a/drivers/infiniband/hw/ionic/ionic_lif_cfg.h +++ b/drivers/infiniband/hw/ionic/ionic_lif_cfg.h @@ -56,6 +56,7 @@ struct ionic_lif_cfg { bool sq_expdb; bool rq_expdb; u8 expdb_mask; + u8 rcq_sign_bit; }; =20 void ionic_fill_lif_cfg(struct ionic_lif *lif, struct ionic_lif_cfg *cfg); diff --git a/include/uapi/rdma/ionic-abi.h b/include/uapi/rdma/ionic-abi.h index 7b589d3e9728..729cea3ccd56 100644 --- a/include/uapi/rdma/ionic-abi.h +++ b/include/uapi/rdma/ionic-abi.h @@ -46,8 +46,9 @@ struct ionic_ctx_resp { __u8 udma_count; __u8 expdb_mask; __u8 expdb_qtypes; + __u8 rcq_sign_bit; =20 - __u8 rsvd2[3]; + __u8 rsvd2[2]; }; =20 struct ionic_qdesc { @@ -84,6 +85,7 @@ struct ionic_qp_req { __u8 rq_cmb; __u8 udma_mask; __u8 rsvd[3]; + __u32 ionic_flags; }; =20 struct ionic_qp_resp { --=20 2.43.0