From patchwork Fri Jul 10 16:21:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 235253 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp602911ilg; Fri, 10 Jul 2020 09:26:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwTs/g0Wn5Xyp9i40tHWxv2owv+T5J+eXN2fO3dRc6nWwUJGKZNRTorUoKumTxnUG7i2y95 X-Received: by 2002:a17:906:7e04:: with SMTP id e4mr54696167ejr.83.1594398410689; Fri, 10 Jul 2020 09:26:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594398410; cv=none; d=google.com; s=arc-20160816; b=q9t33DOvvhdvmuZ7jHPRWaH+Z84TWJGf3tEsRxsVg+O8gPHekwDTyVOhhC2P+6YTgt OwKTwELqqi4Epmmyeqs9TEoGJ2/JPDvdHi2gtISV3IkZSJOuUu4A/dH/JiQqjBgmKj0B 6bDJKpL3HPBAulHPa5tHoukvj0G9uip0XXDMNITPHKSnKhA2cQRGjwLDm14U44XrjNKN qVB2KjOP5wyvccYBTXKE41EAuOuyNxaOHn89ZdWnYa9Sswp6CCtVxICDQyaItL5rTcE+ wqv+tSAYpnYcgxzF3eqHjD04LjPFcGVdKdzRyHEKJPhQ268L/U2mhvuY7NuWi4t078+D uDSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:cc:to:from; bh=YqvsbnNsm+d+HeWh0YfHQFksXg9iRhrt4f52V41n094=; b=beIzxY3Iu9wIB0ykU5vo4a9vxtqekbCkmN+kH6Wz2T3fQ1s4yjeNtTOIBZuGBcaAxG UEBj4js2svSDZ21B70dUqwkSTXrDR9rz7IfBR+Y6Y0eSRrlXRO/09VUYuU7sWHiWX45f vDAqil71dAk8/R34X0UdM8JZdcH6KBbeVfNOsE03Rns345VJ19hj+NWB1M0alBblgw6p wpYIw2yOYuiF80YTtQCQ+eTz7MBq8NiGtDFgM0jU05vksHg5zGVgv2IvoMkgOpQbzz4f MBrIpnftjw2rBwfSkt83Q4jXIbJaTAH5chFGdcw62nuLL3PJnSJA8rUxO3RK3kKmN+D4 ytJw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id v12si5001593eje.201.2020.07.10.09.26.50; Fri, 10 Jul 2020 09:26:50 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 011701DC71; Fri, 10 Jul 2020 18:26:07 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id 581D81D9F0 for ; Fri, 10 Jul 2020 18:26:00 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 401421A1481; Fri, 10 Jul 2020 18:26:00 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 92A921A04B2; Fri, 10 Jul 2020 18:25:58 +0200 (CEST) Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.133.63]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 090A4402F7; Sat, 11 Jul 2020 00:25:55 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Hemant Agrawal Date: Fri, 10 Jul 2020 21:51:35 +0530 Message-Id: <20200710162137.22973-7-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200710162137.22973-1-hemant.agrawal@nxp.com> References: <20200710162137.22973-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH 7/9] net/dpaa2: add support to use Tx Queue desc size 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" Add support to use Tx queue desc size to configure congestion notification on TX queue Signed-off-by: Hemant Agrawal --- drivers/net/dpaa2/dpaa2_ethdev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.17.1 diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c index 701a6ca68..33d52efd7 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -799,7 +799,7 @@ dpaa2_dev_rx_queue_setup(struct rte_eth_dev *dev, static int dpaa2_dev_tx_queue_setup(struct rte_eth_dev *dev, uint16_t tx_queue_id, - uint16_t nb_tx_desc __rte_unused, + uint16_t nb_tx_desc, unsigned int socket_id __rte_unused, const struct rte_eth_txconf *tx_conf) { @@ -879,11 +879,11 @@ dpaa2_dev_tx_queue_setup(struct rte_eth_dev *dev, struct dpni_congestion_notification_cfg cong_notif_cfg = {0}; cong_notif_cfg.units = DPNI_CONGESTION_UNIT_FRAMES; - cong_notif_cfg.threshold_entry = CONG_ENTER_TX_THRESHOLD; + cong_notif_cfg.threshold_entry = nb_tx_desc; /* Notify that the queue is not congested when the data in * the queue is below this thershold. */ - cong_notif_cfg.threshold_exit = CONG_EXIT_TX_THRESHOLD; + cong_notif_cfg.threshold_exit = nb_tx_desc - 24; cong_notif_cfg.message_ctx = 0; cong_notif_cfg.message_iova = (size_t)DPAA2_VADDR_TO_IOVA(dpaa2_q->cscn);