From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pdx-out-009.esa.us-west-2.outbound.mail-perimeter.amazon.com (pdx-out-009.esa.us-west-2.outbound.mail-perimeter.amazon.com [35.155.198.111]) (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 14BD4312829 for ; Wed, 11 Feb 2026 11:33:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=35.155.198.111 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770809640; cv=none; b=p6See5LrqM9tkUdwaiCeejCg2n2NfRJ8CkhvQ2aT9KO8WyDjihFs+elpFfluK2DANkuExE1LxI3N+7Fd1fHzZjtle3HMLVLEgcneJ/9LPtVtl/IjW0al6E8b4mJ64MtASspzwiNhZEZ+AS55CjBnwzdPfcUJpvTHALET0SB+Vvc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770809640; c=relaxed/simple; bh=doEAcPqOODQ1oWWrEUPXqr5RzPrt3qiOSsiGj3HGP2Y=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=UxMsrFKzvJdvJHrDWh4W94uQT8ZZ0CVBvDAW9xTq1iGE+GVAgrKgskhbvGDWe3dCcWXPqmyMbSwVvDKb7RLYh8Q3tMcEr48c0nqxghTMFm1jA6RrppQsEr/f52FcKvUTeUTcgrcgkNqvOVEE3AgpexRZbYyL/HDofcnZi3Ie3WA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amazon.com; spf=pass smtp.mailfrom=amazon.com; dkim=pass (2048-bit key) header.d=amazon.com header.i=@amazon.com header.b=X6aNrG0X; arc=none smtp.client-ip=35.155.198.111 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amazon.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=amazon.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=amazon.com header.i=@amazon.com header.b="X6aNrG0X" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazoncorp2; t=1770809639; x=1802345639; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=Aqeu37Ds9eAuKGDBH/RIXqp2raOMG3MBg7mHF3I4tVY=; b=X6aNrG0XBFI+ueaPUFEZHaPBp/GAfl7YKNjE4H8VJpJARO9R1kFpo5gv 3zAgJ14/cq8sLxDK5Pc8bqVktowFtBPAWQQ0SEcpiMRLMtqH023k0+IuH +aSh4QR5ZoLbZSr0Zh79kD4BXpcAX+Mhwto8UqMpU3DBMd9vjYpF4Ka0J Gf94t6WGvHfb7cgteMj5jRJNR49qmEweky+aZ1iQVpIF5hop2gE0u8IO9 j7DUATU/EVOBISSeMiZ5acJofC3Fd4cmch9l7xHW1dPbg6DUk46mWKq/s +eu/TrCIYx8LygC7eGO/ecKULSbZtAo4In2Dzyo5+YwihQ5IIPQWfVFqy A==; X-CSE-ConnectionGUID: hosiclBQRFu/uwt2Srs/RQ== X-CSE-MsgGUID: GBourWMbScywQYo8Q7NkUw== X-IronPort-AV: E=Sophos;i="6.21,283,1763424000"; d="scan'208";a="12744555" Received: from ip-10-5-9-48.us-west-2.compute.internal (HELO smtpout.naws.us-west-2.prod.farcaster.email.amazon.dev) ([10.5.9.48]) by internal-pdx-out-009.esa.us-west-2.outbound.mail-perimeter.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Feb 2026 11:33:56 +0000 Received: from EX19MTAUWC001.ant.amazon.com [205.251.233.105:20036] by smtpin.naws.us-west-2.prod.farcaster.email.amazon.dev [10.0.19.6:2525] with esmtp (Farcaster) id 8e053d4b-257b-45a5-89e0-05d7760e3b76; Wed, 11 Feb 2026 11:33:56 +0000 (UTC) X-Farcaster-Flow-ID: 8e053d4b-257b-45a5-89e0-05d7760e3b76 Received: from EX19D001UWA001.ant.amazon.com (10.13.138.214) by EX19MTAUWC001.ant.amazon.com (10.250.64.174) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.2562.35; Wed, 11 Feb 2026 11:33:56 +0000 Received: from dev-dsk-ynachum-1b-aa121316.eu-west-1.amazon.com (10.253.69.224) by EX19D001UWA001.ant.amazon.com (10.13.138.214) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.2562.35; Wed, 11 Feb 2026 11:33:54 +0000 From: Yonatan Nachum To: , , CC: , , , , Yonatan Nachum , Firas Jahjah Subject: [PATCH for-next] RDMA/efa: Expose new extended max inline buff size Date: Wed, 11 Feb 2026 11:33:46 +0000 Message-ID: <20260211113346.9996-1-ynachum@amazon.com> X-Mailer: git-send-email 2.47.3 Precedence: bulk X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: EX19D032UWB002.ant.amazon.com (10.13.139.190) To EX19D001UWA001.ant.amazon.com (10.13.138.214) Add new extended max inline query and report the new value to userspace. Reviewed-by: Firas Jahjah Reviewed-by: Michael Margolin Signed-off-by: Yonatan Nachum --- .../infiniband/hw/efa/efa_admin_cmds_defs.h | 22 ++++++-- drivers/infiniband/hw/efa/efa_com_cmd.c | 55 ++++++++++++------- drivers/infiniband/hw/efa/efa_com_cmd.h | 3 +- drivers/infiniband/hw/efa/efa_verbs.c | 3 +- include/uapi/rdma/efa-abi.h | 5 +- 5 files changed, 59 insertions(+), 29 deletions(-) diff --git a/drivers/infiniband/hw/efa/efa_admin_cmds_defs.h b/drivers/infiniband/hw/efa/efa_admin_cmds_defs.h index 57178dad5eb7..93e5ffe900e9 100644 --- a/drivers/infiniband/hw/efa/efa_admin_cmds_defs.h +++ b/drivers/infiniband/hw/efa/efa_admin_cmds_defs.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */ /* - * Copyright 2018-2025 Amazon.com, Inc. or its affiliates. All rights reserved. + * Copyright 2018-2026 Amazon.com, Inc. or its affiliates. All rights reserved. */ #ifndef _EFA_ADMIN_CMDS_H_ @@ -38,10 +38,11 @@ enum efa_admin_aq_feature_id { EFA_ADMIN_DEVICE_ATTR = 1, EFA_ADMIN_AENQ_CONFIG = 2, EFA_ADMIN_NETWORK_ATTR = 3, - EFA_ADMIN_QUEUE_ATTR = 4, + EFA_ADMIN_QUEUE_ATTR_1 = 4, EFA_ADMIN_HW_HINTS = 5, EFA_ADMIN_HOST_INFO = 6, EFA_ADMIN_EVENT_QUEUE_ATTR = 7, + EFA_ADMIN_QUEUE_ATTR_2 = 8, }; /* QP transport type */ @@ -744,14 +745,18 @@ struct efa_admin_feature_device_attr_desc { u32 reserved1; }; -struct efa_admin_feature_queue_attr_desc { +struct efa_admin_feature_queue_attr_desc_1 { /* The maximum number of queue pairs supported */ u32 max_qp; /* Maximum number of WQEs per Send Queue */ u32 max_sq_depth; - /* Maximum size of data that can be sent inline in a Send WQE */ + /* + * Maximum size of data that can be sent inline in a Send WQE + * (deprecated by + * efa_admin_feature_queue_attr_desc_2::inline_buf_size_ex) + */ u32 inline_buf_size; /* Maximum number of buffer descriptors per Recv Queue */ @@ -805,6 +810,11 @@ struct efa_admin_feature_queue_attr_desc { u16 max_tx_batch; }; +struct efa_admin_feature_queue_attr_desc_2 { + /* Maximum size of data that can be sent inline in a Send WQE */ + u16 inline_buf_size_ex; +}; + struct efa_admin_event_queue_attr_desc { /* The maximum number of event queues supported */ u32 max_eq; @@ -872,7 +882,9 @@ struct efa_admin_get_feature_resp { struct efa_admin_feature_network_attr_desc network_attr; - struct efa_admin_feature_queue_attr_desc queue_attr; + struct efa_admin_feature_queue_attr_desc_1 queue_attr_1; + + struct efa_admin_feature_queue_attr_desc_2 queue_attr_2; struct efa_admin_event_queue_attr_desc event_queue_attr; diff --git a/drivers/infiniband/hw/efa/efa_com_cmd.c b/drivers/infiniband/hw/efa/efa_com_cmd.c index 9ead02800ac7..63c7f07806a8 100644 --- a/drivers/infiniband/hw/efa/efa_com_cmd.c +++ b/drivers/infiniband/hw/efa/efa_com_cmd.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause /* - * Copyright 2018-2025 Amazon.com, Inc. or its affiliates. All rights reserved. + * Copyright 2018-2026 Amazon.com, Inc. or its affiliates. All rights reserved. */ #include "efa_com.h" @@ -479,31 +479,46 @@ int efa_com_get_device_attr(struct efa_com_dev *edev, edev->supported_features = resp.u.device_attr.supported_features; err = efa_com_get_feature(edev, &resp, - EFA_ADMIN_QUEUE_ATTR); + EFA_ADMIN_QUEUE_ATTR_1); if (err) { ibdev_err_ratelimited(edev->efa_dev, - "Failed to get queue attributes %d\n", + "Failed to get queue attributes1 %d\n", err); return err; } - result->max_qp = resp.u.queue_attr.max_qp; - result->max_sq_depth = resp.u.queue_attr.max_sq_depth; - result->max_rq_depth = resp.u.queue_attr.max_rq_depth; - result->max_cq = resp.u.queue_attr.max_cq; - result->max_cq_depth = resp.u.queue_attr.max_cq_depth; - result->inline_buf_size = resp.u.queue_attr.inline_buf_size; - result->max_sq_sge = resp.u.queue_attr.max_wr_send_sges; - result->max_rq_sge = resp.u.queue_attr.max_wr_recv_sges; - result->max_mr = resp.u.queue_attr.max_mr; - result->max_mr_pages = resp.u.queue_attr.max_mr_pages; - result->max_pd = resp.u.queue_attr.max_pd; - result->max_ah = resp.u.queue_attr.max_ah; - result->max_llq_size = resp.u.queue_attr.max_llq_size; - result->sub_cqs_per_cq = resp.u.queue_attr.sub_cqs_per_cq; - result->max_wr_rdma_sge = resp.u.queue_attr.max_wr_rdma_sges; - result->max_tx_batch = resp.u.queue_attr.max_tx_batch; - result->min_sq_depth = resp.u.queue_attr.min_sq_depth; + result->max_qp = resp.u.queue_attr_1.max_qp; + result->max_sq_depth = resp.u.queue_attr_1.max_sq_depth; + result->max_rq_depth = resp.u.queue_attr_1.max_rq_depth; + result->max_cq = resp.u.queue_attr_1.max_cq; + result->max_cq_depth = resp.u.queue_attr_1.max_cq_depth; + result->inline_buf_size = resp.u.queue_attr_1.inline_buf_size; + result->max_sq_sge = resp.u.queue_attr_1.max_wr_send_sges; + result->max_rq_sge = resp.u.queue_attr_1.max_wr_recv_sges; + result->max_mr = resp.u.queue_attr_1.max_mr; + result->max_mr_pages = resp.u.queue_attr_1.max_mr_pages; + result->max_pd = resp.u.queue_attr_1.max_pd; + result->max_ah = resp.u.queue_attr_1.max_ah; + result->max_llq_size = resp.u.queue_attr_1.max_llq_size; + result->sub_cqs_per_cq = resp.u.queue_attr_1.sub_cqs_per_cq; + result->max_wr_rdma_sge = resp.u.queue_attr_1.max_wr_rdma_sges; + result->max_tx_batch = resp.u.queue_attr_1.max_tx_batch; + result->min_sq_depth = resp.u.queue_attr_1.min_sq_depth; + + if (efa_com_check_supported_feature_id(edev, EFA_ADMIN_QUEUE_ATTR_2)) { + err = efa_com_get_feature(edev, &resp, + EFA_ADMIN_QUEUE_ATTR_2); + if (err) { + ibdev_err_ratelimited( + edev->efa_dev, + "Failed to get queue attributes2 %d\n", err); + return err; + } + + result->inline_buf_size_ex = resp.u.queue_attr_2.inline_buf_size_ex; + } else { + result->inline_buf_size_ex = result->inline_buf_size; + } err = efa_com_get_feature(edev, &resp, EFA_ADMIN_NETWORK_ATTR); if (err) { diff --git a/drivers/infiniband/hw/efa/efa_com_cmd.h b/drivers/infiniband/hw/efa/efa_com_cmd.h index 3ac2686abba1..ef15b3c38429 100644 --- a/drivers/infiniband/hw/efa/efa_com_cmd.h +++ b/drivers/infiniband/hw/efa/efa_com_cmd.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */ /* - * Copyright 2018-2025 Amazon.com, Inc. or its affiliates. All rights reserved. + * Copyright 2018-2026 Amazon.com, Inc. or its affiliates. All rights reserved. */ #ifndef _EFA_COM_CMD_H_ @@ -127,6 +127,7 @@ struct efa_com_get_device_attr_result { u32 max_cq; u32 max_cq_depth; /* cqes */ u32 inline_buf_size; + u32 inline_buf_size_ex; u32 max_mr; u32 max_pd; u32 max_ah; diff --git a/drivers/infiniband/hw/efa/efa_verbs.c b/drivers/infiniband/hw/efa/efa_verbs.c index 22d3e25c3b9d..85c3a7dd4335 100644 --- a/drivers/infiniband/hw/efa/efa_verbs.c +++ b/drivers/infiniband/hw/efa/efa_verbs.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB /* - * Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All rights reserved. + * Copyright 2018-2026 Amazon.com, Inc. or its affiliates. All rights reserved. */ #include @@ -1994,6 +1994,7 @@ int efa_alloc_ucontext(struct ib_ucontext *ibucontext, struct ib_udata *udata) resp.cmds_supp_udata_mask |= EFA_USER_CMDS_SUPP_UDATA_CREATE_AH; resp.sub_cqs_per_cq = dev->dev_attr.sub_cqs_per_cq; resp.inline_buf_size = dev->dev_attr.inline_buf_size; + resp.inline_buf_size_ex = dev->dev_attr.inline_buf_size_ex; resp.max_llq_size = dev->dev_attr.max_llq_size; resp.max_tx_batch = dev->dev_attr.max_tx_batch; resp.min_sq_wr = dev->dev_attr.min_sq_depth; diff --git a/include/uapi/rdma/efa-abi.h b/include/uapi/rdma/efa-abi.h index 98b71b9979f8..13225b038124 100644 --- a/include/uapi/rdma/efa-abi.h +++ b/include/uapi/rdma/efa-abi.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */ /* - * Copyright 2018-2025 Amazon.com, Inc. or its affiliates. All rights reserved. + * Copyright 2018-2026 Amazon.com, Inc. or its affiliates. All rights reserved. */ #ifndef EFA_ABI_USER_H @@ -44,7 +44,8 @@ struct efa_ibv_alloc_ucontext_resp { __u32 max_llq_size; /* bytes */ __u16 max_tx_batch; /* units of 64 bytes */ __u16 min_sq_wr; - __u8 reserved_a0[4]; + __u16 inline_buf_size_ex; + __u8 reserved_b0[2]; }; struct efa_ibv_alloc_pd_resp { -- 2.47.3