Commit 1f62879
net/sched: make stab available before ops->init() call
Some qdiscs like taprio turn out to be actually pretty reliant on a well
configured stab, to not underestimate the skb transmission time (by
properly accounting for L1 overhead).
In a future change, taprio will need the stab, if configured by the
user, to be available at ops->init() time. It will become even more
important in upcoming work, when the overhead will be used for the
queueMaxSDU calculation that is passed to an offloading driver.
However, rcu_assign_pointer(sch->stab, stab) is called right after
ops->init(), making it unavailable, and I don't really see a good reason
for that.
Move it earlier, which nicely seems to simplify the error handling path
as well.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Kurt Kanzenbach <kurt@linutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent a1e6ad3 commit 1f62879
1 file changed
+11
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1282 | 1282 | | |
1283 | 1283 | | |
1284 | 1284 | | |
1285 | | - | |
1286 | | - | |
1287 | | - | |
1288 | | - | |
1289 | | - | |
1290 | | - | |
1291 | 1285 | | |
1292 | 1286 | | |
1293 | 1287 | | |
| |||
1296 | 1290 | | |
1297 | 1291 | | |
1298 | 1292 | | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
1299 | 1300 | | |
1300 | 1301 | | |
1301 | 1302 | | |
1302 | 1303 | | |
1303 | | - | |
| 1304 | + | |
1304 | 1305 | | |
1305 | 1306 | | |
1306 | 1307 | | |
| |||
1311 | 1312 | | |
1312 | 1313 | | |
1313 | 1314 | | |
1314 | | - | |
| 1315 | + | |
1315 | 1316 | | |
1316 | 1317 | | |
1317 | 1318 | | |
| |||
1321 | 1322 | | |
1322 | 1323 | | |
1323 | 1324 | | |
| 1325 | + | |
| 1326 | + | |
1324 | 1327 | | |
1325 | 1328 | | |
1326 | 1329 | | |
| |||
1332 | 1335 | | |
1333 | 1336 | | |
1334 | 1337 | | |
1335 | | - | |
1336 | | - | |
1337 | | - | |
1338 | | - | |
1339 | | - | |
1340 | | - | |
1341 | | - | |
1342 | | - | |
1343 | | - | |
1344 | | - | |
1345 | 1338 | | |
1346 | 1339 | | |
1347 | 1340 | | |
| |||
0 commit comments