/* Matches map2 definition in linked_maps2.c. Order of the attributes doesn't * matter.
*/ typedefstruct {
__uint(max_entries, 8);
__type(key, int);
__type(value, int);
__uint(type, BPF_MAP_TYPE_ARRAY);
} map2_t;
extern map2_t map2 SEC(".maps");
/* This should be the winning map definition, but we have no way of verifying, * so we just make sure that it links and works without errors
*/ struct {
__uint(type, BPF_MAP_TYPE_ARRAY);
__type(key, int);
__type(value, int);
__uint(max_entries, 16);
} map_weak __weak SEC(".maps");
int output_first1; int output_second1; int output_weak1;
SEC("raw_tp/sys_enter") int BPF_PROG(handler_enter1)
{ /* update values with key = 1 */ int key = 1, val = 1; struct my_key key_struct = { .x = 1 }; struct my_value val_struct = { .x = 1000 };
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.