From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5FC96A0562; Fri, 3 Apr 2020 10:52:42 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 781701C11B; Fri, 3 Apr 2020 10:52:35 +0200 (CEST) Received: from mail-pj1-f66.google.com (mail-pj1-f66.google.com [209.85.216.66]) by dpdk.org (Postfix) with ESMTP id 045031C115 for ; Fri, 3 Apr 2020 10:52:33 +0200 (CEST) Received: by mail-pj1-f66.google.com with SMTP id g9so2671362pjp.0 for ; Fri, 03 Apr 2020 01:52:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=5nRstwaFjnkQY2pl+emBQuTNkFKmEoNJr3ctn0F6rZU=; b=GSxpS03bu4ZFGoaetD4duEt2OoM9d8MeOEa1gUkMNfAxeHWoJ/+xSTi62tFlWk4s9i C2CezSd1nBq5EHYf3rGEy4SamdQjVAjJgIS1oAr2wjuo0U8sLMN31JnEhHASxDCK8ifq VzrUH6qULf3JCwfGdTTbTg2/8Pk03Itcsp2IExeDSagBGKBxT/xC3c44bBBr4ltjrQUg 9FRNEJDHA8Iyk0CpK4lsCph2rRtUJ+zWj5VxqM/H4F1AYM4H1lIYb31PLJIIgtJq+zcN JZiwnbidY90sl1tskNP830YVxVcZARLPJkSMOURiTo78iCw5IiJO1ALQq7nhKoFSCwG2 AclA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=5nRstwaFjnkQY2pl+emBQuTNkFKmEoNJr3ctn0F6rZU=; b=DzPped2eommrU4di2sh1bUHJ+ESR5TUyZ3Uw8/hHfSTCnyZyAG2bYVXWsfCof0m08r D/VJyDtAwmpwhK2zClw4a+h1yIM7ekeOfcC0hFMYoRxxaQUVqLXZjvATfTpXocfgZIlv QGJqYa7QhQ6JP2N0nwm+jxpMZFvNedBDbU2sj8bcMFtW76lXZFDXYv5fFA1MHrDmFS/g 2oE65Z83eJgoIrM491ehCTqLjJ8IE6wNrLVYfblnC30iXJsvrZfgznRPk55N5c8l70YH k8N09SJz+2KsfU1mfwIHfMH8f/RqV1Dr1SgRcvrwUTTpJNS1UcTzFe3CrkGUlMq43z8L Mlfw== X-Gm-Message-State: AGi0PuaXTqyX5kRaV/xQkOG18z+DqMD3EbqGp42a62nu7VyROV0scZ8k BryDKZYFxwaGZ/80QU3xSYw= X-Google-Smtp-Source: APiQypI2qKRUumSqapU2yfT2jHPG2BytV22ux32u+XMsO88xXqM5ZvzSQFcns/J3Hdu5BLxBL4ulbA== X-Received: by 2002:a17:902:7046:: with SMTP id h6mr6529024plt.250.1585903953108; Fri, 03 Apr 2020 01:52:33 -0700 (PDT) Received: from hyd1588t430.marvell.com ([115.113.156.2]) by smtp.gmail.com with ESMTPSA id s9sm5267899pjr.5.2020.04.03.01.52.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Apr 2020 01:52:32 -0700 (PDT) From: Nithin Dabilpuram To: Jerin Jacob , Nithin Dabilpuram , Kiran Kumar K Cc: dev@dpdk.org, kkanas@marvell.com Date: Fri, 3 Apr 2020 14:22:06 +0530 Message-Id: <20200403085216.32684-2-nithind1988@gmail.com> X-Mailer: git-send-email 2.8.4 In-Reply-To: <20200403085216.32684-1-nithind1988@gmail.com> References: <20200312111907.31555-1-ndabilpuram@marvell.com> <20200403085216.32684-1-nithind1988@gmail.com> Subject: [dpdk-dev] [PATCH v3 01/11] net/octeontx2: setup link config based on BP level X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" From: Nithin Dabilpuram Configure NIX_AF_TL3_TL2X_LINKX_CFG using schq at level based on NIX_AF_PSE_CHANNEL_LEVEL[BP_LEVEL]. Signed-off-by: Nithin Dabilpuram --- drivers/net/octeontx2/otx2_ethdev.h | 1 + drivers/net/octeontx2/otx2_tm.c | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/drivers/net/octeontx2/otx2_ethdev.h b/drivers/net/octeontx2/otx2_ethdev.h index e5684f9..b7d5386 100644 --- a/drivers/net/octeontx2/otx2_ethdev.h +++ b/drivers/net/octeontx2/otx2_ethdev.h @@ -304,6 +304,7 @@ struct otx2_eth_dev { /* Contiguous queues */ uint16_t txschq_contig_list[NIX_TXSCH_LVL_CNT][MAX_TXSCHQ_PER_FUNC]; uint16_t otx2_tm_root_lvl; + uint16_t link_cfg_lvl; uint16_t tm_flags; uint16_t tm_leaf_cnt; struct otx2_nix_tm_node_list node_list; diff --git a/drivers/net/octeontx2/otx2_tm.c b/drivers/net/octeontx2/otx2_tm.c index ba615ce..2364e03 100644 --- a/drivers/net/octeontx2/otx2_tm.c +++ b/drivers/net/octeontx2/otx2_tm.c @@ -437,6 +437,16 @@ populate_tm_registers(struct otx2_eth_dev *dev, *reg++ = NIX_AF_TL3X_SCHEDULE(schq); *regval++ = (strict_schedul_prio << 24) | rr_quantum; req->num_regs++; + + /* Link configuration */ + if (!otx2_dev_is_sdp(dev) && + dev->link_cfg_lvl == NIX_TXSCH_LVL_TL3) { + *reg++ = NIX_AF_TL3_TL2X_LINKX_CFG(schq, + nix_get_link(dev)); + *regval++ = BIT_ULL(12) | nix_get_relchan(dev); + req->num_regs++; + } + if (pir.rate && pir.burst) { *reg++ = NIX_AF_TL3X_PIR(schq); *regval++ = shaper2regval(&pir) | 1; @@ -471,7 +481,10 @@ populate_tm_registers(struct otx2_eth_dev *dev, else *regval++ = (strict_schedul_prio << 24) | rr_quantum; req->num_regs++; - if (!otx2_dev_is_sdp(dev)) { + + /* Link configuration */ + if (!otx2_dev_is_sdp(dev) && + dev->link_cfg_lvl == NIX_TXSCH_LVL_TL2) { *reg++ = NIX_AF_TL3_TL2X_LINKX_CFG(schq, nix_get_link(dev)); *regval++ = BIT_ULL(12) | nix_get_relchan(dev); @@ -1144,6 +1157,7 @@ nix_tm_send_txsch_alloc_msg(struct otx2_eth_dev *dev) return rc; nix_tm_copy_rsp_to_dev(dev, rsp); + dev->link_cfg_lvl = rsp->link_cfg_lvl; nix_tm_assign_hw_id(dev); return 0; -- 2.8.4