@@ -502,18 +502,6 @@ union bpf_attr {
502
502
* Return
503
503
* 0 on success, or a negative error in case of failure.
504
504
*
505
- * int bpf_map_pop_elem(struct bpf_map *map, void *value)
506
- * Description
507
- * Pop an element from *map*.
508
- * Return
509
- * 0 on success, or a negative error in case of failure.
510
- *
511
- * int bpf_map_peek_elem(struct bpf_map *map, void *value)
512
- * Description
513
- * Get an element from *map* without removing it.
514
- * Return
515
- * 0 on success, or a negative error in case of failure.
516
- *
517
505
* int bpf_probe_read(void *dst, u32 size, const void *src)
518
506
* Description
519
507
* For tracing programs, safely attempt to read *size* bytes from
@@ -1937,9 +1925,9 @@ union bpf_attr {
1937
1925
* is set to metric from route (IPv4/IPv6 only), and ifindex
1938
1926
* is set to the device index of the nexthop from the FIB lookup.
1939
1927
*
1940
- * *plen* argument is the size of the passed in struct.
1941
- * *flags* argument can be a combination of one or more of the
1942
- * following values:
1928
+ * *plen* argument is the size of the passed in struct.
1929
+ * *flags* argument can be a combination of one or more of the
1930
+ * following values:
1943
1931
*
1944
1932
* **BPF_FIB_LOOKUP_DIRECT**
1945
1933
* Do a direct table lookup vs full lookup using FIB
@@ -1948,9 +1936,9 @@ union bpf_attr {
1948
1936
* Perform lookup from an egress perspective (default is
1949
1937
* ingress).
1950
1938
*
1951
- * *ctx* is either **struct xdp_md** for XDP programs or
1952
- * **struct sk_buff** tc cls_act programs.
1953
- * Return
1939
+ * *ctx* is either **struct xdp_md** for XDP programs or
1940
+ * **struct sk_buff** tc cls_act programs.
1941
+ * Return
1954
1942
* * < 0 if any input argument is invalid
1955
1943
* * 0 on success (packet is forwarded, nexthop neighbor exists)
1956
1944
* * > 0 one of **BPF_FIB_LKUP_RET_** codes explaining why the
@@ -2095,8 +2083,8 @@ union bpf_attr {
2095
2083
* translated to a keycode using the rc keymap, and reported as
2096
2084
* an input key down event. After a period a key up event is
2097
2085
* generated. This period can be extended by calling either
2098
- * **bpf_rc_keydown** () again with the same values, or calling
2099
- * **bpf_rc_repeat** ().
2086
+ * **bpf_rc_keydown**\ () again with the same values, or calling
2087
+ * **bpf_rc_repeat**\ ().
2100
2088
*
2101
2089
* Some protocols include a toggle bit, in case the button was
2102
2090
* released and pressed again between consecutive scancodes.
@@ -2179,29 +2167,30 @@ union bpf_attr {
2179
2167
* The *flags* meaning is specific for each map type,
2180
2168
* and has to be 0 for cgroup local storage.
2181
2169
*
2182
- * Depending on the bpf program type, a local storage area
2183
- * can be shared between multiple instances of the bpf program,
2170
+ * Depending on the BPF program type, a local storage area
2171
+ * can be shared between multiple instances of the BPF program,
2184
2172
* running simultaneously.
2185
2173
*
2186
2174
* A user should care about the synchronization by himself.
2187
- * For example, by using the BPF_STX_XADD instruction to alter
2175
+ * For example, by using the ** BPF_STX_XADD** instruction to alter
2188
2176
* the shared data.
2189
2177
* Return
2190
- * Pointer to the local storage area.
2178
+ * A pointer to the local storage area.
2191
2179
*
2192
2180
* int bpf_sk_select_reuseport(struct sk_reuseport_md *reuse, struct bpf_map *map, void *key, u64 flags)
2193
2181
* Description
2194
- * Select a SO_REUSEPORT sk from a BPF_MAP_TYPE_REUSEPORT_ARRAY map
2195
- * It checks the selected sk is matching the incoming
2196
- * request in the skb.
2182
+ * Select a **SO_REUSEPORT** socket from a
2183
+ * **BPF_MAP_TYPE_REUSEPORT_ARRAY** *map*.
2184
+ * It checks the selected socket is matching the incoming
2185
+ * request in the socket buffer.
2197
2186
* Return
2198
2187
* 0 on success, or a negative error in case of failure.
2199
2188
*
2200
2189
* struct bpf_sock *bpf_sk_lookup_tcp(void *ctx, struct bpf_sock_tuple *tuple, u32 tuple_size, u64 netns, u64 flags)
2201
2190
* Description
2202
2191
* Look for TCP socket matching *tuple*, optionally in a child
2203
2192
* network namespace *netns*. The return value must be checked,
2204
- * and if non-NULL, released via **bpf_sk_release**\ ().
2193
+ * and if non-** NULL** , released via **bpf_sk_release**\ ().
2205
2194
*
2206
2195
* The *ctx* should point to the context of the program, such as
2207
2196
* the skb or socket (depending on the hook in use). This is used
@@ -2229,15 +2218,15 @@ union bpf_attr {
2229
2218
* This helper is available only if the kernel was compiled with
2230
2219
* **CONFIG_NET** configuration option.
2231
2220
* Return
2232
- * Pointer to *struct bpf_sock*, or NULL in case of failure.
2233
- * For sockets with reuseport option, the *struct bpf_sock*
2234
- * result is from reuse->socks[] using the hash of the tuple.
2221
+ * Pointer to ** struct bpf_sock** , or ** NULL** in case of failure.
2222
+ * For sockets with reuseport option, the ** struct bpf_sock* *
2223
+ * result is from ** reuse->socks**\ [] using the hash of the tuple.
2235
2224
*
2236
2225
* struct bpf_sock *bpf_sk_lookup_udp(void *ctx, struct bpf_sock_tuple *tuple, u32 tuple_size, u64 netns, u64 flags)
2237
2226
* Description
2238
2227
* Look for UDP socket matching *tuple*, optionally in a child
2239
2228
* network namespace *netns*. The return value must be checked,
2240
- * and if non-NULL, released via **bpf_sk_release**\ ().
2229
+ * and if non-** NULL** , released via **bpf_sk_release**\ ().
2241
2230
*
2242
2231
* The *ctx* should point to the context of the program, such as
2243
2232
* the skb or socket (depending on the hook in use). This is used
@@ -2265,42 +2254,54 @@ union bpf_attr {
2265
2254
* This helper is available only if the kernel was compiled with
2266
2255
* **CONFIG_NET** configuration option.
2267
2256
* Return
2268
- * Pointer to *struct bpf_sock*, or NULL in case of failure.
2269
- * For sockets with reuseport option, the *struct bpf_sock*
2270
- * result is from reuse->socks[] using the hash of the tuple.
2257
+ * Pointer to ** struct bpf_sock** , or ** NULL** in case of failure.
2258
+ * For sockets with reuseport option, the ** struct bpf_sock* *
2259
+ * result is from ** reuse->socks**\ [] using the hash of the tuple.
2271
2260
*
2272
- * int bpf_sk_release(struct bpf_sock *sk )
2261
+ * int bpf_sk_release(struct bpf_sock *sock )
2273
2262
* Description
2274
- * Release the reference held by *sock*. *sock* must be a non-NULL
2275
- * pointer that was returned from bpf_sk_lookup_xxx\ ().
2263
+ * Release the reference held by *sock*. *sock* must be a
2264
+ * non-**NULL** pointer that was returned from
2265
+ * **bpf_sk_lookup_xxx**\ ().
2276
2266
* Return
2277
2267
* 0 on success, or a negative error in case of failure.
2278
2268
*
2269
+ * int bpf_map_pop_elem(struct bpf_map *map, void *value)
2270
+ * Description
2271
+ * Pop an element from *map*.
2272
+ * Return
2273
+ * 0 on success, or a negative error in case of failure.
2274
+ *
2275
+ * int bpf_map_peek_elem(struct bpf_map *map, void *value)
2276
+ * Description
2277
+ * Get an element from *map* without removing it.
2278
+ * Return
2279
+ * 0 on success, or a negative error in case of failure.
2280
+ *
2279
2281
* int bpf_msg_push_data(struct sk_buff *skb, u32 start, u32 len, u64 flags)
2280
2282
* Description
2281
- * For socket policies, insert *len* bytes into msg at offset
2283
+ * For socket policies, insert *len* bytes into * msg* at offset
2282
2284
* *start*.
2283
2285
*
2284
2286
* If a program of type **BPF_PROG_TYPE_SK_MSG** is run on a
2285
- * *msg* it may want to insert metadata or options into the msg.
2287
+ * *msg* it may want to insert metadata or options into the * msg* .
2286
2288
* This can later be read and used by any of the lower layer BPF
2287
2289
* hooks.
2288
2290
*
2289
2291
* This helper may fail if under memory pressure (a malloc
2290
2292
* fails) in these cases BPF programs will get an appropriate
2291
2293
* error and BPF programs will need to handle them.
2292
- *
2293
2294
* Return
2294
2295
* 0 on success, or a negative error in case of failure.
2295
2296
*
2296
2297
* int bpf_msg_pop_data(struct sk_msg_buff *msg, u32 start, u32 pop, u64 flags)
2297
- * Description
2298
+ * Description
2298
2299
* Will remove *pop* bytes from a *msg* starting at byte *start*.
2299
2300
* This may result in **ENOMEM** errors under certain situations if
2300
2301
* an allocation and copy are required due to a full ring buffer.
2301
2302
* However, the helper will try to avoid doing the allocation
2302
2303
* if possible. Other errors can occur if input parameters are
2303
- * invalid either due to *start* byte not being valid part of msg
2304
+ * invalid either due to *start* byte not being valid part of * msg*
2304
2305
* payload and/or *pop* value being to large.
2305
2306
* Return
2306
2307
* 0 on success, or a negative error in case of failure.
0 commit comments