Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4428883rdb; Mon, 11 Dec 2023 21:19:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IH4kzevptkiIw3jaoj7gb+BNV/yGws6dZdhYWZkm2nobbPzc6DNejZB1JyVW/2LK9QJvBg/ X-Received: by 2002:a05:6a20:3ca7:b0:190:69aa:985a with SMTP id b39-20020a056a203ca700b0019069aa985amr2680453pzj.106.1702358341109; Mon, 11 Dec 2023 21:19:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702358341; cv=none; d=google.com; s=arc-20160816; b=uqHZyaxLnfW5ZHDlVcOsG9x+Ap6vEAEXmvKyaDnKC/TPMcRnlIyHmzIyRsRfVGr1k3 /CF5a7XUbCG92M9vOqW3cYPkUb3RfFO9W0ZpuJQo7ks1jvB3D3OiqXvdsOuszXqZK2jU QkY2qIrQuYMdeQnoaKkcCqwUC6rEYgjsKKCd0eCdn58liVEfhVjYQetqzA/7Y8Wa7h54 U6yPhRqjHCDQz7Te2fehYYQrW0dNDtzY/QhvvYNlXc+CIhUqb3gw4Q7v22FWiKo7d8Sv 8PpxnLulMtuSbyAKHPd1hwkontfpKKWvzm4MP2c08vkYeV8Rv730iaR42po8Di79evCg pBsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=ZRXVops4PVLheIc6w9Badu3GbHPkt5jUbi2SPXLBMJk=; fh=ifa0Xq68mD109Gz0khd8ZOjXcbb8KEEjKiA/wXcE9P8=; b=qtJ7XwY4jt///VcgS+u3Y4B4iOgNa7ZQq4HbWm2mo1FDfgNyM5i8WCKvg3tH5dYjJW RfA2EWbG6g6FDVchkFXv0hRuf3okHH5kMQ9vNbXcHK/5h0v1wYFRoR57bqqZkB5M5PsX OWUVbFmiHGc/XCeBOQrUpI4tKreuRJ78GjRt1+xx0aqW8lnULM1yIRq83lI46DHaCxdp tma4s+ysU2Lun83pxVm+KQdfXLNmQSPc1tKGnoUpJs4FdltK2LBzhoV8yloK3e52h4ZK HdY+ecyYYK2jbhavYXDlbokWH7PJYtxHPz/v7LNdp5oUO+OEzb9OC6E6ZptZUj09FnQc jRCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=ji6OG+3C; spf=pass (google.com: domain of linux-crypto+bounces-729-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-crypto+bounces-729-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id a22-20020a170902b59600b001d0b24ebfc2si7072564pls.586.2023.12.11.21.19.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 21:19:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto+bounces-729-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=@marvell.com header.s=pfpt0220 header.b=ji6OG+3C; spf=pass (google.com: domain of linux-crypto+bounces-729-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-crypto+bounces-729-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.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 BFF92282206 for ; Tue, 12 Dec 2023 05:19:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 31BCA156D4; Tue, 12 Dec 2023 05:18:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=marvell.com header.i=@marvell.com header.b="ji6OG+3C" X-Original-To: linux-crypto@vger.kernel.org Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5BB51CF; Mon, 11 Dec 2023 21:18:34 -0800 (PST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 3BBK7Q4k009898; Mon, 11 Dec 2023 21:18:21 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s= pfpt0220; bh=ZRXVops4PVLheIc6w9Badu3GbHPkt5jUbi2SPXLBMJk=; b=ji6 OG+3Cg4WROsrVfDEW5uitwdbiEBWliRaaJbqispqPaSjqq/0TqdH/4lzxa00UnuY I+9Q7YIIqf3ITuWBfuY0o2LSm90/K+KyGZ4tMjfSdZ3lx7dKgHtsBhdA+AlQ+ZVn 7uyjGlSx+5cHhmp5jRlI1cn4v27kM4lxgS/IX4pcP43XLX9GFtVGgbqV8VCxYhwc vAXDsKiUvHmXBIrxKb/DaDZtdW2Xb5fJWADW2IeTuGI+95DKSjBmqGJ+BV+AV6H2 7XgluDwMWo/4sHAPS+3wuJQKoakIUVf0zkVbJwaHRdO3GPpmZaG0L4iezWVT5C5d QFihrCvUdWpu44O424g== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3uwyp4kp7s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 11 Dec 2023 21:18:21 -0800 (PST) Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Mon, 11 Dec 2023 21:18:20 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Mon, 11 Dec 2023 21:18:20 -0800 Received: from localhost.localdomain (unknown [10.28.36.175]) by maili.marvell.com (Postfix) with ESMTP id A56343F70A0; Mon, 11 Dec 2023 21:18:14 -0800 (PST) From: Srujana Challa To: , , CC: , , , , , , , , , , , , , , , , Subject: [PATCH net-next v2 07/10] octeontx2-af: update CPT inbound inline IPsec mailbox Date: Tue, 12 Dec 2023 10:47:27 +0530 Message-ID: <20231212051730.386088-8-schalla@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231212051730.386088-1-schalla@marvell.com> References: <20231212051730.386088-1-schalla@marvell.com> Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: Tamg8MwQgMQqoJqAiISsOFCB7XRYqO4C X-Proofpoint-GUID: Tamg8MwQgMQqoJqAiISsOFCB7XRYqO4C X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-09_02,2023-12-07_01,2023-05-22_02 Updates CPT inbound inline IPsec configure mailbox to take CPT credit threshold and bpid, which are introduced in CN10KB. Signed-off-by: Srujana Challa --- drivers/crypto/marvell/octeontx2/otx2_cpt_common.h | 2 ++ drivers/crypto/marvell/octeontx2/otx2_cptpf_mbox.c | 2 ++ drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c | 6 +++++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/marvell/octeontx2/otx2_cpt_common.h b/drivers/crypto/marvell/octeontx2/otx2_cpt_common.h index 772ee2a302cc..84ed8f35f11b 100644 --- a/drivers/crypto/marvell/octeontx2/otx2_cpt_common.h +++ b/drivers/crypto/marvell/octeontx2/otx2_cpt_common.h @@ -56,6 +56,8 @@ struct otx2_cpt_rx_inline_lf_cfg { u16 param2; u16 opcode; u32 credit; + u32 credit_th; + u16 bpid; u32 reserved; }; diff --git a/drivers/crypto/marvell/octeontx2/otx2_cptpf_mbox.c b/drivers/crypto/marvell/octeontx2/otx2_cptpf_mbox.c index a6f16438bd4a..bbabb57b4665 100644 --- a/drivers/crypto/marvell/octeontx2/otx2_cptpf_mbox.c +++ b/drivers/crypto/marvell/octeontx2/otx2_cptpf_mbox.c @@ -171,6 +171,8 @@ static int rx_inline_ipsec_lf_cfg(struct otx2_cptpf_dev *cptpf, u8 egrp, nix_req->hdr.id = MBOX_MSG_NIX_INLINE_IPSEC_CFG; nix_req->hdr.sig = OTX2_MBOX_REQ_SIG; nix_req->enable = 1; + nix_req->credit_th = req->credit_th; + nix_req->bpid = req->bpid; if (!req->credit || req->credit > OTX2_CPT_INST_QLEN_MSGS) nix_req->cpt_credit = OTX2_CPT_INST_QLEN_MSGS - 1; else diff --git a/drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c b/drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c index e319aa1ff119..5c9484646172 100644 --- a/drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c +++ b/drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c @@ -16,7 +16,11 @@ #define LOADFVC_MAJOR_OP 0x01 #define LOADFVC_MINOR_OP 0x08 -#define CTX_FLUSH_TIMER_CNT 0xFFFFFF +/* + * Interval to flush dirty data for next CTX entry. The interval is measured + * in increments of 10ns(interval time = CTX_FLUSH_TIMER_COUNT * 10ns). + */ +#define CTX_FLUSH_TIMER_CNT 0x2FAF0 struct fw_info_t { struct list_head ucodes; -- 2.25.1