Lines Matching full:storage

11 ``BPF_MAP_TYPE_SK_STORAGE`` is used to provide socket-local storage for BPF
12 programs. A map of type ``BPF_MAP_TYPE_SK_STORAGE`` declares the type of storage
14 storage. The values for maps of type ``BPF_MAP_TYPE_SK_STORAGE`` are stored
16 allocating storage for a socket when requested and for freeing the storage when
22 socket-local storage.
37 Socket-local storage for ``map`` can be retrieved from socket ``sk`` using the
39 flag is used then ``bpf_sk_storage_get()`` will create the storage for ``sk``
41 ``BPF_LOCAL_STORAGE_GET_F_CREATE`` to initialize the storage value, otherwise
42 it will be zero initialized. Returns a pointer to the storage on success, or
56 Socket-local storage for ``map`` can be deleted from socket ``sk`` using the
70 Socket-local storage for map ``map_fd`` can be added or updated locally to a
79 - ``BPF_ANY`` will create storage for `socket` ``fd`` or update existing storage.
80 - ``BPF_NOEXIST`` will create storage for `socket` ``fd`` only if it did not
82 - ``BPF_EXIST`` will update existing storage for `socket` ``fd`` if it already
94 Socket-local storage for map ``map_fd`` can be retrieved from a socket using
95 the ``bpf_map_lookup_elem()`` libbpf function. The storage is retrieved from
106 Socket-local storage for map ``map_fd`` can be deleted from a socket using the
107 ``bpf_map_delete_elem()`` libbpf function. The storage is deleted from the
117 This snippet shows how to declare socket-local storage in a BPF program:
128 This snippet shows how to retrieve socket-local storage in a BPF program:
135 struct my_storage *storage;
142 storage = bpf_sk_storage_get(&socket_storage, sk, 0,
144 if (!storage)
147 /* Use 'storage' here */