From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.216.97 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795975258; b=iEnIm6SipfHGuW1bGUfKS/QeozndK2oLMSuSExswB7/3eHbEJG9DvEWlm+j0jNx32SwT OhKQ/FKUxCuAMZiByfX3gb2iHXj91Z1XW2Sxk5+/TNCfoEfm6kEIgKqWIVkt7Iy29qbXg lqZsFulwpYOHdHdY7OiRVYQfDHGFZVXsU9cWxy5TIROuz3uY1kNJ/1CKMaIfdZlhOfKI2 TYvPmOUUFmPIIUBUBCfGsas64pgzYiL94xYYtzga0NRab59tGnENhh1iaZMX9/L6y7b3M Gf1SgrplMb6hpkq9AXckGOG9MZUfAIMfzWw+csqOPPUgXXm3Sxnadw7nYrRmV8o1kLg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795975258; h=DMARC-Filter:Received:X-Google-DKIM-Signature:X-Gm-Message-State: X-Gm-Gg:X-Received:Received:X-Relaying-Domain:X-CFilter-Loop:Received: DKIM-Signature:X-Received:X-Received:Received:From:To:Cc:Subject:Date: Message-Id:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding:X-DetectorID-Processed; bh=8Hn6xBb1GjcqAyPqURC5hjSUGMFXEFSJd+laZcOYDoQ=; b=Aj2OWxMbQ3fOeJY6hrdFezcIhtOIg+i6i+7LwsqwAjur7GXzswK7dr4DoCjLjWI7c7K4 n6Ry//VXebzpJ6U5g5BD+pVEWh2GV7gvLyfFAp+LudkAmJtdQkpaWa8VOyDQrDQNY3aWx 5TZ29V/MbemVtRH+KN3+t7Cg3sIEMRHVzLf6NmHpm04dPPyfbTzI+aqu9ncZMLEB3ykXi sli6UYD7/WGWlqoT1wNh86wH8XRQfcBPql67STONCdsJaIs2kuO4IxtXUE3S248c1f4iZ L2Q3w+AanaqXe0/IOoQZfg8H72XCkwnBOg1dDOjD04tWqtdaOPB652jy3UfFZ/HXm5A== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass header.d=broadcom.com header.i=@broadcom.com header.a=rsa-sha256 header.s=google header.b=SUhSVVIM; arc=none smtp.remote-ip=209.85.216.97 Received: from mail-pj1-f97.google.com (mail-pj1-f97.google.com [209.85.216.97]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5B2DF606A68C for ; Sun, 29 Nov 2026 18:00:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 5B2DF606A68C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject 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.a=rsa-sha256 header.s=google header.b=SUhSVVIM Received: by mail-pj1-f97.google.com with SMTP id 98e67ed59e1d1-3b0e0e65adbso4305644a91.3 for ; Sun, 29 Nov 2026 10:00:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795975251; x=1796580051; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=8Hn6xBb1GjcqAyPqURC5hjSUGMFXEFSJd+laZcOYDoQ=; b=xErczIaYd6qwvAdXC10lIHF/uPB8uzcNczh/Wj+zTeHVLdeDxIr3Jun9wkYve8JyzZ mPmHqMvVgT9y1VAhqbt/bsyGr3uVAvHDbD1mAyiNNcUy1ye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59e1d1-3b41c97acb5mr30097377a91.64.1795975250472; Sun, 29 Nov 2026 10:00:50 -0800 (PST) Received: from smtp-us-east1-p01-i01-si01.dlp.protect.broadcom.com (address-144-49-247-100.dlp.protect.broadcom.com. [144.49.247.100]) by smtp-relay.gmail.com with ESMTPS id 98e67ed59e1d1-3b41ffad038sm9174187a91.3.2026.11.29.10.00.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 29 Nov 2026 10:00:50 -0800 (PST) X-Relaying-Domain: broadcom.com X-CFilter-Loop: Reflected Received: by mail-dy1-f200.google.com with SMTP id 5a478bee46e88-386a65fca25so9089723eec.0 for ; Sun, 29 Nov 2026 10:00:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1795975248; x=1796580048; 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:content-type; bh=8Hn6xBb1GjcqAyPqURC5hjSUGMFXEFSJd+laZcOYDoQ=; b=SUhSVVIMcllVp0cJEJENmaH7HaEJZI7EtgYYzdOqzGj+L+0orSKHXSkUcQNl0hEggK 1TANkcMlNgs8a3Wo5KVLbTX4k9KD8Q9VDUzKUgivXMyhJbGNTj3t/jntrriHebinqdBM Zgv09Bu2hC0Jvp+nSncO7dP67deJxyujNMfn4= X-Received: by 2002:a05:7301:7107:b0:386:b494:8642 with SMTP id 5a478bee46e88-386b494879amr20629995eec.13.1795975248430; Sun, 29 Nov 2026 10:00:48 -0800 (PST) X-Received: by 2002:a05:7301:7107:b0:386:b494:8642 with SMTP id 5a478bee46e88-386b494879amr20629942eec.13.1795975247496; Sun, 29 Nov 2026 10:00:47 -0800 (PST) Received: from dhcp-10-123-156-114.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-3866f299d0bsm80559650eec.19.2026.11.29.10.00.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Nov 2026 10:00:47 -0800 (PST) From: Selvin Xavier To: leon@kernel.org, jgg@ziepe.ca Cc: linux-rdma@vger.kernel.org, andrew.gospodarek@broadcom.com, kalesh-anakkur.purayil@broadcom.com, Abhishek Mohapatra , Selvin Xavier Subject: [PATCH for-next 2/4] RDMA/bnxt_re: Set CQ coalescing max buffers to 1 for CQs with depth 1 Date: Sun, 29 Nov 2026 15:21:03 -0800 Message-Id: <20261129232105.358484-3-selvin.xavier@broadcom.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20261129232105.358484-1-selvin.xavier@broadcom.com> References: <20261129232105.358484-1-selvin.xavier@broadcom.com> X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-DetectorID-Processed: b00c1d49-9d2e-4205-b15f-d015386d3d5e From: Abhishek Mohapatra When the CQ depth is 1, program NORMAL_MAXBUF and DURING_MAXBUF to 1 in bnxt_qplib_create_cq(). A single-entry CQ has at most one outstanding completion, so firmware flushes it as soon as it is buffered instead of waiting for more. Signed-off-by: Abhishek Mohapatra Signed-off-by: Selvin Xavier --- drivers/infiniband/hw/bnxt_re/qplib_fp.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/bnxt_re/qplib_fp.c b/drivers/infiniband/hw/bnxt_re/qplib_fp.c index 57c773521feb..c03624b02570 100644 --- a/drivers/infiniband/hw/bnxt_re/qplib_fp.c +++ b/drivers/infiniband/hw/bnxt_re/qplib_fp.c @@ -2088,6 +2088,8 @@ int bnxt_qplib_post_recv(struct bnxt_qplib_qp *qp, /* CQ */ int bnxt_qplib_create_cq(struct bnxt_qplib_res *res, struct bnxt_qplib_cq *cq) { + u8 normal_maxbuf = cq->coalescing->normal_maxbuf; + u8 during_maxbuf = cq->coalescing->during_maxbuf; struct bnxt_qplib_rcfw *rcfw = res->rcfw; struct bnxt_qplib_hwq_attr hwq_attr = {}; struct creq_create_cq_resp resp = {}; @@ -2129,13 +2131,17 @@ int bnxt_qplib_create_cq(struct bnxt_qplib_res *res, struct bnxt_qplib_cq *cq) if (_is_cq_coalescing_supported(res->dattr->dev_cap_flags2) && cq->coalescing->enable) { req.flags |= cpu_to_le16(CMDQ_CREATE_CQ_FLAGS_COALESCING_VALID); + if (cq->max_wqe == 1) { + normal_maxbuf = 0x1; + during_maxbuf = 0x1; + } coalescing |= ((cq->coalescing->buf_maxtime << CMDQ_CREATE_CQ_BUF_MAXTIME_SFT) & CMDQ_CREATE_CQ_BUF_MAXTIME_MASK); - coalescing |= ((cq->coalescing->normal_maxbuf << + coalescing |= ((normal_maxbuf << CMDQ_CREATE_CQ_NORMAL_MAXBUF_SFT) & CMDQ_CREATE_CQ_NORMAL_MAXBUF_MASK); - coalescing |= ((cq->coalescing->during_maxbuf << + coalescing |= ((during_maxbuf << CMDQ_CREATE_CQ_DURING_MAXBUF_SFT) & CMDQ_CREATE_CQ_DURING_MAXBUF_MASK); if (cq->coalescing->en_ring_idle_mode) -- 2.39.3