if (in_test_mode) { /* test mode is used by selftests to *testfunctionalityofbpf_hash_mapiter. * *theabovehashmap1willhavecorrectsize *andwillbeaccepted,hashmap2andhashmap3 *shouldberejectedduetosmallerkey/value *size.
*/ if (key == (void *)0 || val == (void *)0) return0;
/* update the value and then delete the <key, value> pair. *itshouldnotimpacttheexisting'val'whichisstill *accessibleunderrcu.
*/
__builtin_memcpy(&tmp_key, key, sizeof(struct key_t));
ret = bpf_map_update_elem(&hashmap1, &tmp_key, &tmp_val, 0); if (ret) return0;
ret = bpf_map_delete_elem(&hashmap1, &tmp_key); if (ret) return0;
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.