From patchwork Fri May 8 13:02:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 186340 Delivered-To: patch@linaro.org Received: by 2002:a92:8d81:0:0:0:0:0 with SMTP id w1csp4159030ill; Fri, 8 May 2020 06:05:49 -0700 (PDT) X-Google-Smtp-Source: APiQypKCLZIfxoc5MRobx1oAQsAfCOiGOVLiQemcsI558iPAgriw/2kyyJk1PkUi8/Wq6L0zXghm X-Received: by 2002:a17:906:5fcb:: with SMTP id k11mr1012164ejv.213.1588943148983; Fri, 08 May 2020 06:05:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588943148; cv=none; d=google.com; s=arc-20160816; b=D1f2vGjH7+hKA1eUcseYEsu7eYL2BV5rcbmiWYU3N6eFB1vSVavrLv0A+vn9gJBDb8 VUKkTpIAcs/FRRNl7RpE3BpQPYO+KH52PGpUo98EZtULqt1OkFWjbN0zzaSrwNL+gdFq 62v9Q4zwuliTyuLNNsuF4fvtZdWp54jiIj11EfmRxZ0Wc1WBmIO23D66qsL0J23OyV0p 2JWMZgTOesYKhHsxAjepLv8bsjGfZk6dig1Xub1kIdnG/qAIW8esllJP9lxaXFc65I5z SwfUFLIP5bqFUaBrreX/MR8yCw2ns0Rmohb72rHsDqlUhLk7MbrDkI3Uriu+GAKrtnN0 Hsug== 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=Wp9mw918ZDl9OF4v0eHnAEEFrwfbjbkRtOO7s4djvKU=; b=FDwgFdnNPDOJ8SwcrMenPhgQ3esFkIoy2e1uz/1vinQ4UHeGQmH0gBj/srIt4pXdFd 6cxttj6hSyTjEZTW70PgwPep9Wv4mQLxekhiup9DrdV1V6JaM8tDKxVntcaQxbdKQU3/ asG284NyZO6w5VkW6M0C9IBOf+0VY7If6HjQ8C0vuAnAvAkudjAsX6ZMnY7YYkIaVFcv +8UPlluDB4PyxPo2I4myc1tHM/H/S3Hj9J5U1bE04BaZDOkDs2mS0SRn4ZPgztKY2BXm s+nqjK/zLSkWupak2QjtNxV4HSXS62UAcAt8B4Qu/KKb4FrndCLadAjm2y8F33GQ2y4b oq8w== 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 u26si1005776edb.4.2020.05.08.06.05.48; Fri, 08 May 2020 06:05:48 -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 62DDE1DBFB; Fri, 8 May 2020 15:04:38 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id 99CAB1DB8A; Fri, 8 May 2020 15:04:29 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 799C71A152F; Fri, 8 May 2020 15:04:29 +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 74C921A02F9; Fri, 8 May 2020 15:04:27 +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 D8C694028B; Fri, 8 May 2020 21:04:24 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, ferruh.yigit@intel.com Cc: stable@dpdk.org, Jun Yang Date: Fri, 8 May 2020 18:32:09 +0530 Message-Id: <20200508130211.14334-9-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200508130211.14334-1-hemant.agrawal@nxp.com> References: <20200507104645.31990-1-hemant.agrawal@nxp.com> <20200508130211.14334-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v6 08/10] net/dpaa2: fix cong group id for multiple tcs 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: Jun Yang When using a single TC, flow id is same as congestion group id. However in case of multiple traffic classes, same flow id values are used within each traffc classs, which causes incorrect traffic behavior e.g. halting of traffic. This patches changes to use the cgid as the index which works for single as well as multiple traffic classes. Fixes: 13b856ac02a8 ("net/dpaa2: support taildrop on frame count basis") Cc: stable@dpdk.org Signed-off-by: Jun Yang --- drivers/net/dpaa2/dpaa2_ethdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c index 08f9832eb8..d9960b01f7 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -669,7 +669,7 @@ dpaa2_dev_rx_queue_setup(struct rte_eth_dev *dev, DPNI_CP_CONGESTION_GROUP, DPNI_QUEUE_RX, dpaa2_q->tc_index, - flow_id, &taildrop); + dpaa2_q->cgid, &taildrop); } else { /*enabling per rx queue congestion control */ taildrop.threshold = CONG_THRESHOLD_RX_BYTES_Q; @@ -696,7 +696,7 @@ dpaa2_dev_rx_queue_setup(struct rte_eth_dev *dev, ret = dpni_set_taildrop(dpni, CMD_PRI_LOW, priv->token, DPNI_CP_CONGESTION_GROUP, DPNI_QUEUE_RX, dpaa2_q->tc_index, - flow_id, &taildrop); + dpaa2_q->cgid, &taildrop); } else { ret = dpni_set_taildrop(dpni, CMD_PRI_LOW, priv->token, DPNI_CP_QUEUE, DPNI_QUEUE_RX,