All of lore.kernel.org
 help / color / mirror / Atom feed
* Ebpf map question
@ 2023-04-28  9:55 Marco
  2023-04-28 10:43 ` Toke Høiland-Jørgensen
  0 siblings, 1 reply; 2+ messages in thread
From: Marco @ 2023-04-28  9:55 UTC (permalink / raw)
  To: xdp-newbies

Hi

Assuming to have this struct:

struct hash_elem {
    int cnt;
    };

and kernel space program want read cnt value:

struct hash_elem *val = bpf_map_lookup_elem(&hash_map, &key);

    if (val)
   {

# time fraction

    bpf_printk("My value %d", val->cnt);
    }

What happens if the hash_map is a pinned map and in the same time
space of 'time fraction" a user program deletes the element of the
key?
What happen at val pointer?


Thanks.

Marco

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-04-28 10:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-28  9:55 Ebpf map question Marco
2023-04-28 10:43 ` Toke Høiland-Jørgensen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.