Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp258734rdf; Thu, 2 Nov 2023 22:34:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHq5DvY8ENs5s+mQoev/PtPDb2VngIghbT2arSuBP+iiFRXedS8a2vTJEOsCoprfHr2OSnY X-Received: by 2002:a05:6a00:1702:b0:693:3d55:2bb3 with SMTP id h2-20020a056a00170200b006933d552bb3mr19213348pfc.26.1698989649168; Thu, 02 Nov 2023 22:34:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698989649; cv=none; d=google.com; s=arc-20160816; b=tv40FnNyDh2lMkpAIwZfl78cPe2y/ZV/hLhsiOvo/RIFlAzoDhG/iEf8QQapgWFwc3 Z+D4utgkSm93y8Yk/zwwEvuJDW2/2Un8xsd8cTTx3WLzBxVNQKaylPFNolTOyeov13KK O7pK69RDn7ZVKkIrt+3k83lhE5xzjT9TlWcEMp++SxTYO41Ib0MIzb3lhUeZ6/uad7Ln CUA1+ObkIQNjLgrzJfl2gwPPsld9psHyEhE7BLhjDmCFHMI4XU7RBMvl4y3NXZpjy7SK DW9W8xn/17ArpZh1r1xKay2zpjQYYi1FQMkfKxqseTa3rEm6axyJNPoTA6aiBsUnAsAN LsYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=43CBmmmd3XYLFFV5yxD/fnJwLJxBv4USfvbOfdDqyL8=; fh=SuRqZAnjbtSU8TpUTRvHG2OWeUeVGcL9zy4cGyCdhfo=; b=IvEtfKlQmFQ6B9WYvuL6WeNkLdKLMmI5gk3jAliBaaolQirjIBenbw/o69Vkz+oq3d bWdCZEMueds+shtN+HUgWdzDc+oluv+Ojk+J2s5jbyAeLhUr8Gkn9Zb2QSTYsjJuiAlv Da2193U2iZfM+FzVUawGJtOJhOSFGkwduGnDWdLHIyTEBFXoJIn6kdYgLMYgTxZZqgL8 Efsh4iRieqcj1Qo5ORhIt1U3jnZAO2OO8EHALn/ysAfYFdEUCqSguFemE6IvhnEQ/wPw Zq9dzdyZ5fOsQibISxnJdrrUKtwZtnATtVmJwY3uFELD70sqjBkyabrazxxfq0Q7K31X eHFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=Dfo0T+Hm; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id a13-20020a65640d000000b005ae05010bc4si870919pgv.235.2023.11.02.22.34.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 22:34:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=Dfo0T+Hm; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 1C7FF8255481; Thu, 2 Nov 2023 22:34:04 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229576AbjKCFd6 (ORCPT + 99 others); Fri, 3 Nov 2023 01:33:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229817AbjKCFd5 (ORCPT ); Fri, 3 Nov 2023 01:33:57 -0400 Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D0E301B3; Thu, 2 Nov 2023 22:33:50 -0700 (PDT) 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 3A2LsB8q012913; Thu, 2 Nov 2023 22:33:39 -0700 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=Dfo0T+HmTw7FxSCEHJEw+2iiF4WM8cJ75mlisyS25IF6VYJTBls8AKu4LRN6DqLcq6a6 uKheLIaPqiagRbriZDIGVKD7yyzmcFyuRscDBfgUcO091D4CuQhQYvOG1/LwE+0SloIo 0BJ3NPEVvGiQ49tQQ0Hu2wbXJo1v1s/xJr0GU9tK+1i/0crcmLe2wf+x9O3QIfgI2Vkq cQuyrTMcAsZPhZ32bmcQiI+MDoVleZjgY6zjFdb0FpbhUJH/O1BktIA1d9SNqRQjIxQ1 +v32dA/1sP7jD/Xx53rgnGP3blv7IMl8UAOjZkoelCdD7bMEt64Etj9xbatFIDkCTPMk 9w== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3u4m34982w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 02 Nov 2023 22:33:39 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Thu, 2 Nov 2023 22:33:37 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Thu, 2 Nov 2023 22:33:37 -0700 Received: from localhost.localdomain (unknown [10.28.36.175]) by maili.marvell.com (Postfix) with ESMTP id 331323F7057; Thu, 2 Nov 2023 22:33:33 -0700 (PDT) From: Srujana Challa To: , CC: , , , , , , , , Subject: [PATCH v1 07/10] octeontx2-af: update CPT inbound inline IPsec mailbox Date: Fri, 3 Nov 2023 11:03:03 +0530 Message-ID: <20231103053306.2259753-8-schalla@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231103053306.2259753-1-schalla@marvell.com> References: <20231103053306.2259753-1-schalla@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: EOrTTfAcDCul9PHlE1_bTkXn8UOVgQdq X-Proofpoint-GUID: EOrTTfAcDCul9PHlE1_bTkXn8UOVgQdq 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-03_05,2023-11-02_03,2023-05-22_02 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 02 Nov 2023 22:34:04 -0700 (PDT) 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