Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp1167982rdh; Fri, 24 Nov 2023 06:39:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IH6/19dWy0D//KPHxexD7ioj32FUVi78D7BG8D8JvjCKdUmyOsMskZkWoumyGl1fsjczU5L X-Received: by 2002:a25:d14e:0:b0:da2:b1d8:ea80 with SMTP id i75-20020a25d14e000000b00da2b1d8ea80mr2809716ybg.27.1700836765316; Fri, 24 Nov 2023 06:39:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700836765; cv=none; d=google.com; s=arc-20160816; b=tEPtFkUMxjMKyCsz3Tf6a/Vvm+WTSk3ooTgCgn7msW4Wai3+gMBXWbS7WNsaJc15yR 48v2gw6yhg8BVH3KhJkCGTi5LR+1fI1QPQL2Ghm4A6P4OgQP5Il1cNeVDzhRXcAym7HM vSxfQGwQY+WS7mAmU4FRhy/pOyhk334qBnD+7mx1QIOFTV4gGPLXKnpiAeiFcuKdEbby 9Oukh0Ztu5cBqRQdHyO7GjaOYHPz6vbWdgoowe0AkBOy43c+7FfdRcMn4KTKapN9r6xo 1tYICCnvCicrcRLfX9PhZYT4ae9P3SaHjsZx/GRxLe68CFn7+K0N8eoifVQZa+9uwxhS 5WQQ== 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=43CBmmmd3XYLFFV5yxD/fnJwLJxBv4USfvbOfdDqyL8=; fh=L3ExVjLjkuIeV+5cgHIxxatCcy3G7VuNWaIBOLRwqV4=; b=fwm1sbb3Ytl+g8qXpnkMrsVCfVuMEDTxCJkiv56vgD6Qm/lr7GNLlVMz74RrScDg2w 4xk6EjWZksPrH4u1zx3MXjSjYngsynMfaITRf4vgvDQ+AzBvSSyqwyAX5weaNw4GDv+m U/w4CLWUg3MELRQv6gOk5k/R6dKH0ha1kfgkImCee/wQghrW9QZw1aR5bKIkFOIKyked WK7xCzU/6QT5HahpbX0vAVBx09LSvQpSdz59bHPiWn/D43lcVV4tBg7NOKKU6z3v3GqZ 8ChzwlauJj9saA4O60scrE4pKFJAVbQ/38QhI7pCnVVe2p9c5jSTYzHSt3G3/J7HUnz8 KXCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=bQKaLUfO; spf=pass (google.com: domain of linux-crypto+bounces-270-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-270-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id a21-20020a05610234d500b0046272828e64si889079vst.76.2023.11.24.06.39.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 06:39:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto+bounces-270-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=bQKaLUfO; spf=pass (google.com: domain of linux-crypto+bounces-270-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-270-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id ED1D31C21114 for ; Fri, 24 Nov 2023 14:39:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5A9AD22EF5 for ; Fri, 24 Nov 2023 14:39:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=marvell.com header.i=@marvell.com header.b="bQKaLUfO" X-Original-To: linux-crypto@vger.kernel.org Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E7A4D71; Fri, 24 Nov 2023 04:51:45 -0800 (PST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3AO7PpH5004885; Fri, 24 Nov 2023 04:51:34 -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=43CBmmmd3XYLFFV5yxD/fnJwLJxBv4USfvbOfdDqyL8=; b=bQKaLUfOiK9LKCeoDdHqHJPaQ65r4znRFwNSLSu8OpF0Mfg00YtkanVbkhyzHhinL+j9 yE/Ks1XIpHgNjmftb0Jbn7oImhjZ8Xr222utydJ9V40/f+8AWNfNqy1xF7zEjOhLIxxR Dcskwfbo0nIg/CRgc9qZ5ciAnrcxSL5LlQiSi31Ki7jVcWPjFCoLLHECoImKFmMjnoSk u4P/QZvH8U+0DNaEC8H4hL9yEF7pllqkb36FAY6LR6y+Mbja8PkY63vS8q9HtiadDaph r438ZKFHKuo1hrysnzuE84CroEvkJ6dvDnOcrGj6LcFYlB+zmtvIVyR/Q1ugfsujkpfB xw== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3uhpxn69c0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 24 Nov 2023 04:51:34 -0800 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; Fri, 24 Nov 2023 04:51:32 -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; Fri, 24 Nov 2023 04:51:32 -0800 Received: from localhost.localdomain (unknown [10.28.36.175]) by maili.marvell.com (Postfix) with ESMTP id 6F98E3F707B; Fri, 24 Nov 2023 04:51:27 -0800 (PST) From: Srujana Challa To: , , CC: , , , , , , , , , , , , , , Subject: [PATCH net-next 07/10] octeontx2-af: update CPT inbound inline IPsec mailbox Date: Fri, 24 Nov 2023 18:20:44 +0530 Message-ID: <20231124125047.2329693-8-schalla@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231124125047.2329693-1-schalla@marvell.com> References: <20231124125047.2329693-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: 1Zs3H4_NjwDvGSax5FIUqtqwUXyRXJyS X-Proofpoint-GUID: 1Zs3H4_NjwDvGSax5FIUqtqwUXyRXJyS X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-23_15,2023-11-22_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 79805e476853..3caa5245df1d 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 7178fa81f00f..9b66d220be43 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