RE: [PATCH bpf-next v5 1/1] docs: BPF_MAP_TYPE_SOCK[MAP|HASH]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



mtahhan@xxxxxxxxxx wrote:
[...]
> +A sock object may be in multiple maps, but can only inherit a single 
> +parse or verdict program. If adding a sock object to a map would result 
> +in having multiple parsing programs the update will return an EBUSY error.

s/parsing programs/parser programs/
for consistency with rest of the patch.

> +.. note::
> +    For more details of the socket callbacks that get replaced please see
> +    ``net/ipv4/tcp_bpf.c`` and ``net/ipv4/udp_bpf.c`` for TCP and UDP
> +    functions, respectively.

Why this note?  The rest of the text looks to be usable cross-platform
but the note above implies that this documentation is lacking and the reader
has to consult the Linux source code.  Can more be documented
in the doc instead of just in the code?

> +Finally, the helpers ``bpf_msg_pull_data()`` and 
> +``bpf_msg_push_data()`` are available to ``BPF_PROG_TYPE_SK_MSG`` BPF 
> +programs to pull in data and set the start and end pointer to given 
> +values or to add metadata to the ``struct sk_msg_buff *msg``.

s/start and end pointer/start and end pointers/
(grammar)

> +copied if necessary (i.e. if data was not linear and if start and end 

Nit: style manuals such as Chicago Manual of Style say to always put a comma
after "i.e." (and "e.g.").

> +bpf_map_lookup_elem()
> +^^^^^^^^^^^^^^^^^^^^^
> +
> +.. code-block:: c
> +
> +	void *bpf_map_lookup_elem(struct bpf_map *map, const void *key)
> +
> +Lookup a socket entry in the sockmap or sockhash map.

Grammar nit:
s/Lookup/Look up/
("look up" is a verb, whereas "lookup" is a noun)

-Dave




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux