Commit 996f2d3
controller: Fix mac-cache race condition causing extra ARP.
Usually mac_binding_stats_run and mac_binding_probe_stats_run are executed
either both with (since_updated < threshold->cooldown_period), and sb is
not updated, or both with (since_updated >= threshold->cooldown_period),
and sb is updated but ARP is not sent
(until stats->idle_age_ms > threshold->value).
However, if mac_binding_stats_run is executed as
(since_updated < threshold->cooldown_period), it does not update
mac_binding, as expected.
Then, if mac_binding_probe_stats_run is executed just afterwards, but with
(since_updated_ms >= threshold->cooldown_period), ARP is sent.
Fix this by calling time_wall_msec() once in statctrl_run() and passing it
to all stats_run functions.
This was identified through random failures of test
"MAC binding aging - probing GW router Dynamic Neigh".
Fixes: 1e4d440 ("controller: Send ARP/ND for stale mac_bindings entries.")
Signed-off-by: Xavier Simonart <xsimonar@redhat.com>
Acked-by: Ales Musil <amusil@redhat.com>
Signed-off-by: Ales Musil <amusil@redhat.com>
(cherry picked from commit a68cf33)1 parent ded7e98 commit 996f2d3
3 files changed
Lines changed: 13 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
412 | 412 | | |
413 | 413 | | |
414 | 414 | | |
415 | | - | |
| 415 | + | |
416 | 416 | | |
417 | 417 | | |
418 | | - | |
419 | 418 | | |
420 | 419 | | |
421 | 420 | | |
| |||
511 | 510 | | |
512 | 511 | | |
513 | 512 | | |
514 | | - | |
| 513 | + | |
| 514 | + | |
515 | 515 | | |
516 | 516 | | |
517 | | - | |
518 | 517 | | |
519 | 518 | | |
520 | 519 | | |
| |||
891 | 890 | | |
892 | 891 | | |
893 | 892 | | |
894 | | - | |
| 893 | + | |
895 | 894 | | |
896 | | - | |
897 | 895 | | |
898 | 896 | | |
899 | 897 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
| 192 | + | |
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
199 | | - | |
| 199 | + | |
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
237 | | - | |
| 237 | + | |
| 238 | + | |
238 | 239 | | |
239 | 240 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
| 68 | + | |
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
| |||
197 | 198 | | |
198 | 199 | | |
199 | 200 | | |
| 201 | + | |
200 | 202 | | |
201 | 203 | | |
202 | 204 | | |
| |||
205 | 207 | | |
206 | 208 | | |
207 | 209 | | |
208 | | - | |
| 210 | + | |
| 211 | + | |
209 | 212 | | |
210 | 213 | | |
211 | 214 | | |
| |||
0 commit comments