From patchwork Fri May 8 12:59:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 186333 Delivered-To: patch@linaro.org Received: by 2002:a92:8d81:0:0:0:0:0 with SMTP id w1csp4156498ill; Fri, 8 May 2020 06:03:25 -0700 (PDT) X-Google-Smtp-Source: APiQypJSOJaSSghUlRbE1WmLTREPJyve+JRdQ0Eh3frp/d2g+RvPwfMLtT0Ok2T6M8CaNNJnVx+X X-Received: by 2002:a05:6402:17c4:: with SMTP id s4mr2156712edy.348.1588943005460; Fri, 08 May 2020 06:03:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588943005; cv=none; d=google.com; s=arc-20160816; b=HMmJCkB3fcRKJY/MnvQTFXe05pXZSYEqB3etuYTevqwVYo5EMj+15xm9d0Z8VbeNq7 UGqnJkuOeHrHbHIB91rXSMsM217Mrt35/lexpIDjijw33US7XYu+rRaB7UagqOhsq+GG gUN3vN4pL9h08bPQakDLsSNJsFaXfjGZOcGORjID6FfA+XX9pzGZnE0KondO17DZ6Ota KTvDyPlPhU8GPL190gWwy1KZ2cEgSsfWiE8VN6ZjxY36NWN9BF5BxQZrZzfZyxv6pVAO pRnbRsTyvvVfDVNgkp3glQ+BszmbGh1zoPj7Xn78JyuM9YV1scayXh5xL0g1sEYEaExi lesw== 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=xNqCcmYBqSENEGJiw79GpNwz1aWC1sgYRYslr+r6/5W/GIPhbuOtvlCxKgSPfRMN+W DoPifyarg92tg9I6crvGC5rNXRZYpTP9v5e6i2HrtulYy/HkQlItHxlyiBKtQDnOX1fu HUIcwgnDsr33A0+qvA3su5QKLMGltPrtS5GXnxA1ZYCey1+BJ0JYBY1FDR+/8KSMe8IQ TUDoQPlsxfSBPGMBSVvdU12gWX+o8gHem54JTChjKemhhuE6rdq2oEFlOHfgsPuDWKWj N2/+2Nqm9sP9e0cHEuw/uHc+lxW7Zbuk5J/VcUJ8yiRM5CKNba4F0nD0cBDK2IByFU6+ p/cw== 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 g3si942285edp.190.2020.05.08.06.03.25; Fri, 08 May 2020 06:03:25 -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 2B6471DB70; Fri, 8 May 2020 15:02:08 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id 9FFB61DAF9; Fri, 8 May 2020 15:01:55 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 5DF9E201392; Fri, 8 May 2020 15:01:55 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 59A7B201389; Fri, 8 May 2020 15:01:53 +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 B0A2A40310; Fri, 8 May 2020 21:01:49 +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:29:32 +0530 Message-Id: <20200508125934.14255-8-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200508125934.14255-1-hemant.agrawal@nxp.com> References: <20200507104645.31990-1-hemant.agrawal@nxp.com> <20200508125934.14255-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v5 7/9] 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,