Open italovalcy opened 1 year ago
Great find, @italovalcy.
It's very interesting that's also reduces per-packet CPU. 100 ms sounds like a great default (so maybe we don't even need to parametrize as a cli option), maybe it's worth to also trying it out on an interface with a higher OpenFlow traffic too, but probably no surprises, since this to_ms
is acting like a poll without strong guarantees, and as you quoted, good thing it'll be ignored when it's not supported.
I can also confirm that on my laptop running on Linux/x86_64, with to_ms=0
, it also took a long time without showing any packets, but trying out with your patch (with to_ms=100
) it immediately started printing out packets to stdout:
❯ uname -a
Linux vx 6.1.31-2-MANJARO #1 SMP PREEMPT_DYNAMIC Sun Jun 4 12:31:46 UTC 2023 x86_64 GNU/Linux
I've also plot CPU/RAM of ofp_sniffer.py
process usage over 2 mins live capturing on lo
using mininet ring topo, CPU and RAM are stable:
Hi,
Running ofp_sniffer on 5.10.0-18-amd64 with default ket buffer timeout set to zero (
open_live()
with parameterto_ms=0
as being currently used on ofp_sniffer) makes ofp_sniffer not show anything for a long period of time (waiting for the buffer to get filled).From pcap man page:
Setting
to_ms=100
fixes the weird behavior above.