diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2023-11-03 13:22:59 +1100 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2023-11-07 09:53:21 +0100 |
commit | 5a0485425bc9d43bc5228fe1b8b6286be83d3d1e (patch) | |
tree | 234b3a6e12abfbc32edf1675442efe8ba198cdd2 /test/lib/perf_report | |
parent | 4f0b9f91e40ac004f955e73860ee1a0eee9cab95 (diff) | |
download | passt-5a0485425bc9d43bc5228fe1b8b6286be83d3d1e.tar passt-5a0485425bc9d43bc5228fe1b8b6286be83d3d1e.tar.gz passt-5a0485425bc9d43bc5228fe1b8b6286be83d3d1e.tar.bz2 passt-5a0485425bc9d43bc5228fe1b8b6286be83d3d1e.tar.lz passt-5a0485425bc9d43bc5228fe1b8b6286be83d3d1e.tar.xz passt-5a0485425bc9d43bc5228fe1b8b6286be83d3d1e.tar.zst passt-5a0485425bc9d43bc5228fe1b8b6286be83d3d1e.zip |
port_fwd: Pre-open /proc/net/* files rather than on-demand
procfs_scan_listen() can either use an already opened fd for a /proc/net
file, or it will open it. So, effectively it will open the file on the
first call, then re-use the fd in subsequent calls. However, it's not
possible to open the /proc/net files after we isolate our filesystem in
isolate_prefork(). That means that for each /proc/net file we must call
procfs_scan_listen() at least once before isolate_prefork(), or it won't
work afterwards.
That happens to be the case, but it's a pretty fragile requirement. To
make this more robust, instead always pre-open the /proc files we will need
in get_bounds_port_init() and have procfs_scan_listen() just use those.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'test/lib/perf_report')
0 files changed, 0 insertions, 0 deletions