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 15D79454E9 for ; Tue, 25 Jun 2024 02:01:00 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 108EE41141; Tue, 25 Jun 2024 02:01:00 +0200 (CEST) Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by mails.dpdk.org (Postfix) with ESMTP id 86F1140EDD for ; Tue, 25 Jun 2024 02:00:58 +0200 (CEST) Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-424a3199302so174185e9.1 for ; Mon, 24 Jun 2024 17:00:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719273658; x=1719878458; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=WbQs2BAMqLhZ+lU2POspYO1h6WikAPQuB3h5fD+78i0=; b=gWjEAJZdcjXMauyL/vwwialJOmlyC98fCiapudWOwesb+CohSXM3sT0jjF0MgcfHkA xAa2RtidymUHKsDyDzi3ZBTyzWEBTIWnricxkV2qk7DE+dDt+UdYqsvestucXSCfz1+Z 2ZgWAo1EBJsCK2fec5XPBSKH6ASCQc2Ve5C57BrK26ItdqgOnmjGM0Z/md9M5b7gK3GC Rm6V9yFv/PwZ4SLTJU9F2/+W4eoa9Hr+ssJbTPBn6pKE8AwolUl1II6XDniBo3MmUa6n mmYZubYSuMC3gCUe9o/LY4bQODF+McRLMdJtE/A86jdxqg6UkRfWwy5vkylj2lHuLSjc bXkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719273658; x=1719878458; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WbQs2BAMqLhZ+lU2POspYO1h6WikAPQuB3h5fD+78i0=; b=OTvOeGZH9fUA5yh6eIOUKIJTcTb5JXngPKDTyaWBPXgXHj4iPntbhv5CV+xdF+lqs5 /e96Yq4c0cv8RqWP0E7VgXC+DlpWxTYBph0m3ToqNIZCuG4ywarRKVGOIKqQztKBCk25 i3enMjuiB4kEnFetjyJWaYxmIF4vp+AjfEMomtpOcaY2L79gU3ZEfTdm9LSRZkHDYIdf OdFJuDfIRMN6q+npkGKu/27Shmqb4cdoOAW4ThJ6GuGXqeCtqjQiZKIDTwDfnr6lsQka MILGSecU9ZLyjCZvdPmI5uvcVV6Ns8nUpfg7wFdP+DXYrBI79KJ+coewWn3Hq5hnsnNe e2Nw== X-Forwarded-Encrypted: i=1; AJvYcCXv8ARJCEEPKrbfWlhsW/FlaurDb3nEMyNOQKXVpZmYQ6BCQ0G+pPBoIVMUISvQTr9hyUVuBB7B9RE42dNIjyQ= X-Gm-Message-State: AOJu0Yz8tVHlQdysss71b3jGCPEappBUaVEJSDNgdzEt+UBT6KZAru7K GrzRc+fbj+PHHSU9Ynd/f4GBQQIbEyKqi8bQtjyrB9vnQZWs17NuRxb3sw== X-Google-Smtp-Source: AGHT+IGqDXOEfPDgVRRyj2h8KxO2giBRgUun8uLkQSQEIMRuCqpJX/UytQhC2IGIKV2bt4DN+sBItw== X-Received: by 2002:a05:600c:791:b0:422:683b:df31 with SMTP id 5b1f17b1804b1-4248cc1792emr49180955e9.7.1719273658137; Mon, 24 Jun 2024 17:00:58 -0700 (PDT) Received: from localhost ([137.220.120.171]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4249c0699dasm3090145e9.39.2024.06.24.17.00.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jun 2024 17:00:57 -0700 (PDT) From: luca.boccassi@gmail.com To: Venkat Kumar Ande Cc: Selwin Sebastian , dpdk stable Subject: patch 'net/axgbe: fix Tx flow on 30H HW' has been queued to stable release 22.11.6 Date: Tue, 25 Jun 2024 00:58:18 +0100 Message-Id: <20240624235907.885628-32-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240624235907.885628-1-luca.boccassi@gmail.com> References: <20240624235907.885628-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 22.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/27/24. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/59767090cb7af04ec5fbdc8a443cd3da13f0207c Thanks. Luca Boccassi --- >From 59767090cb7af04ec5fbdc8a443cd3da13f0207c Mon Sep 17 00:00:00 2001 From: Venkat Kumar Ande Date: Tue, 4 Jun 2024 17:41:43 +0530 Subject: [PATCH] net/axgbe: fix Tx flow on 30H HW [ upstream commit b4b24f3e80f9b1bd2c56e1b56b8b8337748e15e6 ] There is difference in the TX Flow Control registers (TFCR) between the revisions of the hardware. The older revisions of hardware used to have single register per queue. Whereas, the newer revision of hardware (from ver 30H onwards) have one register per priority. Without the fix the user will face problem in TX operation on new 30H HW Fixes: 7c4158a5b592 ("net/axgbe: add DMA programming and start/stop") Signed-off-by: Venkat Kumar Ande Acked-by: Selwin Sebastian --- drivers/net/axgbe/axgbe_dev.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/drivers/net/axgbe/axgbe_dev.c b/drivers/net/axgbe/axgbe_dev.c index 9b0073eea6..5233633a53 100644 --- a/drivers/net/axgbe/axgbe_dev.c +++ b/drivers/net/axgbe/axgbe_dev.c @@ -269,20 +269,28 @@ static int axgbe_set_speed(struct axgbe_port *pdata, int speed) return 0; } +static unsigned int axgbe_get_fc_queue_count(struct axgbe_port *pdata) +{ + unsigned int max_q_count = AXGMAC_MAX_FLOW_CONTROL_QUEUES; + + /* From MAC ver 30H the TFCR is per priority, instead of per queue */ + if (AXGMAC_GET_BITS(pdata->hw_feat.version, MAC_VR, SNPSVER) >= 0x30) + return max_q_count; + else + return (RTE_MIN(pdata->tx_q_count, max_q_count)); +} + static int axgbe_disable_tx_flow_control(struct axgbe_port *pdata) { - unsigned int max_q_count, q_count; unsigned int reg, reg_val; - unsigned int i; + unsigned int i, q_count; /* Clear MTL flow control */ for (i = 0; i < pdata->rx_q_count; i++) AXGMAC_MTL_IOWRITE_BITS(pdata, i, MTL_Q_RQOMR, EHFC, 0); /* Clear MAC flow control */ - max_q_count = AXGMAC_MAX_FLOW_CONTROL_QUEUES; - q_count = RTE_MIN(pdata->tx_q_count, - max_q_count); + q_count = axgbe_get_fc_queue_count(pdata); reg = MAC_Q0TFCR; for (i = 0; i < q_count; i++) { reg_val = AXGMAC_IOREAD(pdata, reg); @@ -297,9 +305,8 @@ static int axgbe_disable_tx_flow_control(struct axgbe_port *pdata) static int axgbe_enable_tx_flow_control(struct axgbe_port *pdata) { - unsigned int max_q_count, q_count; unsigned int reg, reg_val; - unsigned int i; + unsigned int i, q_count; /* Set MTL flow control */ for (i = 0; i < pdata->rx_q_count; i++) { @@ -316,9 +323,7 @@ static int axgbe_enable_tx_flow_control(struct axgbe_port *pdata) } /* Set MAC flow control */ - max_q_count = AXGMAC_MAX_FLOW_CONTROL_QUEUES; - q_count = RTE_MIN(pdata->tx_q_count, - max_q_count); + q_count = axgbe_get_fc_queue_count(pdata); reg = MAC_Q0TFCR; for (i = 0; i < q_count; i++) { reg_val = AXGMAC_IOREAD(pdata, reg); -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-06-25 00:22:15.544399094 +0100 +++ 0032-net-axgbe-fix-Tx-flow-on-30H-HW.patch 2024-06-25 00:22:13.125184426 +0100 @@ -1 +1 @@ -From b4b24f3e80f9b1bd2c56e1b56b8b8337748e15e6 Mon Sep 17 00:00:00 2001 +From 59767090cb7af04ec5fbdc8a443cd3da13f0207c Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit b4b24f3e80f9b1bd2c56e1b56b8b8337748e15e6 ] + @@ -14 +15,0 @@ -Cc: stable@dpdk.org