hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/include/net/pkt_sched.h
....@@ -20,12 +20,9 @@
2020 int (*fn)(struct Qdisc *, unsigned long cl, struct qdisc_walker *);
2121 };
2222
23
-#define QDISC_ALIGNTO 64
24
-#define QDISC_ALIGN(len) (((len) + QDISC_ALIGNTO-1) & ~(QDISC_ALIGNTO-1))
25
-
2623 static inline void *qdisc_priv(struct Qdisc *q)
2724 {
28
- return (char *) q + QDISC_ALIGN(sizeof(struct Qdisc));
25
+ return &q->privdata;
2926 }
3027
3128 /*
....@@ -76,7 +73,15 @@
7673 void qdisc_watchdog_init_clockid(struct qdisc_watchdog *wd, struct Qdisc *qdisc,
7774 clockid_t clockid);
7875 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
+}
8085
8186 static inline void qdisc_watchdog_schedule(struct qdisc_watchdog *wd,
8287 psched_time_t expires)
....@@ -151,4 +156,27 @@
151156 s32 queue;
152157 };
153158
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
+
154182 #endif