Skip to content

Commit ba856d8

Browse files
committed
netstacklat: relax ifindex filter due to production
Lacking a YAML ebpf_exporter config for selecting iface names we hard-coded ifindex, but some production servers have higher ifindex for vlan100. Relax ifindex range as a workaround. Signed-off-by: Jesper Dangaard Brouer <hawk@kernel.org>
1 parent b9cbe80 commit ba856d8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

examples/netstacklat.bpf.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,8 +280,10 @@ static bool filter_ifindex(u32 ifindex)
280280
/* Hack for production:
281281
* - We want to exclude 'lo' which have ifindex==1.
282282
* - We want to filter on ext0 (ifindex 2) and vlan100@ext0 (ifindex 5)
283+
* unfortunately ifindex'es are not stable, some production metals have
284+
* ifindex==6 for vlan100@link0. Relax filter until adding YAML config.
283285
*/
284-
if (ifindex > 1 && ifindex < 6)
286+
if (ifindex > 1 && ifindex < 12)
285287
return true;
286288

287289
return false;

0 commit comments

Comments
 (0)