Home
last modified time | relevance | path

Searched +full:key +full:- +full:value (Results 1 – 25 of 1039) sorted by relevance

12345678910>>...42

/openbmc/linux/tools/testing/selftests/bpf/
H A Dtest_lru_map.c1 // SPDX-License-Identifier: GPL-2.0-only
36 if (map_fd == -1) in create_map()
42 static int bpf_map_lookup_elem_with_ref_bit(int fd, unsigned long long key, in bpf_map_lookup_elem_with_ref_bit() argument
43 void *value) in bpf_map_lookup_elem_with_ref_bit() argument
48 BPF_LD_IMM64(BPF_REG_3, key), in bpf_map_lookup_elem_with_ref_bit()
50 BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8), in bpf_map_lookup_elem_with_ref_bit()
71 return -1; in bpf_map_lookup_elem_with_ref_bit()
78 return -1; in bpf_map_lookup_elem_with_ref_bit()
83 ret = -1; in bpf_map_lookup_elem_with_ref_bit()
85 assert(!bpf_map_lookup_elem(mfd, &zero, value)); in bpf_map_lookup_elem_with_ref_bit()
[all …]
H A Dtest_lpm_map.c1 // SPDX-License-Identifier: GPL-2.0
3 * Randomized tests for eBPF longest-prefix-match maps
5 * This program runs randomized tests against the lpm-bpf-map. It implements a
9 * Based on tlpm, this inserts randomized data into bpf-lpm-maps and verifies
10 * the trie-based bpf-map implementation behaves the same way as tlpm.
33 uint8_t key[]; member
37 const uint8_t *key,
41 const uint8_t *key, in tlpm_add() argument
50 node = tlpm_match(list, key, n_bits); in tlpm_add()
51 if (node && node->n_bits == n_bits) { in tlpm_add()
[all …]
H A Dtest_maps.c1 // SPDX-License-Identifier: GPL-2.0-only
39 long long key, next_key, first_key, value; in test_hashmap() local
42 fd = bpf_map_create(BPF_MAP_TYPE_HASH, NULL, sizeof(key), sizeof(value), 2, &map_opts); in test_hashmap()
48 key = 1; in test_hashmap()
49 value = 1234; in test_hashmap()
50 /* Insert key=1 element. */ in test_hashmap()
51 assert(bpf_map_update_elem(fd, &key, &value, BPF_ANY) == 0); in test_hashmap()
53 value = 0; in test_hashmap()
55 assert(bpf_map_update_elem(fd, &key, &value, BPF_NOEXIST) < 0 && in test_hashmap()
56 /* key=1 already exists. */ in test_hashmap()
[all …]
/openbmc/linux/crypto/
H A Drsa_helper.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * RSA key extract helper
17 const void *value, size_t vlen) in rsa_get_n() argument
19 struct rsa_key *key = context; in rsa_get_n() local
20 const u8 *ptr = value; in rsa_get_n()
23 /* invalid key provided */ in rsa_get_n()
24 if (!value || !vlen) in rsa_get_n()
25 return -EINVAL; in rsa_get_n()
30 n_sz--; in rsa_get_n()
33 /* In FIPS mode only allow key size 2K and higher */ in rsa_get_n()
[all …]
/openbmc/linux/tools/testing/selftests/bpf/prog_tests/
H A Dlookup_and_delete.c1 // SPDX-License-Identifier: GPL-2.0-only
15 __u64 key, value = START_VALUE; in fill_values() local
18 for (key = 1; key < MAX_ENTRIES + 1; key++) { in fill_values()
19 err = bpf_map_update_elem(map_fd, &key, &value, BPF_NOEXIST); in fill_values()
21 return -1; in fill_values()
29 __u64 key, value[nr_cpus]; in fill_values_percpu() local
33 value[i] = START_VALUE; in fill_values_percpu()
35 for (key = 1; key < MAX_ENTRIES + 1; key++) { in fill_values_percpu()
36 err = bpf_map_update_elem(map_fd, &key, value, BPF_NOEXIST); in fill_values_percpu()
38 return -1; in fill_values_percpu()
[all …]
H A Dmap_init.c1 // SPDX-License-Identifier: GPL-2.0-only
22 pcpu_map_value_t value[nr_cpus]; in map_populate() local
24 map_key_t key; in map_populate() local
27 bpf_percpu(value, i) = FILL_VALUE; in map_populate()
29 for (key = 1; key <= num; key++) { in map_populate()
30 err = bpf_map_update_elem(map_fd, &key, value, BPF_NOEXIST); in map_populate()
32 return -1; in map_populate()
48 err = bpf_map__set_type(skel->maps.hashmap1, map_type); in setup()
52 err = bpf_map__set_max_entries(skel->maps.hashmap1, map_sz); in setup()
60 *map_fd = bpf_map__fd(skel->maps.hashmap1); in setup()
[all …]
/openbmc/linux/include/linux/
H A Dbootconfig.h1 /* SPDX-License-Identifier: GPL-2.0 */
27 #define BOOTCONFIG_ALIGN_MASK (BOOTCONFIG_ALIGN - 1)
30 * xbc_calc_checksum() - Calculate checksum of bootconfig
34 * Calculate the checksum value of the bootconfig data.
43 while (size--) in xbc_calc_checksum()
59 /* Maximum size of boot config is 32KB - 1 */
60 #define XBC_DATA_MAX (XBC_VALUE - 1)
75 * xbc_node_is_value() - Test the node is a value node
78 * Test the @node is a value node and return true if a value node, false if not.
82 return node->data & XBC_VALUE; in xbc_node_is_value()
[all …]
/openbmc/qemu/qobject/
H A Dqdict.c10 * See the COPYING.LIB file in the top-level directory.
19 #include "qobject-internal.h"
38 * (from module-init-tools)
42 unsigned value; /* Used to compute the hash value. */ in tdb_hash() local
45 /* Set the initial value from the key size. */ in tdb_hash()
46 for (value = 0x238F13AF * strlen(name), i = 0; name[i]; i++) { in tdb_hash()
47 value = (value + (((const unsigned char *)name)[i] << (i * 5 % 24))); in tdb_hash()
50 return (1103515243 * value + 12345); in tdb_hash()
56 static QDictEntry *alloc_entry(const char *key, QObject *value) in alloc_entry() argument
61 entry->key = g_strdup(key); in alloc_entry()
[all …]
/openbmc/openbmc/poky/bitbake/lib/bb/
H A DCOW.py6 # SPDX-License-Identifier: GPL-2.0-only
9 # Be careful when using mutable types (ie Dict and Lists) - operations involving these are SLOW.
40 keys = set(cls.__dict__.keys()) - ignored_keys
54 def __setitem__(cls, key, value): argument
55 if value is not None and not isinstance(value, ImmutableTypes):
56 if not isinstance(value, COWMeta):
58 key += MUTABLE
59 setattr(cls, key, value)
61 def __getmutable__(cls, key, readonly=False): argument
62 nkey = key + MUTABLE
[all …]
H A Ddata.py18 This is a trade-off between speed and memory again but
25 # SPDX-License-Identifier: GPL-2.0-only
54 If one does not find the value in the destination set,
55 search will go on to the source set to get the value.
56 Value from source are copy-on-write. i.e. any try to
57 modify one of them will end up putting the modified value
63 """Non-destructive var init for data structure"""
79 for key in alterdata:
80 if not '${' in key:
83 ekey = expand(key, readdata)
[all …]
/openbmc/qemu/include/hw/nvram/
H A Dfw_cfg.h5 #include "standard-headers/linux/qemu_fw_cfg.h"
13 #define TYPE_FW_CFG_DATA_GENERATOR_INTERFACE "fw_cfg-data-generator"
31 * @errp: pointer to a NULL-initialized error object
112 * @key: selector key value for new fw_cfg item
116 * Add a new fw_cfg item, available by selecting the given key, as a raw
120 void fw_cfg_add_bytes(FWCfgState *s, uint16_t key, void *data, size_t len);
125 * @key: selector key value for new fw_cfg item
126 * @value: NUL-terminated ascii string
128 * Add a new fw_cfg item, available by selecting the given key. The item
132 void fw_cfg_add_string(FWCfgState *s, uint16_t key, const char *value);
[all …]
/openbmc/linux/Documentation/admin-guide/
H A Dbootconfig.rst1 .. SPDX-License-Identifier: GPL-2.0
15 additional key-value data when booting the kernel in an efficient way.
16 This allows administrators to pass a structured-Key config file.
21 The boot config syntax is a simple structured key-value. Each key consists
22 of dot-connected-words, and key and value are connected by ``=``. The value
23 has to be terminated by semi-colon (``;``) or newline (``\n``).
24 For array value, array entries are separated by comma (``,``). ::
26 KEY[.WORD[...]] = VALUE[, VALUE2[...]][;]
30 Each key word must contain only alphabets, numbers, dash (``-``) or underscore
31 (``_``). And each value only contains printable characters or spaces except
[all …]
/openbmc/qemu/util/
H A Dqtree.c2 * GLIB - Library of useful routines for C programming
3 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
5 * SPDX-License-Identifier: LGPL-2.1-or-later
22 * Modified by the GLib Team and others 1997-2000. See the AUTHORS
36 * SECTION:trees-binary
38 * @short_description: a sorted collection of key/value pairs optimized
42 * collection of key/value pairs optimized for searching and traversing
50 * To insert a key/value pair into a #QTree use q_tree_insert()
53 * To remove a key/value pair use q_tree_remove() (O(n log(n))).
55 * To look up the value corresponding to a given key, use
[all …]
H A Dkeyval.c2 * Parsing KEY=VALUE,... strings
10 * See the COPYING file in the top-level directory.
14 * KEY=VALUE,... syntax:
16 * key-vals = [ key-val { ',' key-val } [ ',' ] ]
17 * key-val = key '=' val | help
18 * key = key-fragment { '.' key-fragment }
19 * key-fragment = qapi-name | index
20 * qapi-name = '__' / [a-z0-9.-]+ / '_' / [A-Za-z][A-Za-z0-9_-]* /
21 * index = / [0-9]+ /
27 * key-vals specifies a JSON object, i.e. a tree whose root is an
[all …]
/openbmc/linux/tools/lib/bpf/
H A Dhashmap.h1 /* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
4 * Generic non-thread safe hash map implementation.
23 return (h * 11400714819323198485llu) >> (__SIZEOF_LONG_LONG__ * 8 - bits); in hash_bits()
25 return (h * 2654435769lu) >> (__SIZEOF_LONG__ * 8 - bits); in hash_bits()
31 /* generic C-string hashing function */
43 typedef size_t (*hashmap_hash_fn)(long key, void *ctx);
48 * long-sized integers or pointers, this is achieved as follows:
49 * - interface functions that operate on keys and values are hidden
50 * behind auxiliary macros, e.g. hashmap_insert <-> hashmap__insert;
51 * - these auxiliary macros cast the key and value parameters as
[all …]
/openbmc/linux/tools/perf/util/
H A Dhashmap.h1 /* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
4 * Generic non-thread safe hash map implementation.
23 return (h * 11400714819323198485llu) >> (__SIZEOF_LONG_LONG__ * 8 - bits); in hash_bits()
25 return (h * 2654435769lu) >> (__SIZEOF_LONG__ * 8 - bits); in hash_bits()
31 /* generic C-string hashing function */
43 typedef size_t (*hashmap_hash_fn)(long key, void *ctx);
48 * long-sized integers or pointers, this is achieved as follows:
49 * - interface functions that operate on keys and values are hidden
50 * behind auxiliary macros, e.g. hashmap_insert <-> hashmap__insert;
51 * - these auxiliary macros cast the key and value parameters as
[all …]
/openbmc/qemu/tests/unit/
H A Dcheck-qdict.c2 * QDict unit-tests.
10 * See the COPYING.LIB file in the top-level directory.
19 * Public Interface test-cases
31 g_assert(qdict->base.refcnt == 1); in qdict_new_test()
46 // key "" will have tdb hash 12345 in qdict_put_obj_test()
50 ent = QLIST_FIRST(&qdict->table[12345 % QDICT_BUCKET_MAX]); in qdict_put_obj_test()
51 qn = qobject_to(QNum, ent->value); in qdict_put_obj_test()
72 const int value = -42; in qdict_get_test() local
73 const char *key = "test"; in qdict_get_test() local
76 qdict_put_int(tests_dict, key, value); in qdict_get_test()
[all …]
/openbmc/linux/samples/bpf/
H A Dmap_perf_test.bpf.c19 __type(key, u32);
20 __type(value, long);
26 __type(key, u32);
27 __type(value, long);
33 __type(key, u32);
34 __type(value, long);
41 __type(key, u32);
42 __type(value, long);
67 __type(key, u32);
68 __type(value, long);
[all …]
/openbmc/linux/tools/bpf/bpftool/
H A Dmap.c1 // SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 /* Copyright (C) 2017-2018 Netronome Systems, Inc. */
59 return -1; in map_type_from_str()
64 if (map_is_per_cpu(info->type)) in alloc_value()
65 return malloc(round_up(info->value_size, 8) * in alloc_value()
68 return malloc(info->value_size); in alloc_value()
72 struct bpf_map_info *map_info, void *key, in do_dump_btf() argument
73 void *value) in do_dump_btf() argument
78 /* start of key-value pair */ in do_dump_btf()
79 jsonw_start_object(d->jw); in do_dump_btf()
[all …]
/openbmc/linux/tools/testing/selftests/bpf/progs/
H A Dlsm.c1 // SPDX-License-Identifier: GPL-2.0
17 __type(key, __u32);
18 __type(value, __u64);
24 __type(key, __u32);
25 __type(value, __u64);
31 __type(key, __u32);
32 __type(value, __u64);
38 __type(key, __u32);
39 __type(value, __u64);
45 __type(key, __u32);
[all …]
/openbmc/bmcweb/redfish-core/include/utils/
H A Djson_utils.hpp1 // SPDX-License-Identifier: Apache-2.0
2 // SPDX-FileCopyrightText: Copyright OpenBMC Authors
3 // SPDX-FileCopyrightText: Copyright 2018 Intel Corporation
100 std::string_view key [[maybe_unused]]) in checkRange() argument
106 BMCWEB_LOG_DEBUG("Value for key {} was NAN", key); in checkRange()
115 BMCWEB_LOG_DEBUG("Value for key {} was greater than max {}", key, in checkRange()
125 BMCWEB_LOG_DEBUG("Value for key {} was less than min {}", key, in checkRange()
136 std::string_view key, Type& value);
139 UnpackErrorCode unpackValueVariant(nlohmann::json& j, std::string_view key, in unpackValueVariant() argument
145 UnpackErrorCode unpack = unpackValueWithErrorCode(j, key, type); in unpackValueVariant()
[all …]
/openbmc/bmcweb/redfish-core/schema/dmtf/csdl/
H A DKey_v1.xml1 <?xml version="1.0" encoding="UTF-8"?>
2 <!---->
3 <!--################################################################################ -->
4 <!--# Redfish Schema: Key v1.4.1 -->
5 <!--# -->
6 <!--# For a detailed change log, see the README file contained in the DSP8010 bundle, -->
7 <!--# available at http://www.dmtf.org/standards/redfish -->
8 <!--# Copyright 2014-2024 DMTF. -->
9 <!--# For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright -->
10 <!--################################################################################ -->
[all …]
/openbmc/linux/drivers/input/
H A Dsparse-keymap.c1 // SPDX-License-Identifier: GPL-2.0-only
14 #include <linux/input/sparse-keymap.h>
25 struct key_entry *key; in sparse_keymap_get_key_index() local
28 for (key = dev->keycode; key->type != KE_END; key++) { in sparse_keymap_get_key_index()
29 if (key->type == KE_KEY) { in sparse_keymap_get_key_index()
30 if (key == k) in sparse_keymap_get_key_index()
42 struct key_entry *key; in sparse_keymap_entry_by_index() local
45 for (key = dev->keycode; key->type != KE_END; key++) in sparse_keymap_entry_by_index()
46 if (key->type == KE_KEY) in sparse_keymap_entry_by_index()
48 return key; in sparse_keymap_entry_by_index()
[all …]
/openbmc/linux/fs/
H A Dmbcache.c1 // SPDX-License-Identifier: GPL-2.0-only
12 * Mbcache is a simple key-value store. Keys need not be unique, however
13 * key-value pairs are expected to be unique (we use this fact in
18 * They use hash of data as a key and provide a value that may represent a
20 * data may be the same). However user provided value always uniquely
23 * We provide functions for creation and removal of entries, search by key,
24 * and a special "delete entry with given key-value pair" operation. Fixed
25 * size hash table is used for fast key lookups.
51 u32 key) in mb_cache_entry_head() argument
53 return &cache->c_hash[hash_32(key, cache->c_bucket_bits)]; in mb_cache_entry_head()
[all …]
/openbmc/phosphor-logging/extensions/openpower-pels/
H A Dadditional_data.hpp21 * The property is a vector of strings of the form: "KEY=VALUE",
22 * and this class provides a getValue("KEY") API that would return
23 * "VALUE".
38 * @param[in] ad - the AdditionalData property vector with
39 * entries of "KEY=VALUE"
46 * @brief Returns the value of the AdditionalData item for the
47 * key passed in.
48 * @param[in] key - the key to search for
50 * @return optional<string> - the value, if found
52 std::optional<std::string> getValue(const std::string& key) const in getValue()
[all …]

12345678910>>...42