From nobody Sat Feb 7 15:54:07 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8A14EC2BBC5 for ; Mon, 15 Aug 2022 23:54:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355079AbiHOXv1 (ORCPT ); Mon, 15 Aug 2022 19:51:27 -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-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 c= onfig") 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@nx= p.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[]; }; =20 +#if IS_ENABLED(CONFIG_NET_SCH_TAPRIO) + /* Reference counting */ struct tc_taprio_qopt_offload *taprio_offload_get(struct tc_taprio_qopt_of= fload *offload); void taprio_offload_free(struct tc_taprio_qopt_offload *offload); =20 +#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 *offl= oad) +{ +} + +#endif + /* Ensure skb_mstamp_ns, which might have been populated with the txtime, = is * not mistaken for a software timestamp, because this will otherwise prev= ent * the dispatch of hardware timestamps to the socket. --=20 2.35.1