From patchwork Mon Jun 19 10:08:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Kauer X-Patchwork-Id: 109895 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2893327vqr; Mon, 19 Jun 2023 03:21:47 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ72qSYsairTHSyrpaGzx4P1TemQ3m0zT2j+rF6Z8wr96aGI8uEw7MC69QWbTVlCX/5mZ6tm X-Received: by 2002:a05:6a21:6d8c:b0:104:a096:6ac7 with SMTP id wl12-20020a056a216d8c00b00104a0966ac7mr13387607pzb.34.1687170107386; Mon, 19 Jun 2023 03:21:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687170107; cv=none; d=google.com; s=arc-20160816; b=oa/tzgYfj2Oin2m4TTTGi/LtOQSyySFAnU77oa5GcEhivbN8VvaKgS351ljeX1rH1Z GICDRLSF0iboLUlg9uoAx2FF8RBsv6dgaI3Iccg85vnSdrPz+f4K7sRDDqsV7Hl+URqA /KbQ49rbLZZMAHCf8Hlnl77a+XIL9yqRgVauvz6K1xBshDkTkUz/TDQuY0r5G026ftuI Zyb/+Ch/FNr8ZCBacSTJIPqG+Mc3QI9ar+kpKnLvRyyd3bj4962T1syAYnjatQR5Cj5R DbEX5OgNUYSY4sOwhnGTdHVNQVNBVWHtpejmZiQyUfjCW2R8Rz53RDTLoxEJWGiZUHhm ionA== 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 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.21.32; Mon, 19 Jun 2023 03:21:47 -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 S231539AbjFSKJU (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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769126082517928246?= X-GMAIL-MSGID: =?utf-8?q?1769126082517928246?= 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 Tested-by: Naama Meir --- 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))