Commit 25cd49d
mptcp: drop struct mptcp_pm_add_entry
There is no need to add a dedicated address entry type "mptcp_pm_add_entry"
to represent ADD_ADDR addresses. Additional fields for ADD_ADDR addresses
can be added into struct mptcp_pm_addr_entry directly. This makes the path
manager code simpler.
Here "union" can be used to merge struct mptcp_pm_addr_entry and struct
mptcp_pm_add_entry into one. Then all mptcp_pm_add_entry can be replaced by
mptcp_pm_addr_entry.
Although this increases the size of the structure even more, but that's OK
to do so because it is not used in an array.
Signed-off-by: Geliang Tang <[email protected]>1 parent 5abb523 commit 25cd49d
2 files changed
+24
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | 21 | | |
30 | 22 | | |
31 | 23 | | |
| |||
257 | 249 | | |
258 | 250 | | |
259 | 251 | | |
260 | | - | |
| 252 | + | |
261 | 253 | | |
262 | 254 | | |
263 | 255 | | |
264 | | - | |
| 256 | + | |
265 | 257 | | |
266 | 258 | | |
267 | 259 | | |
| |||
275 | 267 | | |
276 | 268 | | |
277 | 269 | | |
278 | | - | |
| 270 | + | |
279 | 271 | | |
280 | 272 | | |
281 | 273 | | |
| |||
296 | 288 | | |
297 | 289 | | |
298 | 290 | | |
299 | | - | |
| 291 | + | |
300 | 292 | | |
301 | 293 | | |
302 | 294 | | |
| |||
338 | 330 | | |
339 | 331 | | |
340 | 332 | | |
341 | | - | |
| 333 | + | |
342 | 334 | | |
343 | 335 | | |
344 | 336 | | |
345 | | - | |
| 337 | + | |
346 | 338 | | |
347 | 339 | | |
348 | 340 | | |
| |||
366 | 358 | | |
367 | 359 | | |
368 | 360 | | |
369 | | - | |
| 361 | + | |
370 | 362 | | |
371 | 363 | | |
372 | 364 | | |
| |||
402 | 394 | | |
403 | 395 | | |
404 | 396 | | |
405 | | - | |
| 397 | + | |
406 | 398 | | |
407 | 399 | | |
408 | 400 | | |
| |||
1474 | 1466 | | |
1475 | 1467 | | |
1476 | 1468 | | |
1477 | | - | |
| 1469 | + | |
1478 | 1470 | | |
1479 | 1471 | | |
1480 | 1472 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
242 | | - | |
243 | | - | |
244 | | - | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
245 | 255 | | |
246 | 256 | | |
247 | 257 | | |
| |||
1019 | 1029 | | |
1020 | 1030 | | |
1021 | 1031 | | |
1022 | | - | |
| 1032 | + | |
1023 | 1033 | | |
1024 | 1034 | | |
1025 | | - | |
| 1035 | + | |
1026 | 1036 | | |
1027 | 1037 | | |
1028 | 1038 | | |
| |||
0 commit comments