From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3F49AA0C4E; Tue, 2 Nov 2021 16:55:04 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C402F41C3B; Tue, 2 Nov 2021 16:54:42 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id B41F741C3B for ; Tue, 2 Nov 2021 16:54:40 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 1A2Cjkq9030570 for ; Tue, 2 Nov 2021 08:54: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-type; s=pfpt0220; bh=Ob3UrOk2P1zaTq5T0/xJlECjdjrl5+iDWvxn/FUnSaY=; b=boayhNhoVCjx3M8ndTJTQQoA2gwxu/rmpxX9Af6M2eFCeG1QypPptM+MlGOJf5EATRK/ ia8FP3vJ/f+DnjwmH78TfZxRcvgfeF5NAON5nlr86wsWUMaU6EKFALghdtkGJLgrZXdf rPADQXNj7VZ7UQy4QF7kiLjKhM4K0u9S/0kMjwXNJyY9+LFfQXsG2XxS7R5bhb+PJ8T5 v+G4mC6Y8E62LS43njo4I6Pu1iDeTR584TRIvtd8g/yJeJll4w4k0HTWOinBqWq3gDc0 iQfFBZR2XQAFtZuzcTKCVMQGZcJ/ZMKGm8auR9I2YALujUYeqrR7ffP+mRmRufMd51Ps tg== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3c35mbh5ng-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Tue, 02 Nov 2021 08:54: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.18; Tue, 2 Nov 2021 08:54:38 -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.18 via Frontend Transport; Tue, 2 Nov 2021 08:54:38 -0700 Received: from hyd1588t430.marvell.com (unknown [10.29.52.204]) by maili.marvell.com (Postfix) with ESMTP id 68E5F5B6932; Tue, 2 Nov 2021 08:54:36 -0700 (PDT) From: Nithin Dabilpuram To: , Nithin Dabilpuram , "Kiran Kumar K" , Sunil Kumar Kori , Satha Rao CC: Date: Tue, 2 Nov 2021 21:24:16 +0530 Message-ID: <20211102155421.486-5-ndabilpuram@marvell.com> X-Mailer: git-send-email 2.8.4 In-Reply-To: <20211102155421.486-1-ndabilpuram@marvell.com> References: <20211102155421.486-1-ndabilpuram@marvell.com> MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-GUID: uTdxxGF46WBs38r9zQP8fQtYArru7zLc X-Proofpoint-ORIG-GUID: uTdxxGF46WBs38r9zQP8fQtYArru7zLc X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-11-02_08,2021-11-02_01,2020-04-07_01 Subject: [dpdk-dev] [PATCH 5/9] common/cnxk: enable bp on CPT with inline inbound X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Enable backpressure on CPT with inline inbound enabled. Signed-off-by: Nithin Dabilpuram --- drivers/common/cnxk/roc_mbox.h | 4 ++++ drivers/common/cnxk/roc_nix_fc.c | 28 ++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/drivers/common/cnxk/roc_mbox.h b/drivers/common/cnxk/roc_mbox.h index 5dcb445..bf5495d 100644 --- a/drivers/common/cnxk/roc_mbox.h +++ b/drivers/common/cnxk/roc_mbox.h @@ -239,6 +239,10 @@ struct mbox_msghdr { M(NIX_BANDPROF_ALLOC, 0x801d, nix_bandprof_alloc, \ nix_bandprof_alloc_req, nix_bandprof_alloc_rsp) \ M(NIX_BANDPROF_FREE, 0x801e, nix_bandprof_free, nix_bandprof_free_req, \ + msg_rsp) \ + M(NIX_CPT_BP_ENABLE, 0x8020, nix_cpt_bp_enable, nix_bp_cfg_req, \ + nix_bp_cfg_rsp) \ + M(NIX_CPT_BP_DISABLE, 0x8021, nix_cpt_bp_disable, nix_bp_cfg_req, \ msg_rsp) /* Messages initiated by AF (range 0xC00 - 0xDFF) */ diff --git a/drivers/common/cnxk/roc_nix_fc.c b/drivers/common/cnxk/roc_nix_fc.c index 6453258..ca29cd2 100644 --- a/drivers/common/cnxk/roc_nix_fc.c +++ b/drivers/common/cnxk/roc_nix_fc.c @@ -70,6 +70,34 @@ nix_fc_rxchan_bpid_set(struct roc_nix *roc_nix, bool enable) nix->chan_cnt = 0; } + if (roc_model_is_cn9k()) + goto exit; + + /* Enable backpressure on CPT if inline inb is enabled */ + if (enable && roc_nix_inl_inb_is_enabled(roc_nix)) { + req = mbox_alloc_msg_nix_cpt_bp_enable(mbox); + if (req == NULL) + return rc; + req->chan_base = 0; + req->chan_cnt = 1; + req->bpid_per_chan = 0; + + rc = mbox_process_msg(mbox, (void *)&rsp); + if (rc) + goto exit; + } else { + req = mbox_alloc_msg_nix_cpt_bp_disable(mbox); + if (req == NULL) + return rc; + req->chan_base = 0; + req->chan_cnt = 1; + req->bpid_per_chan = 0; + + rc = mbox_process_msg(mbox, (void *)&rsp); + if (rc) + goto exit; + } + exit: return rc; } -- 2.8.4