If the dp cache request misses, retry but only a couple of times so we
don't overload the system and only if we're not running on an externally
provided cache.
Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
Printing just the datapath on each upcall gives little information (most
often, there will only be one well-known datapath). Instead, print both
the input port name (plus the datapath).
In order to do this, refactor decode_nla to always generate the dump
that only gets printed if needed. That way it can be called earlier on.
Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
The upcall_cost.py script has a useful port mapping cache that can be
very useful for other scripts.
Move it into a library file (usdt_lib.py). While we're at it, refactor
it into a class since setting attributes to functions and having it
return different types depending on input is not very clean.
This patch should not introduce any functional change.
Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
Signed-off-by: Eelco Chaudron <echaudro@redhat.com>