Pass a map to a global BPF function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

We have some map-of-arrays that we use for tracking labeled metrics in
our XDP code. The inner map tracks the metrics for a given label,
which is the key in the outer map.

Our XDP code calls several global BPF functions (freplaced, so can't
be inlined). Currently, each global function has to make a lookup to
get the inner map to record its metrics. Now that non-context pointers
can be passed to global BPF functions, is it possible to pass maps to
these global functions?

That would allow the primary function to do the lookup once, and the
helpers would be able to skip their lookup saving considerable time.
Using this map-of-maps approach for labeled metrics has produced a
noticeable performance degradation that profiling indicates is because
of the extra lookups, which is why we're interested in reducing the
number of lookups.

Thanks!
--Zvi



[Index of Archives]     [Linux Networking Development]     [Fedora Linux Users]     [Linux SCTP]     [DCCP]     [Gimp]     [Yosemite Campsites]

  Powered by Linux