[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220705144747.GA1522144@euler>
Date: Tue, 5 Jul 2022 07:47:47 -0700
From: Colin Foster <colin.foster@...advantage.com>
To: Vladimir Oltean <vladimir.oltean@....com>
Cc: netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Xiaoliang Yang <xiaoliang.yang_1@....com>,
Claudiu Manoil <claudiu.manoil@....com>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
UNGLinuxDriver@...rochip.com, Andrew Lunn <andrew@...n.ch>,
Vivien Didelot <vivien.didelot@...il.com>,
Florian Fainelli <f.fainelli@...il.com>,
Vinicius Costa Gomes <vinicius.gomes@...el.com>,
Maxim Kochetkov <fido_max@...ox.ru>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next 1/2] net: sched: provide shim definitions for
taprio_offload_{get,free}
On Mon, Jul 04, 2022 at 10:02:40PM +0300, Vladimir Oltean wrote:
> 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 <colin.foster@...advantage.com>
> Signed-off-by: Vladimir Oltean <vladimir.oltean@....com>
> ---
> 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.25.1
>
Fixes my build!
Tested-by: Colin Foster <colin.foster@...advantage.com>
Powered by blists - more mailing lists