Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3081910rwb; Mon, 15 Aug 2022 17:40:53 -0700 (PDT) X-Google-Smtp-Source: AA6agR4TTEaVn2+qK0z2OpvmaWnd5ARjBftkiGcbNMK/6QXawd8fGfdZyEDxOrDblhKNF1bDJ5La X-Received: by 2002:a05:6402:292:b0:43c:ee5e:a5da with SMTP id l18-20020a056402029200b0043cee5ea5damr16663618edv.181.1660610453396; Mon, 15 Aug 2022 17:40:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660610453; cv=none; d=google.com; s=arc-20160816; b=eH0s58DSBPT1qKsH7Mmw53hrMrOVpqa2P/fnbPeF+KmPq9y7dysIAQNfOAvQK6I2Sa Ps5e0kiLQZHgNGrvI30Gu+DKdwT2GSED14VdtbhtHcIWPyQjkUMgqbdsdD7mnk/wLB9h dEczcYDX6jsSeCowOitTerqtC3y02H0HyobbKGX+5mkNuuuVDXoWhB5w/FT3cvvaDmbW cDcbl6eNJrZysrr7UoHiReeg36ORFcdx/kkWCHqMIfyRBxaUKpa4QW3sJsFhjoDvgGtV ZSWjto5fBaRfmx5sioBwf85vpGjz2FYsNjxdz0q3oYodKI2teUi8262Rn6E5VBhRbMAb Qsaw== 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=pXSWO00PxEP/xSRx+jd/kwf3rclnC6NPusiCMKyhLgOxhC6cemNsl9+xqV/F/slxL8 3kXLqfqu6Q4qEPrnv/9QcEEbNGNsP7BQ0c8btHWzAt/L5I6TRqoqxqHbRPIiiQBerWS1 KA5/nwzJn3skYo/bEs7QoYBuCCPcbqkeTcRbMarD+2FBtzpRQYzRnaK9bGX48TjD2OZQ mMcaoM+vP9O5L+zEJRgPuGu8BgqzuZbpDM1+WnKeQQfUsJHDAWETjlRHtTO8NfcTR6mi 2yvf+gt63kl79EiBcpA9idR+5ZY+iU1/H1BUI1At/kMsa+5uq3AQR4fxsPXmDEy17YxI mdcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ZafUegXb; 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 g6-20020a1709065d0600b00711c9e99bdbsi11201617ejt.258.2022.08.15.17.40.27; Mon, 15 Aug 2022 17:40:53 -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=ZafUegXb; 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 S244832AbiHOVLK (ORCPT + 99 others); Mon, 15 Aug 2022 17:11:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346905AbiHOVG2 (ORCPT ); Mon, 15 Aug 2022 17:06:28 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F28C388C; Mon, 15 Aug 2022 12:15:28 -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 9744E60F68; Mon, 15 Aug 2022 19:15:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 96F77C433D7; Mon, 15 Aug 2022 19:15:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660590927; bh=HdZN3NTvMMQl8HTqsLSlcwZKLq5OqohzlyHzJ25xYXU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZafUegXbXcBEt9lXLZXl1D5MLNYD38NpFiYL8QZduzYMQIHWXVPfwmu2A2DYfgsLE HpsJfxrfzYyONj7NmPohNoXRcvMdO6+jkP6STxB8XNwdKQ5osSECN3ak9hzmYjk8KB Lu4zYjRh2bE/ibHc9TDQgvCWAiQuqt/cvHj3kTqk= 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.18 0415/1095] net: sched: provide shim definitions for taprio_offload_{get,free} Date: Mon, 15 Aug 2022 19:56:54 +0200 Message-Id: <20220815180446.866780758@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@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