diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2024-05-21 15:57:05 +1000 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2024-05-22 23:20:58 +0200 |
commit | 0060acd11b191e0699e2c588a565c4929523db06 (patch) | |
tree | f5b7818c7292c2d7641261a200a98feceb93d4dd /pif.h | |
parent | a63199832a737dde45500e4037608727701c782f (diff) | |
download | passt-0060acd11b191e0699e2c588a565c4929523db06.tar passt-0060acd11b191e0699e2c588a565c4929523db06.tar.gz passt-0060acd11b191e0699e2c588a565c4929523db06.tar.bz2 passt-0060acd11b191e0699e2c588a565c4929523db06.tar.lz passt-0060acd11b191e0699e2c588a565c4929523db06.tar.xz passt-0060acd11b191e0699e2c588a565c4929523db06.tar.zst passt-0060acd11b191e0699e2c588a565c4929523db06.zip |
flow: Clarify and enforce flow state transitions
Flows move over several different states in their lifetime. The rules for
these are documented in comments, but they're pretty complex and a number
of the transitions are implicit, which makes this pretty fragile and
error prone.
Change the code to explicitly track the states in a field. Make all
transitions explicit and logged. To the extent that it's practical in C,
enforce what can and can't be done in various states with ASSERT()s.
While we're at it, tweak the docs to clarify the restrictions on each state
a bit.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'pif.h')
0 files changed, 0 insertions, 0 deletions