[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <IA3PR11MB89868F4A6EFAEA100AE0DA20E5D4A@IA3PR11MB8986.namprd11.prod.outlook.com>
Date: Thu, 20 Nov 2025 08:47:41 +0000
From: "Loktionov, Aleksandr" <aleksandr.loktionov@...el.com>
To: Kurt Kanzenbach <kurt@...utronix.de>, "Nguyen, Anthony L"
<anthony.l.nguyen@...el.com>, "Kitszel, Przemyslaw"
<przemyslaw.kitszel@...el.com>
CC: Andrew Lunn <andrew+netdev@...n.ch>, "David S. Miller"
<davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski
<kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Sebastian Andrzej Siewior
<bigeasy@...utronix.de>, "Gomes, Vinicius" <vinicius.gomes@...el.com>,
"intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: [Intel-wired-lan] [PATCH iwl-net v3] igc: Restore default Qbv
schedule when changing channels
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf
> Of Kurt Kanzenbach
> Sent: Thursday, November 20, 2025 9:18 AM
> To: Nguyen, Anthony L <anthony.l.nguyen@...el.com>; Kitszel,
> Przemyslaw <przemyslaw.kitszel@...el.com>
> Cc: Andrew Lunn <andrew+netdev@...n.ch>; David S. Miller
> <davem@...emloft.net>; Eric Dumazet <edumazet@...gle.com>; Jakub
> Kicinski <kuba@...nel.org>; Paolo Abeni <pabeni@...hat.com>; Sebastian
> Andrzej Siewior <bigeasy@...utronix.de>; Gomes, Vinicius
> <vinicius.gomes@...el.com>; Loktionov, Aleksandr
> <aleksandr.loktionov@...el.com>; intel-wired-lan@...ts.osuosl.org;
> netdev@...r.kernel.org; Kurt Kanzenbach <kurt@...utronix.de>
> Subject: [Intel-wired-lan] [PATCH iwl-net v3] igc: Restore default Qbv
> schedule when changing channels
>
> The Multi-queue Priority (MQPRIO) and Earliest TxTime First (ETF)
> offloads utilize the Time Sensitive Networking (TSN) Tx mode. This
> mode is always coupled to IEEE 802.1Qbv time aware shaper (Qbv).
> Therefore, the driver sets a default Qbv schedule of all gates opened
> and a cycle time of 1s. This schedule is set during probe.
>
> However, the following sequence of events lead to Tx issues:
>
> - Boot a dual core system
> igc_probe():
> igc_tsn_clear_schedule():
> -> Default Schedule is set
> Note: At this point the driver has allocated two Tx/Rx queues,
> because
> there are only two CPUs.
>
> - ethtool -L enp3s0 combined 4
> igc_ethtool_set_channels():
> igc_reinit_queues()
> -> Default schedule is gone, per Tx ring start and end time are
> zero
>
> - tc qdisc replace dev enp3s0 handle 100 parent root mqprio \
> num_tc 4 map 3 3 2 2 0 1 1 1 3 3 3 3 3 3 3 3 \
> queues 1@0 1@1 1@2 1@3 hw 1
> igc_tsn_offload_apply():
> igc_tsn_enable_offload():
> -> Writes zeros to IGC_STQT(i) and IGC_ENDQT(i), causing Tx to
> stall/fail
>
> Therefore, restore the default Qbv schedule after changing the number
> of channels.
>
> Furthermore, add a restriction to not allow queue reconfiguration when
> TSN/Qbv is enabled, because it may lead to inconsistent states.
>
> Fixes: c814a2d2d48f ("igc: Use default cycle 'start' and 'end' values
> for queues")
> Signed-off-by: Kurt Kanzenbach <kurt@...utronix.de>
> ---
> Changes in v3:
> - Adjust commit message and comments (Aleksandr)
> - Link to v2: https://lore.kernel.org/r/20251118-igc_mqprio_channels-
> v2-1-c32563dede2f@...utronix.de
>
> Changes in v2:
> - Explain abbreviations (Aleksandr)
> - Only clear schedule if no error happened (Aleksandr)
> - Add restriction to avoid inconsistent states (Vinicius)
> - Target net tree (Vinicius)
> - Link to v1: https://lore.kernel.org/r/20251107-igc_mqprio_channels-
> v1-1-42415562d0f8@...utronix.de
> ---
> drivers/net/ethernet/intel/igc/igc_ethtool.c | 4 ++--
> drivers/net/ethernet/intel/igc/igc_main.c | 5 +++++
> 2 files changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/igc/igc_ethtool.c
> b/drivers/net/ethernet/intel/igc/igc_ethtool.c
> index
> bb783042d1af9c86f18fc033fa4c3e75abb0efe8..4b39329e9e32bf34cef66e69b59d
> 05b54cfeabff 100644
> --- a/drivers/net/ethernet/intel/igc/igc_ethtool.c
> +++ b/drivers/net/ethernet/intel/igc/igc_ethtool.c
> @@ -1561,8 +1561,8 @@ static int igc_ethtool_set_channels(struct
> net_device *netdev,
> if (ch->other_count != NON_Q_VECTORS)
...
> ---
> base-commit: bc41fbbf6faa9ffeaf0148019ed631077f7f150f
> change-id: 20251107-igc_mqprio_channels-2329166e898b
>
> Best regards,
> --
> Kurt Kanzenbach <kurt@...utronix.de>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@...el.com>
Powered by blists - more mailing lists