Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp6161168rwd; Mon, 19 Jun 2023 03:20:36 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5EBpAVJRFF6xGXNt8YlDVM59Y5LwN+qvRUaw0T2DUOWuUt+faapl3N1Tz71YUE9LYgXZSW X-Received: by 2002:a05:6870:c345:b0:1aa:ec5:f83e with SMTP id e5-20020a056870c34500b001aa0ec5f83emr2433781oak.39.1687170036435; Mon, 19 Jun 2023 03:20:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687170036; cv=none; d=google.com; s=arc-20160816; b=0pcp2q/K6+vUQartSPYkUPYV47Zl2eNWsHXImSX94/wFp9nezhUwDQ8Uy0dTgzpoiy dn3RfOxKGe3hrGqur+hDkRrVngYGLoXDVAkV2kdxe3VLRrx4Az58uniQzolcMepAJamV C0zgrahTx8qB4O+djrfsujsKImCB9jDnOVHA7qMHPyaeJkGmMxn2PWvcU/f4ApoDmHS/ +OuXhdQCacqoexjdm0K/S3GCheyyDLZVP3FsgfO49LidyRKaOJzVaaoGqcziV+in3mKn ylS7nA2au8Qiy7TkXZDZuIvsX2/DowGeb2H+STm3GwZ6uZMyKbGe1UyY6ZUIhMZ+bD59 5BFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:dkim-signature :dkim-signature:from; bh=1jNWX8QcZCpCofdya0P9KDQCt/K+OixGuaqVhm+2fOU=; b=PDR1nmvTAiHhoucujHsoI3mzVSpQbdxyLt+Ge7kkV10TZkMS7oD667Wpk0EZHf+QB5 BGiMJJqgScVUe1v9NLLmIrQJi70nijByehxXbOC5t1HIIjrm9cKe1J3QiyutXb/S2JQW gvD7fWsi4AuTu++bbuy4izbKBlCp35TcceGWc1fTfHXvkLJ61bDCf9QvL0G4ZHnyM3NK 2sF2IylGgXO+vlUQ/PzxbnyfGhYIMipYhtufPGX5Jo7kL1YgJjWUWTnuL+RO4E27XbL+ NOUAZZarv+0WyBhTB6NWRwxMIIDu4Nnpe8JRfgGCu/ULShWGvqdPLcqMBf54ICS0mT2Z kzPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=YVMVtPVY; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=Z4AJ1A2N; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l63-20020a639142000000b005533a94a2fdsi8125239pge.466.2023.06.19.03.20.23; Mon, 19 Jun 2023 03:20:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=YVMVtPVY; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=Z4AJ1A2N; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230479AbjFSKJU (ORCPT + 99 others); Mon, 19 Jun 2023 06:09:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231355AbjFSKJR (ORCPT ); Mon, 19 Jun 2023 06:09:17 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C99BE66; Mon, 19 Jun 2023 03:09:08 -0700 (PDT) From: Florian Kauer DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1687169346; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1jNWX8QcZCpCofdya0P9KDQCt/K+OixGuaqVhm+2fOU=; b=YVMVtPVYbpoT+azuBmYHugphzeY68s7BUuMWyI3DgMGZ99jjxK46dBcZsi8Z2j2V/O96kd E2481yjeU6MJi8Bg+pqkOLeZYfZanzSTjJDW4wrKVO4yCaLQqkOputF+Ah2OMlN0PZLz/S 7AJ8r4PsTkXIYL5sQJDzBe3lxiUeAJKLIiwmtzEp1DvyIDoCKerJbRA8YRS/6N6XHeMs2o xVCaiFjwuLjexJ4JtzNVz4zpKEY5g7eGS5DCR1bQWSBBCfVW4FCnqLKEMJ2H7NTXVtRkLw hCQHKQ6tz6QFYzZFgHK1wFWwK0MDROoVYL+B1xj45X3P4H0w1BncY4K9DW0wLQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1687169346; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1jNWX8QcZCpCofdya0P9KDQCt/K+OixGuaqVhm+2fOU=; b=Z4AJ1A2N5oEYHXaIWPstAh0ZgB+yJXiZwgZ2+f8ePvcJ7XvTHngj12+2wiKH3OyriKNOlq q+K5upR1BRZbzaBA== To: Jesse Brandeburg , Tony Nguyen , Vinicius Costa Gomes , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Tan Tee Min , Muhammad Husaini Zulkifli , Aravindhan Gunasekaran , Malli C Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kurt@linutronix.de, florian.kauer@linutronix.de Subject: [PATCH net v2 1/6] igc: Rename qbv_enable to taprio_offload_enable Date: Mon, 19 Jun 2023 12:08:53 +0200 Message-Id: <20230619100858.116286-2-florian.kauer@linutronix.de> In-Reply-To: <20230619100858.116286-1-florian.kauer@linutronix.de> References: <20230619100858.116286-1-florian.kauer@linutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In the current implementation the flags adapter->qbv_enable and IGC_FLAG_TSN_QBV_ENABLED have a similar name, but do not have the same meaning. The first one is used only to indicate taprio offload (i.e. when igc_save_qbv_schedule was called), while the second one corresponds to the Qbv mode of the hardware. However, the second one is also used to support the TX launchtime feature, i.e. ETF qdisc offload. This leads to situations where adapter->qbv_enable is false, but the flag IGC_FLAG_TSN_QBV_ENABLED is set. This is prone to confusion. The rename should reduce this confusion. Since it is a pure rename, it has no impact on functionality. Fixes: e17090eb2494 ("igc: allow BaseTime 0 enrollment for Qbv") Signed-off-by: Florian Kauer Reviewed-by: Kurt Kanzenbach --- drivers/net/ethernet/intel/igc/igc.h | 2 +- drivers/net/ethernet/intel/igc/igc_main.c | 2 +- drivers/net/ethernet/intel/igc/igc_tsn.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/intel/igc/igc.h b/drivers/net/ethernet/intel/igc/igc.h index 34aebf00a512..4c7a1e92ce4c 100644 --- a/drivers/net/ethernet/intel/igc/igc.h +++ b/drivers/net/ethernet/intel/igc/igc.h @@ -185,7 +185,7 @@ struct igc_adapter { ktime_t base_time; ktime_t cycle_time; - bool qbv_enable; + bool taprio_offload_enable; u32 qbv_config_change_errors; /* OS defined structs */ diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c index fa764190f270..dda057a3b5e3 100644 --- a/drivers/net/ethernet/intel/igc/igc_main.c +++ b/drivers/net/ethernet/intel/igc/igc_main.c @@ -6075,7 +6075,7 @@ static int igc_save_qbv_schedule(struct igc_adapter *adapter, size_t n; int i; - adapter->qbv_enable = qopt->enable; + adapter->taprio_offload_enable = qopt->enable; if (!qopt->enable) return igc_tsn_clear_schedule(adapter); diff --git a/drivers/net/ethernet/intel/igc/igc_tsn.c b/drivers/net/ethernet/intel/igc/igc_tsn.c index 94a2b0dfb54d..c6636a7264d5 100644 --- a/drivers/net/ethernet/intel/igc/igc_tsn.c +++ b/drivers/net/ethernet/intel/igc/igc_tsn.c @@ -37,7 +37,7 @@ static unsigned int igc_tsn_new_flags(struct igc_adapter *adapter) { unsigned int new_flags = adapter->flags & ~IGC_FLAG_TSN_ANY_ENABLED; - if (adapter->qbv_enable) + if (adapter->taprio_offload_enable) new_flags |= IGC_FLAG_TSN_QBV_ENABLED; if (is_any_launchtime(adapter)) -- 2.39.2