Patch "net: sched: provide shim definitions for taprio_offload_{get,free}" has been added to the 5.19-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    net: sched: provide shim definitions for taprio_offload_{get,free}

to the 5.19-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     net-sched-provide-shim-definitions-for-taprio_offloa.patch
and it can be found in the queue-5.19 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 37d1740f5cb07129febc21a44a7547e48609287d
Author: Vladimir Oltean <vladimir.oltean@xxxxxxx>
Date:   Mon Jul 4 22:02:40 2022 +0300

    net: sched: provide shim definitions for taprio_offload_{get,free}
    
    [ 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 <colin.foster@xxxxxxxxxxxxxxxx>
    Signed-off-by: Vladimir Oltean <vladimir.oltean@xxxxxxx>
    Tested-by: Colin Foster <colin.foster@xxxxxxxxxxxxxxxx>
    Acked-by: Vinicius Costa Gomes <vinicius.gomes@xxxxxxxxx>
    Link: https://lore.kernel.org/r/20220704190241.1288847-1-vladimir.oltean@xxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

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.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux