From patchwork Wed Dec 11 08:39:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kalesh AP X-Patchwork-Id: 13903133 Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7387B8489 for ; Wed, 11 Dec 2024 08:44:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.176 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733906646; cv=none; b=FO/YEFSid8s27acb0ogBIgdwe6fGm2WcbCKYuofOnhn6YtFQCiHH87jvWdJQvznBWkeCCZPxvf4oH2tSEtOVbpH7skqTkIyCC9h9ELpFgWvPjg2feArgU4ySF/2Y1bKneBldFIllUpW2wz/DjmMi3ibj2j6nrlPoaXKWM//7DD4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733906646; c=relaxed/simple; bh=xkBNjvhWV8zMh/16s8VGDAewWWyZZduUKMRWl41YFHc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nhxpTB9OfNE+oHJDb7DgBCqlMAPC8lKu/Pvsw8VAmxWdcGvJw1MtwK5Q4ldUvBHnvDIDjgf32jWKXQ7OFlmC8IMaifPaA8TmzF/ymCytIWXG8UiyiI6vunNGoiWfbvMRGgGXFAvctkBNv5zCEXMlyZzl9doDi/yGiy0hV8bPNBs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b=FI986Im1; arc=none smtp.client-ip=209.85.210.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="FI986Im1" Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-725abf74334so5341622b3a.3 for ; Wed, 11 Dec 2024 00:44:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1733906644; x=1734511444; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=61iMgu5WqnCRI74Ee5MYDKbvdnz5GHeF06t5FwAiwgo=; b=FI986Im1pZgEKu+MxqQ3pZCaoM2Fa4Xro1JOOID3L6Z6wtoxkIbB+fE+FSlMqjAnyI ci4kUaGUZ/8talilDBYdxchSe/6G5rlqBY9njtWd5k4Blxt38AODieoYw6Xv4FPOGtta nux2CNlQV50Foe8dyiqP8bIoTgNj4GYezLIW8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733906644; x=1734511444; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=61iMgu5WqnCRI74Ee5MYDKbvdnz5GHeF06t5FwAiwgo=; b=DYielgLXRzftl/HYQmSZVwcgb7EOM+LRFV1tmIHpiAHGNfeNkbIwnwN09i0kGUPNgw 6asptmLk6097zZWqcrd65dq+i1pD6aNzhNPjAkiqgaCDw8Pez2tpxV1Fo4AgMskl0ToW 0PWO0rQfdQwYD4vmqMp0HLf27wyEtxAlyA0cxlhbekdNPceaIiYcZaMfMH8P15Jn2u1V usFfiOh4+Biq2TrybqgNW6Qd0MIQkx4GRqz47IgoyPS2ipjy2c6a6i2v1Q3LRDWrkzZ1 7Q82RnOcwPFk6Cnpvyo5qMnFq1dhGe1qkiHSaDiWqESdgVvpEMU0WxfTUkMs1wHbYXA9 spwQ== X-Gm-Message-State: AOJu0YxFKsYt5TJlUc5EF9jw5fWPK4bFpEy470vBxmouWwEs9CE+aR1/ dLk1R34MIN+03ZPZ5GrU4yFY+51hot27iKAaUJomDWaL5y2hL9JrxwhqL8HC/A== X-Gm-Gg: ASbGnct2564wAGwz8M0HdwDY8CpsyttU9DdI9h5BJVjgpcOPpf0pn83F7LkB8e0tHFi IeuzNVe+o8EdSwnCxbnptJ34qcYeWPd3rm1uON+upnz/wqcrFqJTs6Llt/RLDoNA3y1veumXu2Y gt2OVbu78j1pn/YFmVmyWMxBLXWUTe/DswlG5X4isqlamOT7mcfpnvQheAtrRH/XdUQr3OWd8Bx /kqahgWN3FE9tpprSd54hi0uFUHSlsm8lLzc+T4fiphXfnzNMksDDhdSH4Iw/uzr/Za9jb67+lE +NN+UYc0KRYvhjR4o2Rny9TLRPf+Alzo1C18vOJpXUs3PSpAclLo1B3I X-Google-Smtp-Source: AGHT+IHkLG6/+82OGOk3pAyj10ozFDE+7JpP2TTy42+X5maObXWe9wts8JjW0+rUqgsqs8g1OeYhzw== X-Received: by 2002:a05:6a00:4f91:b0:728:ac38:4bee with SMTP id d2e1a72fcca58-728ed3b2978mr3547924b3a.2.1733906643756; Wed, 11 Dec 2024 00:44:03 -0800 (PST) Received: from dhcp-10-123-157-228.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7273b69ce95sm3653678b3a.66.2024.12.11.00.44.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2024 00:44:03 -0800 (PST) From: Kalesh AP To: leon@kernel.org, jgg@ziepe.ca Cc: linux-rdma@vger.kernel.org, andrew.gospodarek@broadcom.com, selvin.xavier@broadcom.com, Kalesh AP , Kashyap Desai Subject: [PATCH for-rc 1/5] RDMA/bnxt_re: Fix the check for 9060 condition Date: Wed, 11 Dec 2024 14:09:27 +0530 Message-ID: <20241211083931.968831-2-kalesh-anakkur.purayil@broadcom.com> X-Mailer: git-send-email 2.43.5 In-Reply-To: <20241211083931.968831-1-kalesh-anakkur.purayil@broadcom.com> References: <20241211083931.968831-1-kalesh-anakkur.purayil@broadcom.com> Precedence: bulk X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The check for 9060 condition should only be made for legacy chips. Fixes: 9152e0b722b2 ("RDMA/bnxt_re: HW workarounds for handling specific conditions") Reviewed-by: Kashyap Desai Signed-off-by: Kalesh AP Signed-off-by: Selvin Xavier --- drivers/infiniband/hw/bnxt_re/qplib_fp.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/infiniband/hw/bnxt_re/qplib_fp.c b/drivers/infiniband/hw/bnxt_re/qplib_fp.c index 72f35070f671..093bfb748cdf 100644 --- a/drivers/infiniband/hw/bnxt_re/qplib_fp.c +++ b/drivers/infiniband/hw/bnxt_re/qplib_fp.c @@ -2669,10 +2669,12 @@ static int bnxt_qplib_cq_process_req(struct bnxt_qplib_cq *cq, bnxt_qplib_add_flush_qp(qp); } else { /* Before we complete, do WA 9060 */ - if (do_wa9060(qp, cq, cq_cons, sq->swq_last, - cqe_sq_cons)) { - *lib_qp = qp; - goto out; + if (!bnxt_qplib_is_chip_gen_p5_p7(qp->cctx)) { + if (do_wa9060(qp, cq, cq_cons, sq->swq_last, + cqe_sq_cons)) { + *lib_qp = qp; + goto out; + } } if (swq->flags & SQ_SEND_FLAGS_SIGNAL_COMP) { cqe->status = CQ_REQ_STATUS_OK; From patchwork Wed Dec 11 08:39:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kalesh AP X-Patchwork-Id: 13903134 Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 473A71DC98C for ; Wed, 11 Dec 2024 08:44:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733906648; cv=none; b=pgg0yNvXE5gBppSTjxA0BM/D28/d6iNKXV0vYxR0nIKPc1KaY1c+g7MQyk5V2sc3gmRlSBtiwrLYhWAoffF978bXmyUEhGfy8HeJA2tG2dEHt2JuAE+aBLT1T2NKMV3h+hs1Gy7p636swossvOBnKlnqqxZiBKA/eko6elRwmng= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733906648; c=relaxed/simple; bh=NJy6FQzQpA/aBlOn7Yyou4JYL5E4RDNUgk7Ri+pWWIs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=eY2OZcr0++7Jihjuh59PSAF5BjQnppF1y2wQ5jx1uCDiLl4CDaYDuc5HWw9Q9FYgTl2OeL6WL3Y0vwMj+0jYN2zPePT4oSey1zDOOwf1wOs19qQqX5hPLdD3yhvNr/5OUi8xHWa3nDtfaifsf/fkIhSXkdTlQYzpgNFDxjdx02I= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b=ew3wy6NI; arc=none smtp.client-ip=209.85.215.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="ew3wy6NI" Received: by mail-pg1-f173.google.com with SMTP id 41be03b00d2f7-7ee11ff7210so5014983a12.1 for ; Wed, 11 Dec 2024 00:44:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1733906646; x=1734511446; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=OFv+0mmmV8AKEmbdcMk/3e7lKZ8tCX1WSd4MT8kfTFQ=; b=ew3wy6NIO6KBGOu4S4YgI/DzfobE1pet8XSPROXwbGfXy7dfivYOk3j5wngvxUBlPd CCNtoC3HzgkdyooJrzfiDlKysGFK0vNB7duMALbusZzJpF0+FgxquA18zYQbuLAfplst QDDjNrXJIty5i+Eu/ygI+geQ79cm7sN9qpTfg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733906646; x=1734511446; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OFv+0mmmV8AKEmbdcMk/3e7lKZ8tCX1WSd4MT8kfTFQ=; b=PLWE/DRpzXBX6l2gcmA7v3y5qql9l6vQZlN17EY639vINjXmFlXxDl6WdgUM4BpSnH N7NJ3TSXIiNR9ZYRiP3cEktU0RUbQlDfc1d3uMQQHHTA6XyKnnPFwqK367rXiySPH34c BgRWbWI/t7l6XvmnA7+RXN4NC0LeC8iWyhqMQhQl44vErHycJmWxLszQVZlqSoBEDmfZ zCIeG5soxljI8vFn6ScyNPT+wL+we8hmN+LhVzyivjK2ol6j61UyNCYqA5jtZkFHl/qS Dvc8tDRFoGAUwDA/cH1UYnxzUF6Pr5uU86UYqccGrcHdUci5IynXqYyuaa6LgKENQ41W bY2g== X-Gm-Message-State: AOJu0YyaIFbHvG7Cpxf1ViZ7IitnDGCOfEe88w31Nw6p9KeYD05jy6df HJsN88j6lNu/eUQTELisJSobFos4PQClWUJ7MoK12It55+JUh65uUIdFWBkcVw== X-Gm-Gg: ASbGncu39ZiVBGu3vxIez5QAQ18oDnzXG42On++1jQm47+nh1Gm9TBaB9ON1cwvtQIb qdZjy0JFCmeSHe16X2IJsu2Pd/QIX2UeLsSacjwc8TlocOpTLO8MjvqOHJmQD+LKRAG9BjuQEsz etO5AIboipva5PZhqTwcjTtr1yDxU2EZiJ2Tm7x3nXNc4PHIh8fNS9Nz/oMlk4NsK4Xs+OYDk2n PCZUjELHkaCmbQFQI27wBum/TEf7lSmbVhumZfxLK7BE7b9lQuKyYw2MxZJdeD7hoSTjXCXkGFa eXmlsgPNHC8KvqOSgg+yPeSlQY5IJY6gge5zMA0hwYxVOParmF0AdgRa X-Google-Smtp-Source: AGHT+IF6s6X3qi2mY7yU3Evg1fbHTuNTJxmi0arbu/Q2qkM1q80U428a29momtoh2UAdAWjsfTkUug== X-Received: by 2002:a05:6a20:4326:b0:1e1:ae9a:6311 with SMTP id adf61e73a8af0-1e1c12459edmr3388494637.4.1733906646595; Wed, 11 Dec 2024 00:44:06 -0800 (PST) Received: from dhcp-10-123-157-228.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7273b69ce95sm3653678b3a.66.2024.12.11.00.44.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2024 00:44:06 -0800 (PST) From: Kalesh AP To: leon@kernel.org, jgg@ziepe.ca Cc: linux-rdma@vger.kernel.org, andrew.gospodarek@broadcom.com, selvin.xavier@broadcom.com, Saravanan Vajravel , Kalesh AP Subject: [PATCH for-rc 2/5] RDMA/bnxt_re: Add check for path mtu in modify_qp Date: Wed, 11 Dec 2024 14:09:28 +0530 Message-ID: <20241211083931.968831-3-kalesh-anakkur.purayil@broadcom.com> X-Mailer: git-send-email 2.43.5 In-Reply-To: <20241211083931.968831-1-kalesh-anakkur.purayil@broadcom.com> References: <20241211083931.968831-1-kalesh-anakkur.purayil@broadcom.com> Precedence: bulk X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Saravanan Vajravel When RDMA app configures path MTU, add a check in modify_qp verb to make sure that it doesn't go beyond interface MTU. If this check fails, driver will fail the modify_qp verb. Fixes: 1ac5a4047975 ("RDMA/bnxt_re: Add bnxt_re RoCE driver") Reviewed-by: Kalesh AP Signed-off-by: Saravanan Vajravel Signed-off-by: Selvin Xavier --- drivers/infiniband/hw/bnxt_re/ib_verbs.c | 26 +++++++++++++----------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c index 215074c0860b..a609e1635a3d 100644 --- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c +++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c @@ -2162,18 +2162,20 @@ int bnxt_re_modify_qp(struct ib_qp *ib_qp, struct ib_qp_attr *qp_attr, } } - if (qp_attr_mask & IB_QP_PATH_MTU) { - qp->qplib_qp.modify_flags |= - CMDQ_MODIFY_QP_MODIFY_MASK_PATH_MTU; - qp->qplib_qp.path_mtu = __from_ib_mtu(qp_attr->path_mtu); - qp->qplib_qp.mtu = ib_mtu_enum_to_int(qp_attr->path_mtu); - } else if (qp_attr->qp_state == IB_QPS_RTR) { - qp->qplib_qp.modify_flags |= - CMDQ_MODIFY_QP_MODIFY_MASK_PATH_MTU; - qp->qplib_qp.path_mtu = - __from_ib_mtu(iboe_get_mtu(rdev->netdev->mtu)); - qp->qplib_qp.mtu = - ib_mtu_enum_to_int(iboe_get_mtu(rdev->netdev->mtu)); + if (qp_attr->qp_state == IB_QPS_RTR) { + enum ib_mtu qpmtu; + + qpmtu = iboe_get_mtu(rdev->netdev->mtu); + if (qp_attr_mask & IB_QP_PATH_MTU) { + if (ib_mtu_enum_to_int(qp_attr->path_mtu) > + ib_mtu_enum_to_int(qpmtu)) + return -EINVAL; + qpmtu = qp_attr->path_mtu; + } + + qp->qplib_qp.modify_flags |= CMDQ_MODIFY_QP_MODIFY_MASK_PATH_MTU; + qp->qplib_qp.path_mtu = __from_ib_mtu(qpmtu); + qp->qplib_qp.mtu = ib_mtu_enum_to_int(qpmtu); } if (qp_attr_mask & IB_QP_TIMEOUT) { From patchwork Wed Dec 11 08:39:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kalesh AP X-Patchwork-Id: 13903135 Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6EBF31DE8B7 for ; Wed, 11 Dec 2024 08:44:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733906652; cv=none; b=FGFg5gGcaFEAYjx4A6W2gnNe4MD069rGxrQGX865BXEN7J2S+0V3dc3IZVQvOTgjZAuK6YWe/k3ed2gbMJVnv6XpJnDV/DcfK+JxsjqQLGUAvfXPFzsRzb9MAgoQ96npBo5IQ9eFniGmiGUNptrZYsT+ktj6umqZ8j7nIxd4Q8Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733906652; c=relaxed/simple; bh=iC0eZmWoat9R67TXlnCfAg5RY/EwxobpMOdoMGHrRFw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kb92ZcnErhqLZ0ntb2h66cHW2fO7d+jq7L0uH5YkHLWqZ7sd7+k/e0opmghPfcXoP3YAYxkXME6WGWoBAU3JNam7SYXNvoLbS+Ry/i9aA1SwgfK1oNsIeT7HlB9lHj9yN0Br15U25k6KzuUgZryxo0Oaz70vw+WMaiWx3mQD964= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b=bJeHSOxA; arc=none smtp.client-ip=209.85.210.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="bJeHSOxA" Received: by mail-pf1-f173.google.com with SMTP id d2e1a72fcca58-723f37dd76cso5719073b3a.0 for ; Wed, 11 Dec 2024 00:44:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1733906650; x=1734511450; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=cZnjkZelwJOROBz1YROF+KrWXEJ6KdTHprw3DY6m5hE=; b=bJeHSOxAorOGxSmSlWIUuXkOHYPdW1ErbJwUelZ9PWuy5NvUMIM3C3YXG3JliXhX2b d+SPgLaKar5uPQq3PgpKkXrJ/LRrVc+snv/xTJ/2OiW7qNn7aAHS6ZJnqnNtj/nFntsg 7SQ2ViGvD8hr64OQ62ULAr69gRtdO/xaBJOHo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733906650; x=1734511450; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cZnjkZelwJOROBz1YROF+KrWXEJ6KdTHprw3DY6m5hE=; b=t+NTs0qgQ0SGPcH91m2GkJ/J1fdZv7qeLpfjWHBK7Ofv9X8aZQalUCWob0r33tejaZ wAbFEA+53ThW3VYMxLrfFT56hAh41bBd0qlf9TuhItJyXlswSuBzfALsiVUbotFQ+pC9 sRR2MTbynCSpvv4c+/OtPnWZdlFWqy2C5i7VZXcgVU5RLULbdEr1SQcLcHC/igibLxOg +5Awbr/1c0O7KaaWZt46vyEp4xDWrboac6RJmVvoL7mR2J4wdz2S+R2otH0wiqo1jpPA TqGE74AuCyh3D8Zn4JLerXehE8qf4RYjREEWRaEIhx6xWbbD9gWautG+3JSJ33flVmYk LGYQ== X-Gm-Message-State: AOJu0YzhOrs5cXlQ85Lu3Xr/BVyrpU4KOwghPQiL65MCzCxJuwtNSH1/ KM+qzfXTyALdyIehOjApW0a2lyLIUwrntM4tauIsYT8FJy63saqh0lMgSpRsa7gBFsu8QP8xC7Y BCA== X-Gm-Gg: ASbGnctnGjrY0ddCb4C/vBNyauyEa3uhENsyr1xnvwURqxhjLNI1Sz/OrhDlc+TJm1/ G8GACsLfGU47eP184vf7NWPH7z1wvGd9aPYcs4mFOE/qbJnfclkMb/1w2Y22SmonugcSO3od2f9 3IxoJvE49mVn6QCgxPVkZAbs3FzT+1yYfc+pHlouzmDX0xUsc7Y0H9IHRBrl5DBU9w/81LrwldC 1UOhRNasztWgEmiNbmryKGedcMgalgq5LuNscYFghqHocJLNqhZnDc2d/j/afmajun/0SSWihez zLfFKH8n8txhJh8yzgxmWT7Kw0miBf7xbFyvLo6iucifyRiudUrrxBS3 X-Google-Smtp-Source: AGHT+IGc8TXuXEhihIG8QjimZJI9ZQOKdkrMSg9cqU4x28U0h7QtXvjoF1jYQPlxRbgepwnPmWv5gA== X-Received: by 2002:a05:6a21:918c:b0:1e1:afa9:d38b with SMTP id adf61e73a8af0-1e1c126ef7bmr4674988637.8.1733906649652; Wed, 11 Dec 2024 00:44:09 -0800 (PST) Received: from dhcp-10-123-157-228.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7273b69ce95sm3653678b3a.66.2024.12.11.00.44.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2024 00:44:09 -0800 (PST) From: Kalesh AP To: leon@kernel.org, jgg@ziepe.ca Cc: linux-rdma@vger.kernel.org, andrew.gospodarek@broadcom.com, selvin.xavier@broadcom.com, Damodharam Ammepalli , Rukhsana Ansari , Kalesh AP Subject: [PATCH for-rc 3/5] RDMA/bnxt_re: Fix setting mandatory attributes for modify_qp Date: Wed, 11 Dec 2024 14:09:29 +0530 Message-ID: <20241211083931.968831-4-kalesh-anakkur.purayil@broadcom.com> X-Mailer: git-send-email 2.43.5 In-Reply-To: <20241211083931.968831-1-kalesh-anakkur.purayil@broadcom.com> References: <20241211083931.968831-1-kalesh-anakkur.purayil@broadcom.com> Precedence: bulk X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Damodharam Ammepalli Firmware expects "min_rnr_timer" as a mandatory attribute in MODIFY_QP command during the RTR-RTS transition. This needs to be enforced by the driver which is missing while setting bnxt_set_mandatory_attributes that sends these flags as part of modify_qp optimization. Fixes: 82c32d219272 ("RDMA/bnxt_re: Add support for optimized modify QP") Reviewed-by: Rukhsana Ansari Reviewed-by: Kalesh AP Signed-off-by: Damodharam Ammepalli Signed-off-by: Selvin Xavier --- drivers/infiniband/hw/bnxt_re/qplib_fp.c | 13 +++++++++++-- drivers/infiniband/hw/bnxt_re/qplib_res.h | 5 +++++ drivers/infiniband/hw/bnxt_re/roce_hsi.h | 1 + 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/bnxt_re/qplib_fp.c b/drivers/infiniband/hw/bnxt_re/qplib_fp.c index 093bfb748cdf..5169804e6f12 100644 --- a/drivers/infiniband/hw/bnxt_re/qplib_fp.c +++ b/drivers/infiniband/hw/bnxt_re/qplib_fp.c @@ -1285,7 +1285,8 @@ static void __filter_modify_flags(struct bnxt_qplib_qp *qp) } } -static void bnxt_set_mandatory_attributes(struct bnxt_qplib_qp *qp, +static void bnxt_set_mandatory_attributes(struct bnxt_qplib_res *res, + struct bnxt_qplib_qp *qp, struct cmdq_modify_qp *req) { u32 mandatory_flags = 0; @@ -1300,6 +1301,14 @@ static void bnxt_set_mandatory_attributes(struct bnxt_qplib_qp *qp, mandatory_flags |= CMDQ_MODIFY_QP_MODIFY_MASK_PKEY; } + if (_is_min_rnr_in_rtr_rts_mandatory(res->dattr->dev_cap_flags2) && + (qp->cur_qp_state == CMDQ_MODIFY_QP_NEW_STATE_RTR && + qp->state == CMDQ_MODIFY_QP_NEW_STATE_RTS)) { + if (qp->type == CMDQ_MODIFY_QP_QP_TYPE_RC) + mandatory_flags |= + CMDQ_MODIFY_QP_MODIFY_MASK_MIN_RNR_TIMER; + } + if (qp->type == CMDQ_MODIFY_QP_QP_TYPE_UD || qp->type == CMDQ_MODIFY_QP_QP_TYPE_GSI) mandatory_flags |= CMDQ_MODIFY_QP_MODIFY_MASK_QKEY; @@ -1340,7 +1349,7 @@ int bnxt_qplib_modify_qp(struct bnxt_qplib_res *res, struct bnxt_qplib_qp *qp) /* Set mandatory attributes for INIT -> RTR and RTR -> RTS transition */ if (_is_optimize_modify_qp_supported(res->dattr->dev_cap_flags2) && is_optimized_state_transition(qp)) - bnxt_set_mandatory_attributes(qp, &req); + bnxt_set_mandatory_attributes(res, qp, &req); } bmask = qp->modify_flags; req.modify_mask = cpu_to_le32(qp->modify_flags); diff --git a/drivers/infiniband/hw/bnxt_re/qplib_res.h b/drivers/infiniband/hw/bnxt_re/qplib_res.h index 21fb148713a6..cbfc49a1a56d 100644 --- a/drivers/infiniband/hw/bnxt_re/qplib_res.h +++ b/drivers/infiniband/hw/bnxt_re/qplib_res.h @@ -584,6 +584,11 @@ static inline bool _is_optimize_modify_qp_supported(u16 dev_cap_ext_flags2) return dev_cap_ext_flags2 & CREQ_QUERY_FUNC_RESP_SB_OPTIMIZE_MODIFY_QP_SUPPORTED; } +static inline bool _is_min_rnr_in_rtr_rts_mandatory(u16 dev_cap_ext_flags2) +{ + return !!(dev_cap_ext_flags2 & CREQ_QUERY_FUNC_RESP_SB_MIN_RNR_RTR_RTS_OPT_SUPPORTED); +} + static inline bool _is_cq_coalescing_supported(u16 dev_cap_ext_flags2) { return dev_cap_ext_flags2 & CREQ_QUERY_FUNC_RESP_SB_CQ_COALESCING_SUPPORTED; diff --git a/drivers/infiniband/hw/bnxt_re/roce_hsi.h b/drivers/infiniband/hw/bnxt_re/roce_hsi.h index a98fc9c2313e..0ee60fdc18b3 100644 --- a/drivers/infiniband/hw/bnxt_re/roce_hsi.h +++ b/drivers/infiniband/hw/bnxt_re/roce_hsi.h @@ -2215,6 +2215,7 @@ struct creq_query_func_resp_sb { #define CREQ_QUERY_FUNC_RESP_SB_REQ_RETRANSMISSION_SUPPORT_IQM_MSN_TABLE (0x2UL << 4) #define CREQ_QUERY_FUNC_RESP_SB_REQ_RETRANSMISSION_SUPPORT_LAST \ CREQ_QUERY_FUNC_RESP_SB_REQ_RETRANSMISSION_SUPPORT_IQM_MSN_TABLE + #define CREQ_QUERY_FUNC_RESP_SB_MIN_RNR_RTR_RTS_OPT_SUPPORTED 0x1000UL __le16 max_xp_qp_size; __le16 create_qp_batch_size; __le16 destroy_qp_batch_size; From patchwork Wed Dec 11 08:39:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kalesh AP X-Patchwork-Id: 13903136 Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B99E08489 for ; Wed, 11 Dec 2024 08:44:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733906655; cv=none; b=W30NnKjZkJocbJmPT7LbN6cHxcl2X5kByQFSH90PbYAuzUsBw0Eof2SPrFJob1fgimtIz739WCjjz8jZslE+eUnzMxnXJ5wvGiVubZVr5BBIc6FJelTkIZN5aJOu8IVnk+bULPt2BSfo+4RlOzh0QxY7CChkl3wss3lEAymZPGY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733906655; c=relaxed/simple; bh=JO+OpSU8MvmQ1UWMUbgmZAFK7dV9bjSJcvWIKMqTzTU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=l6RFQvq2r+4ftUEwF7ppjtufHxoEmNnRvocr2RjkW/u4Z8hRekQPzgc/I7VDAAo8Zao0kEK+gPw2Kgav0x+NKzleLjlNcUzS/wrxCrKtM5BHjGdi3DsyuUZsoZkcto6Fz/kf5yNK0s71q7Zp6YKsYOXe5YarGctJ8ky6wKtHO2o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b=iAkD5c6u; arc=none smtp.client-ip=209.85.210.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="iAkD5c6u" Received: by mail-pf1-f182.google.com with SMTP id d2e1a72fcca58-728eccf836bso528380b3a.1 for ; Wed, 11 Dec 2024 00:44:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1733906653; x=1734511453; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XJOo8gP747NtNeOZi4XrtYcBlguXNINF6EUthHmxZCU=; b=iAkD5c6uQDENnBuORCQ25gMUIr7R/zD6rNaTcpxPrYSMxlPldK818BJqsLvorb28d9 6G3isu0Kjd6hYJiWbLDcO/VXZGP0fXavg1OR5fVDw4Mix1fMJlnXetaf7yC6EphoB6es a7hqwuJOVmhz1B6qgm7hKCQugESrSx/begH2s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733906653; x=1734511453; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XJOo8gP747NtNeOZi4XrtYcBlguXNINF6EUthHmxZCU=; b=NQ/zjVe2i9K5TOAuK6/lC9XJedZl9F6mpks6kIQm7GKFwPC5Q/xwASRtpg2OG55oZp 82UgMNqRJAko5cYIcWT59d8MmgkZaUMiuJaF8aTgIKPaaBc3iqPRoHZVgjZFUpsiZitT 4Vinf5vs27HFIP6XvMSvwJPM2GE3J7lh2Fse+SK3xb3Qp3faA1nl/fEyg68x6Yw3j67j YkTRkQTHH9RSDL7aLIRM58vmV5rLw5XRv24rYliuLVfjp1ndQL3XUlamI5VoN7sTZ1Jp miMEIzf6BBaLQYaBTeScc82z5be0V/2oCuCJzMbTp349Dm3lOze7+aZlUfjpDOFCcRqO 7svA== X-Gm-Message-State: AOJu0Yy/GWmOJPBtl8ASBFsPnnGn4yB09uHlhlntEaVOZYldv1XaoYLi mN/05gRGgKyOwRywerV1wUO8seFmhhh4l1hp/04ZTki+YqqK0Xkw8fCAq+4P4g== X-Gm-Gg: ASbGncsBaIIdhVxQk2g9rH9AV16MQ1NX4E/kXE/8flSpPNDKsTQCrQabCHHN5CZkxpc 8JjkXE3I/93Gk0AaxxTsumbLeEi7YOhYtEB2nhRtLadqt9v2nCHSRVKiDL8ME4MalDJgq5WfbnL QRRvDcIUj6h2ThQj1fUefHnzDzbB8DIzD1Khui3DlcAgb+tLEAK59dSn9hfYGE3Tb8tcpuh2HF3 l7s6kn1VQsvKU0nItKK7fArefqaeOmPV3T0weU6JwO/f10teQZt3lwalvnmsYC3LNFFE4b+azjt vWSnVeKD6cLTOJNxYawPhUt9Hk/uBKnI2JwonTKaY8LlcGB8d7jhdQOw X-Google-Smtp-Source: AGHT+IEGHLsmQaABjBHlBTn/uv1egtnkZ07GrjK/iTmXONmDhzZZ5VUlyD078C33lvy5LG1A4AatJA== X-Received: by 2002:a05:6a00:855:b0:725:96b1:d217 with SMTP id d2e1a72fcca58-728ed3c74a8mr3072114b3a.9.1733906652736; Wed, 11 Dec 2024 00:44:12 -0800 (PST) Received: from dhcp-10-123-157-228.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7273b69ce95sm3653678b3a.66.2024.12.11.00.44.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2024 00:44:12 -0800 (PST) From: Kalesh AP To: leon@kernel.org, jgg@ziepe.ca Cc: linux-rdma@vger.kernel.org, andrew.gospodarek@broadcom.com, selvin.xavier@broadcom.com, Hongguang Gao , Saravanan Vajravel , Kalesh AP Subject: [PATCH for-rc 4/5] RDMA/bnxt_re: Fix to export port num to ib_query_qp Date: Wed, 11 Dec 2024 14:09:30 +0530 Message-ID: <20241211083931.968831-5-kalesh-anakkur.purayil@broadcom.com> X-Mailer: git-send-email 2.43.5 In-Reply-To: <20241211083931.968831-1-kalesh-anakkur.purayil@broadcom.com> References: <20241211083931.968831-1-kalesh-anakkur.purayil@broadcom.com> Precedence: bulk X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Hongguang Gao Current driver implementation doesn't populate the port_num field in query_qp. Adding the code to convert internal firmware port id to ibv defined port number and export it. Reviewed-by: Saravanan Vajravel Reviewed-by: Kalesh AP Signed-off-by: Hongguang Gao Signed-off-by: Selvin Xavier --- drivers/infiniband/hw/bnxt_re/ib_verbs.c | 1 + drivers/infiniband/hw/bnxt_re/ib_verbs.h | 4 ++++ drivers/infiniband/hw/bnxt_re/qplib_fp.c | 1 + drivers/infiniband/hw/bnxt_re/qplib_fp.h | 1 + 4 files changed, 7 insertions(+) diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c index a609e1635a3d..bcb7cfc63d09 100644 --- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c +++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c @@ -2325,6 +2325,7 @@ int bnxt_re_query_qp(struct ib_qp *ib_qp, struct ib_qp_attr *qp_attr, qp_attr->retry_cnt = qplib_qp->retry_cnt; qp_attr->rnr_retry = qplib_qp->rnr_retry; qp_attr->min_rnr_timer = qplib_qp->min_rnr_timer; + qp_attr->port_num = __to_ib_port_num(qplib_qp->port_id); qp_attr->rq_psn = qplib_qp->rq.psn; qp_attr->max_rd_atomic = qplib_qp->max_rd_atomic; qp_attr->sq_psn = qplib_qp->sq.psn; diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.h b/drivers/infiniband/hw/bnxt_re/ib_verbs.h index ac59f1d73b15..fbb16a411d6a 100644 --- a/drivers/infiniband/hw/bnxt_re/ib_verbs.h +++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.h @@ -268,6 +268,10 @@ void bnxt_re_dealloc_ucontext(struct ib_ucontext *context); int bnxt_re_mmap(struct ib_ucontext *context, struct vm_area_struct *vma); void bnxt_re_mmap_free(struct rdma_user_mmap_entry *rdma_entry); +static inline u32 __to_ib_port_num(u16 port_id) +{ + return (u32)port_id + 1; +} unsigned long bnxt_re_lock_cqs(struct bnxt_re_qp *qp); void bnxt_re_unlock_cqs(struct bnxt_re_qp *qp, unsigned long flags); diff --git a/drivers/infiniband/hw/bnxt_re/qplib_fp.c b/drivers/infiniband/hw/bnxt_re/qplib_fp.c index 5169804e6f12..d8a2a929bbe3 100644 --- a/drivers/infiniband/hw/bnxt_re/qplib_fp.c +++ b/drivers/infiniband/hw/bnxt_re/qplib_fp.c @@ -1532,6 +1532,7 @@ int bnxt_qplib_query_qp(struct bnxt_qplib_res *res, struct bnxt_qplib_qp *qp) qp->dest_qpn = le32_to_cpu(sb->dest_qp_id); memcpy(qp->smac, sb->src_mac, 6); qp->vlan_id = le16_to_cpu(sb->vlan_pcp_vlan_dei_vlan_id); + qp->port_id = le16_to_cpu(sb->port_id); bail: dma_free_coherent(&rcfw->pdev->dev, sbuf.size, sbuf.sb, sbuf.dma_addr); diff --git a/drivers/infiniband/hw/bnxt_re/qplib_fp.h b/drivers/infiniband/hw/bnxt_re/qplib_fp.h index 19e279871f10..0660101b5310 100644 --- a/drivers/infiniband/hw/bnxt_re/qplib_fp.h +++ b/drivers/infiniband/hw/bnxt_re/qplib_fp.h @@ -298,6 +298,7 @@ struct bnxt_qplib_qp { u32 dest_qpn; u8 smac[6]; u16 vlan_id; + u16 port_id; u8 nw_type; struct bnxt_qplib_ah ah; From patchwork Wed Dec 11 08:39:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kalesh AP X-Patchwork-Id: 13903137 Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AA9C01DE4DD for ; Wed, 11 Dec 2024 08:44:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.177 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733906658; cv=none; b=AOIrhfAmyYMKDOnI2PrLyJcfVNKtJGi7vQLBgcdOS7c/2PnFUGouNAcGYm7EWh9mH3MCXCZirrjSxhMbMQHgRCC3khRhbWc6glMIXfbLh9t505itLQAxO3+Gtg4j2jdUW2ad5dJBtLsEy+Vhg4d1gNW+065war/tfDlVZi5bxWQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733906658; c=relaxed/simple; bh=Ryy+XDb4+QBAxdNg+YTrQaIrLJTqHYQ+ec6iOPWqOoA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FCL3HNnBZmbU9PShN/R5FAEKdBF3L7saWhJ5oWBrzMQKObQiuCOSvUrtBKi71P3XyYt3bvaU6HKAhzBDX0dXAeUNPga+3+CpJkg4P986FE8igAu72SlD+ioGzPMwD/iolY3rPBgRZ+XY+ilJgeiQraDt9IRoPiYxrf4N7LE1T+M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b=ZYuC8lYb; arc=none smtp.client-ip=209.85.210.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="ZYuC8lYb" Received: by mail-pf1-f177.google.com with SMTP id d2e1a72fcca58-725abf74334so5341768b3a.3 for ; Wed, 11 Dec 2024 00:44:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1733906656; x=1734511456; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=oOYZYdU3JWuoiavyQRrUsypvOvLtXEF8XXAnKXeMFSk=; b=ZYuC8lYbJ8nOM9SEN8zIb/2brp3ZBGh7r6GYtu9V3bIBAyd9/93ig6xbrzUUApBNir 97fm7EEta8TMFpumDlMz+7ROdxTyHVct4B/rac9ceUrIptbsGoSBAIjzGJLJS19fm9Q/ D8obAvQNc8WeQO5WC1i7E23tOaPpDcLYfRq38= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733906656; x=1734511456; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oOYZYdU3JWuoiavyQRrUsypvOvLtXEF8XXAnKXeMFSk=; b=bzfyz0BqZGVywontl5QKzq9F0iNdz9uODhSB/1PEyyzKuI2ttSzooQWnbLBKibAKB+ 5wf+LU8VfzFhwGLTGqQcw+3o+KTm/E0R4VU7YhBTnty7qwNBPuGkfnPMIztCgfkrPBgD xqZzOn43mCXdiBkkYAvREZ4+cMKT5ruSyAPh5YONPUrCiWes6whCo3nhb96P54ALz3CG a+GzjJY0xUjw1GN8jGqnwPZgUv4F1ogTf6dYNR+IixkTwxl0DE3rEahIK8r7FuewPVNX LMb6BLs897+ZL4VysuC9+j0/lHH620DpaVKwydHM/JiHkbKAjRJZmFMsxlnFVAr9MZZc f5UQ== X-Gm-Message-State: AOJu0YzzcKA7JM4KwqRqP+AV0epEVGTpj161Q4cUWC2fSKElrAnMTjEy JkXvaiVB2vOcThNio0IaXID5zHb/qM/eDTDUoBo4/AyZtgYEpJL8bextUdGVtw== X-Gm-Gg: ASbGnctdylI/6n2QKCZFo6pADHhgYoB6EEhZTdG04zN+hoCkAgsnMfKC72Vpo53pyks 5eSn5eGlIckqGtXrQcVSBP6LT7wiKqZfBfT+gdWyFIBDFIAs63iHzj/87W7Cm07PjICOLxhQVZd Ak+aGIxBNtfUJYrYQ+XIkFMWgOIRuIjtYkREzgiL8b6N+1XZ2CdBkTfPiE+ddZjRhD12zmzYhmT AjIkmh461I4WS6Y5oR41CTGgITP/Kq2Vu9/yOKhLKFUe958Ebqh//ukMsOz0eGSMIcuHw6gTMMq Iu276/nuygwOSdusz51/plmLHbIAG98qEV0LRd36+88KX1nOSZ4gh9Vt X-Google-Smtp-Source: AGHT+IGRUbfLlDOnYmlfofgJGtYyR27Yk6k4nkntVf3cWG0h3zyIA4Mtq6Y/DnN5k3NFqYSK+WbUrA== X-Received: by 2002:a05:6a00:4645:b0:71d:eb7d:20d5 with SMTP id d2e1a72fcca58-728ed3cbe04mr4043354b3a.8.1733906655896; Wed, 11 Dec 2024 00:44:15 -0800 (PST) Received: from dhcp-10-123-157-228.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7273b69ce95sm3653678b3a.66.2024.12.11.00.44.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2024 00:44:15 -0800 (PST) From: Kalesh AP To: leon@kernel.org, jgg@ziepe.ca Cc: linux-rdma@vger.kernel.org, andrew.gospodarek@broadcom.com, selvin.xavier@broadcom.com, Kalesh AP , Preethi G Subject: [PATCH for-rc 5/5] RDMA/bnxt_re: Fix reporting hw_ver in query_device Date: Wed, 11 Dec 2024 14:09:31 +0530 Message-ID: <20241211083931.968831-6-kalesh-anakkur.purayil@broadcom.com> X-Mailer: git-send-email 2.43.5 In-Reply-To: <20241211083931.968831-1-kalesh-anakkur.purayil@broadcom.com> References: <20241211083931.968831-1-kalesh-anakkur.purayil@broadcom.com> Precedence: bulk X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Driver currently populates subsystem_device id in the "hw_ver" field of ib_attr structure in query_device. Updated to populate PCI revision ID. Fixes: 1ac5a4047975 ("RDMA/bnxt_re: Add bnxt_re RoCE driver") Reviewed-by: Preethi G Signed-off-by: Kalesh AP Signed-off-by: Selvin Xavier --- drivers/infiniband/hw/bnxt_re/ib_verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c index bcb7cfc63d09..e3d26bd6de05 100644 --- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c +++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c @@ -199,7 +199,7 @@ int bnxt_re_query_device(struct ib_device *ibdev, ib_attr->vendor_id = rdev->en_dev->pdev->vendor; ib_attr->vendor_part_id = rdev->en_dev->pdev->device; - ib_attr->hw_ver = rdev->en_dev->pdev->subsystem_device; + ib_attr->hw_ver = rdev->en_dev->pdev->revision; ib_attr->max_qp = dev_attr->max_qp; ib_attr->max_qp_wr = dev_attr->max_qp_wqes; ib_attr->device_cap_flags =