hc
2024-05-10 ee930fffee469d076998274a2ca55e13dc1efb67
kernel/include/net/pkt_sched.h
....@@ -129,12 +129,14 @@
129129 }
130130 }
131131
132
+extern const struct nla_policy rtm_tca_policy[TCA_MAX + 1];
133
+
132134 /* Calculate maximal size of packet seen by hard_start_xmit
133135 routine of this device.
134136 */
135137 static inline unsigned int psched_mtu(const struct net_device *dev)
136138 {
137
- return dev->mtu + dev->hard_header_len;
139
+ return READ_ONCE(dev->mtu) + dev->hard_header_len;
138140 }
139141
140142 static inline struct net *qdisc_net(struct Qdisc *q)
....@@ -179,4 +181,13 @@
179181 *offload);
180182 void taprio_offload_free(struct tc_taprio_qopt_offload *offload);
181183
184
+/* Ensure skb_mstamp_ns, which might have been populated with the txtime, is
185
+ * not mistaken for a software timestamp, because this will otherwise prevent
186
+ * the dispatch of hardware timestamps to the socket.
187
+ */
188
+static inline void skb_txtime_consumed(struct sk_buff *skb)
189
+{
190
+ skb->tstamp = ktime_set(0, 0);
191
+}
192
+
182193 #endif