| .. | .. |
|---|
| 129 | 129 | } |
|---|
| 130 | 130 | } |
|---|
| 131 | 131 | |
|---|
| 132 | +extern const struct nla_policy rtm_tca_policy[TCA_MAX + 1]; |
|---|
| 133 | + |
|---|
| 132 | 134 | /* Calculate maximal size of packet seen by hard_start_xmit |
|---|
| 133 | 135 | routine of this device. |
|---|
| 134 | 136 | */ |
|---|
| 135 | 137 | static inline unsigned int psched_mtu(const struct net_device *dev) |
|---|
| 136 | 138 | { |
|---|
| 137 | | - return dev->mtu + dev->hard_header_len; |
|---|
| 139 | + return READ_ONCE(dev->mtu) + dev->hard_header_len; |
|---|
| 138 | 140 | } |
|---|
| 139 | 141 | |
|---|
| 140 | 142 | static inline struct net *qdisc_net(struct Qdisc *q) |
|---|
| .. | .. |
|---|
| 179 | 181 | *offload); |
|---|
| 180 | 182 | void taprio_offload_free(struct tc_taprio_qopt_offload *offload); |
|---|
| 181 | 183 | |
|---|
| 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 | + |
|---|
| 182 | 193 | #endif |
|---|