Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3049392rwb; Mon, 15 Aug 2022 16:55:45 -0700 (PDT) X-Google-Smtp-Source: AA6agR6LOwzGhNX0hoekmvxDeUHZ7r9YmqMTnyFLSIf7k3zj2xuGIssYRW+u+aQqwuYBK8iKXFP1 X-Received: by 2002:a05:6a00:23d1:b0:52f:39e9:9150 with SMTP id g17-20020a056a0023d100b0052f39e99150mr19001581pfc.16.1660607744997; Mon, 15 Aug 2022 16:55:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660607744; cv=none; d=google.com; s=arc-20160816; b=n7Qpe92fxE23vKB+2aZEcXUx4gABiEvEW31hwefIAjwaqMs7Y9mLuuETs05z7ZpUQg +vrex2QQWfXuG4QMBA7RyKj4Z89R+9Js+5bTam9y5TEzEkaWzFqha2kPbeV0ocQ/3juP 2PkO8Ltyqh/0/bWrGOrxeL2L4AwoocOt6h95JQyh/2fyHIToJ47xW0aIw2b62M8CV8BN SaU7cxgR7m87XmHPqZrJ6sKxDRm/JsYLKFC6LggdGoteHOZklWCr9EMVH3DV+lew6eLX sMdTNeMEKBFohXakw+64JIqEy8ebhWYkGg4uQUucB8EMdV3axvZlO5hyFDphfW5ahb9c 3OOw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=aG7LL06kGJvqyrXZVgdhUaergpe968KAe+AopIUTgtY=; b=ZVayuFRQpYx6EiwIIJ3/PXrfw08vYSFezcl5gSpt2Fh58e57dCvnY0VS5xwLGjaDeV pFdmPipQYNY4z9xR6fek0bbNNHhQqaoLuhhJn612WqSbD2ldtZKbnB0DVTfM7EMKuBOs oKpVj7rWeOqD7dOsxgb2jUmqmRRgnUqnu/JV9851mXIF7O+hiBXYyV+JxE1rmVni7P4U 8Wsp9a+BXhnlGJkm3zueVz5F2JMFYri/RRJdSTq9MxvRpEB21iaaCZIT0Le6KI405XcO OBcwUpCIcd4Suha/x0IK8Jpuvbc5nELAaMrij8bPH5KeRQxlcC9ihtwvNqezVqMekXzK nVqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=NRzUrsVN; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id be1-20020a170902aa0100b0016c29e43c72si10731723plb.140.2022.08.15.16.55.28; Mon, 15 Aug 2022 16:55:44 -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=@linuxfoundation.org header.s=korg header.b=NRzUrsVN; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355064AbiHOXv0 (ORCPT + 99 others); Mon, 15 Aug 2022 19:51:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354984AbiHOXqz (ORCPT ); Mon, 15 Aug 2022 19:46:55 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 414E18E99F; Mon, 15 Aug 2022 13:15:08 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9A8FD60F70; Mon, 15 Aug 2022 20:15:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A1462C433C1; Mon, 15 Aug 2022 20:15:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660594507; bh=HdZN3NTvMMQl8HTqsLSlcwZKLq5OqohzlyHzJ25xYXU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NRzUrsVN0g5747RYjUyZeLhwdhUYHS89xZpbeWaGiAopgeS7H6hjIT2UzNab3dgdN aklAAMVjwdHAviAM7a3ElmrV3FpMdNoUz9AzCaY6yENdQ30J4ZZfzlOrk09yzoHuZc +QuKMqHW9SMbY1DkSChPVNg+UVjswj2xshO3G0os= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Colin Foster , Vladimir Oltean , Vinicius Costa Gomes , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.19 0442/1157] net: sched: provide shim definitions for taprio_offload_{get,free} Date: Mon, 15 Aug 2022 19:56:38 +0200 Message-Id: <20220815180457.293492225@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 From: Vladimir Oltean [ Upstream commit d7be266adbfd3aca6965ea6a0c36b2c3d8fc9fc8 ] All callers of taprio_offload_get() and taprio_offload_free() prior to the blamed commit are conditionally compiled based on CONFIG_NET_SCH_TAPRIO. felix_vsc9959.c is different; it provides vsc9959_qos_port_tas_set() even when taprio is compiled out. Provide shim definitions for the functions exported by taprio so that felix_vsc9959.c is able to compile. vsc9959_qos_port_tas_set() in that case is dead code anyway, and ocelot_port->taprio remains NULL, which is fine for the rest of the logic. Fixes: 1c9017e44af2 ("net: dsa: felix: keep reference on entire tc-taprio config") Reported-by: Colin Foster Signed-off-by: Vladimir Oltean Tested-by: Colin Foster Acked-by: Vinicius Costa Gomes Link: https://lore.kernel.org/r/20220704190241.1288847-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- include/net/pkt_sched.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h index 44a35531952e..3372a1f67cf4 100644 --- a/include/net/pkt_sched.h +++ b/include/net/pkt_sched.h @@ -173,11 +173,28 @@ struct tc_taprio_qopt_offload { struct tc_taprio_sched_entry entries[]; }; +#if IS_ENABLED(CONFIG_NET_SCH_TAPRIO) + /* Reference counting */ struct tc_taprio_qopt_offload *taprio_offload_get(struct tc_taprio_qopt_offload *offload); void taprio_offload_free(struct tc_taprio_qopt_offload *offload); +#else + +/* Reference counting */ +static inline struct tc_taprio_qopt_offload * +taprio_offload_get(struct tc_taprio_qopt_offload *offload) +{ + return NULL; +} + +static inline void taprio_offload_free(struct tc_taprio_qopt_offload *offload) +{ +} + +#endif + /* Ensure skb_mstamp_ns, which might have been populated with the txtime, is * not mistaken for a software timestamp, because this will otherwise prevent * the dispatch of hardware timestamps to the socket. -- 2.35.1