diff options
author | Peng He <hepeng.0320@bytedance.com> | 2022-11-27 07:28:55 +0000 |
---|---|---|
committer | Ilya Maximets <i.maximets@ovn.org> | 2023-02-07 14:21:38 +0100 |
commit | 5dfc8309d9df10075c6dd85250acda6daaeca6fd (patch) | |
tree | 0c1360acef17ffa17f8db28fcd4769ea1322be2d /tests | |
parent | e85e8a7541cbe7d9c57bd34ae99d47edad92f111 (diff) | |
download | openvswitch-5dfc8309d9df10075c6dd85250acda6daaeca6fd.tar.gz |
ofproto-dpif-upcall: New ukey needs to take the old ukey's dump seq.
The userspace datapath manages all the magaflows by a cmap. The cmap
data structure will grow/shrink during the datapath processing and it
will re-position megaflows. This might result in two revalidator threads
might process a same megaflow during one dump stage.
Consider a situation that, revalidator 1 processes a megaflow A, and
decides to delete it from the datapath, at the mean time, this megaflow
A is also queued in the process batch of revalidator 2. Normally it's ok
for revalidators to process the same megaflow multiple times, as the
dump_seq shows it's already dumped and the stats will not be contributed
twice.
Assume that right after A is deleted, a PMD thread generates again
a new megaflow B which has the same match and action of A. The ukey
of megaflow B will replace the one of megaflow A. Now the ukey B is
new to the revalidator system and its dump seq is 0.
Now since the dump seq of ukey B is 0, when processing megaflow A,
the revalidator 2 will not identify this megaflow A has already been
dumped by revalidator 1 and will contribute the old megaflow A's stats
again, this results in an inconsistent stats between ukeys and megaflows.
To fix this, the newly generated the ukey B should take the dump_seq
of the replaced ukey A to avoid a same megaflow being revalidated
twice in one dump stage.
We observe in the production environment, the OpenFlow rules' stats
sometimes are amplified compared to the actual value.
Signed-off-by: Peng He <hepeng.0320@bytedance.com>
Acked-by: Eelco Chaudron <echaudro@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions