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 E302546B72 for ; Mon, 14 Jul 2025 17:12:30 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DC8004060C; Mon, 14 Jul 2025 17:12:30 +0200 (CEST) Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) by mails.dpdk.org (Postfix) with ESMTP id 8C6664042F for ; Mon, 14 Jul 2025 17:12:29 +0200 (CEST) Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-4555f89b236so29281245e9.1 for ; Mon, 14 Jul 2025 08:12:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1752505949; x=1753110749; 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=6xl9BxfS9lnJFfqThX2ZZPLhiZcUN08pKmJa5SgPbuI=; b=YpTHXHWCia1C4OfjxH0+d5/kyLJzD/Fa2iOOMpa8JABgoUsK4JInY2p+nlUKglOgzp z73ynhHzawuQeisI9ejcq/8VTbY4tfj5gb+PD++/Ne4NWEGx82wBFigsnVyD+RpWd5Dj dihSWenjHEUrICZGoLanKQIu0q4vhNmCwF1tH8fSyn/GogbMtx+GgbvcyN8+25OL59fD d/vLlJjCkA0PQ2iPYfmG4o0NMl19L9BqIZU3JyIJn8Iky//xtp2qc1KxccUmlpfejhxO auQfrVaYfAeWKI2+GdmLOF26fyS0aLC1AkONhphirSuoLcY3CKVXs8XW6sFCEey9iw0J JiYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752505949; x=1753110749; 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=6xl9BxfS9lnJFfqThX2ZZPLhiZcUN08pKmJa5SgPbuI=; b=xRe6pA69TZdndDcwq9OADJSZeGdkyQpaBlC29DRQnhG2AFH1mOtjo0PYbenWzt63Av BHldIOtTHmhMZiPzu3WxZYsIacMvGsRsNvnCnipC8AeedJvV7m0RyHY/WtuELlzjS4Ga qEhMY1UJ9VMbfeNB49cua7Y0j55x0cwm74ItlZfQArFSO5XHCNym7IFuPmjH6eDqDT3A Qg6bL4L3gQYCRAWnpz/dg2V78cXmU8KjX7RuRhNAnEmdN5599oDrzZuJJUCQwQZxsvfQ oiit0k0xTwDr0MszBFVmZiEdDt8D2DEAtR5Y42gyNHkM4jXySHcsskPI4XehUkxIvakX haQA== X-Gm-Message-State: AOJu0YyTXuXFd1q+8wlm5sm/It9PEqxE+5rwAI2aAg/oOzxL4GMiQ7XH DxsiLj2/sF9pnV5+35yddE7Zc6AMQvzWnOX1TNW7ly8+zNdx+S1ZwLr7cM9KKDiZ X-Gm-Gg: ASbGncsK0Caz2sJ7iwR507ifdubxoHWiwUGUs+ons7z/ITL0rLxp+r14gW7QShPVsmZ JX5DqDJtdog3OAcr+yS11iYeKx9Pym8EgEmlGfAfSX8lZ2ZzL7/FW/jyhd6WPM4aFqKrnZ0yg91 l8wvnWQH0VmIbE7o8rGw51Exqk614KzCUynhqqIiGL9H7U8YP3ocOys7RkzQI0HRVAgBsefMHu+ qFfQqf4ziInbLzcKQBtQC/y3NbSJZviUvtCcX/mXzV9/HBBduo8bNnbVKmuAkWBfS8npjk4y/J1 rLKCzlhJEdPauaLsa8s9afPka8JeXkRTEcyDPNm7VK7acjpJcXAcKTH+aG1vdBD2Flbr4ZnULLZ ydhyZf+wZxPiBWBNb691aXxi6cMy8 X-Google-Smtp-Source: AGHT+IGtMgYP14H8t2gOJg17cDyXrG/C00osz6BL0cOK02YG6DsV5pcRXxtyALrR7cQWKUByIxLB+A== X-Received: by 2002:a05:600c:3145:b0:44a:b478:1387 with SMTP id 5b1f17b1804b1-454f4255ce8mr147705255e9.17.1752505948802; Mon, 14 Jul 2025 08:12:28 -0700 (PDT) Received: from localhost ([2a01:4b00:d036:ae00:a923:75e5:f97f:ef33]) by smtp.gmail.com with UTF8SMTPSA id 5b1f17b1804b1-456101b616csm63427565e9.4.2025.07.14.08.12.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Jul 2025 08:12:28 -0700 (PDT) From: luca.boccassi@gmail.com To: Jiawen Wu Cc: dpdk stable Subject: patch 'net/ngbe: fix MAC control frame forwarding' has been queued to stable release 22.11.9 Date: Mon, 14 Jul 2025 16:11:03 +0100 Message-ID: <20250714151121.219866-8-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250714151121.219866-1-luca.boccassi@gmail.com> References: <20250630122556.1133654-23-luca.boccassi@gmail.com> <20250714151121.219866-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.9 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/16/25. 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/926ab7c88e824e2356f4f7c5dab6408ac3c90a22 Thanks. Luca Boccassi --- >From 926ab7c88e824e2356f4f7c5dab6408ac3c90a22 Mon Sep 17 00:00:00 2001 From: Jiawen Wu Date: Fri, 13 Jun 2025 16:41:54 +0800 Subject: [PATCH] net/ngbe: fix MAC control frame forwarding [ upstream commit 31ae872822cdc89cd00926c3e162781ef927ca24 ] Test failure on the case "test_pause_fwd_port_stop_start", which expect MAC control frame forwarding setting still working after port stop/start. Fix the bug to pass the test case. Fixes: f40e9f0e2278 ("net/ngbe: support flow control") Signed-off-by: Jiawen Wu --- drivers/net/ngbe/base/ngbe_hw.c | 9 +++++++++ drivers/net/ngbe/base/ngbe_type.h | 1 + drivers/net/ngbe/ngbe_ethdev.c | 1 + 3 files changed, 11 insertions(+) diff --git a/drivers/net/ngbe/base/ngbe_hw.c b/drivers/net/ngbe/base/ngbe_hw.c index b9bb861adc..fa6445b12b 100644 --- a/drivers/net/ngbe/base/ngbe_hw.c +++ b/drivers/net/ngbe/base/ngbe_hw.c @@ -812,6 +812,15 @@ s32 ngbe_setup_fc_em(struct ngbe_hw *hw) goto out; } + /* + * Reconfig mac ctrl frame fwd rule to make sure it still + * working after port stop/start. + */ + wr32m(hw, NGBE_MACRXFLT, NGBE_MACRXFLT_CTL_MASK, + (hw->fc.mac_ctrl_frame_fwd ? + NGBE_MACRXFLT_CTL_NOPS : NGBE_MACRXFLT_CTL_DROP)); + ngbe_flush(hw); + err = hw->phy.set_pause_adv(hw, reg_cu); out: diff --git a/drivers/net/ngbe/base/ngbe_type.h b/drivers/net/ngbe/base/ngbe_type.h index 8a7d2cd331..82ce3f5440 100644 --- a/drivers/net/ngbe/base/ngbe_type.h +++ b/drivers/net/ngbe/base/ngbe_type.h @@ -108,6 +108,7 @@ struct ngbe_fc_info { u32 high_water; /* Flow Ctrl High-water */ u32 low_water; /* Flow Ctrl Low-water */ u16 pause_time; /* Flow Control Pause timer */ + u8 mac_ctrl_frame_fwd; /* Forward MAC control frames */ bool send_xon; /* Flow control send XON */ bool strict_ieee; /* Strict IEEE mode */ bool disable_fc_autoneg; /* Do not autonegotiate FC */ diff --git a/drivers/net/ngbe/ngbe_ethdev.c b/drivers/net/ngbe/ngbe_ethdev.c index 9d6ae6f2ef..deaf415623 100644 --- a/drivers/net/ngbe/ngbe_ethdev.c +++ b/drivers/net/ngbe/ngbe_ethdev.c @@ -2365,6 +2365,7 @@ ngbe_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf) hw->fc.low_water = fc_conf->low_water; hw->fc.send_xon = fc_conf->send_xon; hw->fc.disable_fc_autoneg = !fc_conf->autoneg; + hw->fc.mac_ctrl_frame_fwd = fc_conf->mac_ctrl_frame_fwd; err = hw->mac.fc_enable(hw); -- 2.47.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-07-14 16:09:41.018754922 +0100 +++ 0008-net-ngbe-fix-MAC-control-frame-forwarding.patch 2025-07-14 16:09:40.700448723 +0100 @@ -1 +1 @@ -From 31ae872822cdc89cd00926c3e162781ef927ca24 Mon Sep 17 00:00:00 2001 +From 926ab7c88e824e2356f4f7c5dab6408ac3c90a22 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 31ae872822cdc89cd00926c3e162781ef927ca24 ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -21 +22 @@ -index 6688ae6a31..bf09f8a817 100644 +index b9bb861adc..fa6445b12b 100644 @@ -24 +25 @@ -@@ -865,6 +865,15 @@ s32 ngbe_setup_fc_em(struct ngbe_hw *hw) +@@ -812,6 +812,15 @@ s32 ngbe_setup_fc_em(struct ngbe_hw *hw) @@ -41 +42 @@ -index 7a3b52ffd4..fc571c7457 100644 +index 8a7d2cd331..82ce3f5440 100644 @@ -44 +45 @@ -@@ -112,6 +112,7 @@ struct ngbe_fc_info { +@@ -108,6 +108,7 @@ struct ngbe_fc_info { @@ -53 +54 @@ -index 08e87471f6..a8f847de8d 100644 +index 9d6ae6f2ef..deaf415623 100644 @@ -56 +57 @@ -@@ -2420,6 +2420,7 @@ ngbe_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf) +@@ -2365,6 +2365,7 @@ ngbe_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)