.. | .. |
---|
20 | 20 | int (*fn)(struct Qdisc *, unsigned long cl, struct qdisc_walker *); |
---|
21 | 21 | }; |
---|
22 | 22 | |
---|
23 | | -#define QDISC_ALIGNTO 64 |
---|
24 | | -#define QDISC_ALIGN(len) (((len) + QDISC_ALIGNTO-1) & ~(QDISC_ALIGNTO-1)) |
---|
25 | | - |
---|
26 | 23 | static inline void *qdisc_priv(struct Qdisc *q) |
---|
27 | 24 | { |
---|
28 | | - return (char *) q + QDISC_ALIGN(sizeof(struct Qdisc)); |
---|
| 25 | + return &q->privdata; |
---|
29 | 26 | } |
---|
30 | 27 | |
---|
31 | 28 | /* |
---|
.. | .. |
---|
76 | 73 | void qdisc_watchdog_init_clockid(struct qdisc_watchdog *wd, struct Qdisc *qdisc, |
---|
77 | 74 | clockid_t clockid); |
---|
78 | 75 | void qdisc_watchdog_init(struct qdisc_watchdog *wd, struct Qdisc *qdisc); |
---|
79 | | -void qdisc_watchdog_schedule_ns(struct qdisc_watchdog *wd, u64 expires); |
---|
| 76 | + |
---|
| 77 | +void qdisc_watchdog_schedule_range_ns(struct qdisc_watchdog *wd, u64 expires, |
---|
| 78 | + u64 delta_ns); |
---|
| 79 | + |
---|
| 80 | +static inline void qdisc_watchdog_schedule_ns(struct qdisc_watchdog *wd, |
---|
| 81 | + u64 expires) |
---|
| 82 | +{ |
---|
| 83 | + return qdisc_watchdog_schedule_range_ns(wd, expires, 0ULL); |
---|
| 84 | +} |
---|
80 | 85 | |
---|
81 | 86 | static inline void qdisc_watchdog_schedule(struct qdisc_watchdog *wd, |
---|
82 | 87 | psched_time_t expires) |
---|
.. | .. |
---|
151 | 156 | s32 queue; |
---|
152 | 157 | }; |
---|
153 | 158 | |
---|
| 159 | +struct tc_taprio_sched_entry { |
---|
| 160 | + u8 command; /* TC_TAPRIO_CMD_* */ |
---|
| 161 | + |
---|
| 162 | + /* The gate_mask in the offloading side refers to traffic classes */ |
---|
| 163 | + u32 gate_mask; |
---|
| 164 | + u32 interval; |
---|
| 165 | +}; |
---|
| 166 | + |
---|
| 167 | +struct tc_taprio_qopt_offload { |
---|
| 168 | + u8 enable; |
---|
| 169 | + ktime_t base_time; |
---|
| 170 | + u64 cycle_time; |
---|
| 171 | + u64 cycle_time_extension; |
---|
| 172 | + |
---|
| 173 | + size_t num_entries; |
---|
| 174 | + struct tc_taprio_sched_entry entries[]; |
---|
| 175 | +}; |
---|
| 176 | + |
---|
| 177 | +/* Reference counting */ |
---|
| 178 | +struct tc_taprio_qopt_offload *taprio_offload_get(struct tc_taprio_qopt_offload |
---|
| 179 | + *offload); |
---|
| 180 | +void taprio_offload_free(struct tc_taprio_qopt_offload *offload); |
---|
| 181 | + |
---|
154 | 182 | #endif |
---|